summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/event/ShortcutAction.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-03-24 10:46:39 +0200
committerVaadin Code Review <review@vaadin.com>2015-05-12 11:33:34 +0000
commit0a7d5bcd585dcfc08ea7c4339dc03f29cea6fde4 (patch)
tree1ec63b2cbb47dbbbc8e21a552955a48656f5dd2a /server/src/com/vaadin/event/ShortcutAction.java
parent22271249251894dfc7cfbebad6b4d2faf4c0313e (diff)
downloadvaadin-framework-0a7d5bcd585dcfc08ea7c4339dc03f29cea6fde4.tar.gz
vaadin-framework-0a7d5bcd585dcfc08ea7c4339dc03f29cea6fde4.zip
Revert "Moved accessibility shortcut handling to server-side. [#14843]"
This reverts commit e88f71dd6d1d7634e3a90a7e53859ff6dc028e21. Change-Id: I1d4ed60ec4a194f6ed18fa5506134ef3a185a6cf
Diffstat (limited to 'server/src/com/vaadin/event/ShortcutAction.java')
-rw-r--r--server/src/com/vaadin/event/ShortcutAction.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/server/src/com/vaadin/event/ShortcutAction.java b/server/src/com/vaadin/event/ShortcutAction.java
index 32b909e9f2..09accae1c7 100644
--- a/server/src/com/vaadin/event/ShortcutAction.java
+++ b/server/src/com/vaadin/event/ShortcutAction.java
@@ -17,8 +17,6 @@
package com.vaadin.event;
import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -239,42 +237,6 @@ public class ShortcutAction extends Action {
}
/**
- * Checks whether the shortcut can be triggered with the given combination
- * of keys.
- *
- * @param keyCode
- * potential match for the {@link KeyCode} that this shortcut
- * reacts to
- * @param modifierKeys
- * (optional) potential matches for the {@link ModifierKey}s
- * required for this shortcut to react
- * @return <code>true</code> if keyCode and modifierKeys are a match,
- * <code>false</code> otherwise
- */
- public boolean isTriggeredBy(int keyCode, int... modifierKeys) {
- boolean result = false;
- if (keyCode == this.keyCode) {
- if (modifierKeys == null) {
- result = (modifiers == null);
- } else if (modifiers != null) {
- List<Integer> modifierList = new ArrayList<Integer>();
- for (int modifier : modifiers) {
- modifierList.add(modifier);
- }
- for (int modifierKey : modifierKeys) {
- if (modifierList.contains(modifierKey)) {
- modifierList.remove(modifierKey);
- } else {
- return false;
- }
- }
- result = modifierList.isEmpty();
- }
- }
- return result;
- }
-
- /**
* Key codes that can be used for shortcuts
*
*/