Package org.eclipse.jface.bindings.keys
Interface IKeyLookup
- All Known Implementing Classes:
SWTKeyLookup
public interface IKeyLookup
A facilitiy for converting the formal representation for key strokes (i.e., used in persistence) into real key stroke instances.
- Since:
- 3.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The formal name of the 'Alt' key.static final String
The formal name of the 'Arrow Down' key.static final String
The formal name of the 'Arrow Left' key.static final String
The formal name of the 'Arrow Right' key.static final String
The formal name of the 'Arrow Up' key.static final String
An alternate name for the backspace key.static final String
The formal name for the 'Break' key.static final String
The formal name of the backspace key.static final String
The formal name for the 'Caps Lock' key.static final String
The formal name of the 'Command' key.static final String
The formal name of the carriage return (U+000D)static final String
The formal name of the 'Ctrl' key.static final String
The formal name of the delete (U+007F) keystatic final String
An alternative name for the delete key.static final String
The formal name of the 'End' key.static final String
An alternative name for the enter key.static final String
The formal name of the escape (U+001B) key.static final String
An alternative name for the escape key.static final String
The formal name of the 'F1' key.static final String
The formal name of the 'F10' key.static final String
The formal name of the 'F11' key.static final String
The formal name of the 'F12' key.static final String
The formal name of the 'F13' key.static final String
The formal name of the 'F14' key.static final String
The formal name of the 'F15' key.static final String
The formal name of the 'F16' key.static final String
The formal name of the 'F17' key.static final String
The formal name of the 'F18' key.static final String
The formal name of the 'F19' key.static final String
The formal name of the 'F2' key.static final String
The formal name of the 'F20' key.static final String
The formal name of the 'F3' key.static final String
The formal name of the 'F4' key.static final String
The formal name of the 'F5' key.static final String
The formal name of the 'F6' key.static final String
The formal name of the 'F7' key.static final String
The formal name of the 'F8' key.static final String
The formal name of the 'F9' key.static final String
The formal name of the form feed (U+000C) key.static final String
The formal name of the 'Home' key.static final String
The formal name of the 'Insert' key.static final String
The formal name of the line feed (U+000A) key.static final String
The formal name of the 'M1' key.static final String
The formal name of the 'M2' key.static final String
The formal name of the 'M3' key.static final String
The formal name of the 'M4' key.static final String
The formal name of the null (U+0000) key.static final String
The formal name of the 'NumLock' key.static final String
The formal name of the '0' key on the numpad.static final String
The formal name of the '1' key on the numpad.static final String
The formal name of the '2' key on the numpad.static final String
The formal name of the '3' key on the numpad.static final String
The formal name of the '4' key on the numpad.static final String
The formal name of the '5' key on the numpad.static final String
The formal name of the '6' key on the numpad.static final String
The formal name of the '7' key on the numpad.static final String
The formal name of the '8' key on the numpad.static final String
The formal name of the '9' key on the numpad.static final String
The formal name of the 'Add' key on the numpad.static final String
The formal name of the 'Decimal' key on the numpad.static final String
The formal name of the 'Divide' key on the numpad.static final String
The formal name of the 'Enter' key on the numpad.static final String
The formal name of the '=' key on the numpad.static final String
The formal name of the 'Multiply' key on the numpad.static final String
The formal name of the 'Subtract' key on the numpad.static final String
The formal name of the 'Page Down' key.static final String
The formal name of the 'Page Up' key.static final String
The formal name for the 'Pause' key.static final String
The formal name for the 'Print Screen' key.static final String
An alternative name for the enter key.static final String
The formal name for the 'Scroll Lock' key.static final String
The formal name of the 'Shift' key.static final String
The formal name of the space (U+0020) key.static final String
The formal name of the tab (U+0009) key.static final String
The formal name of the vertical tab (U+000B) key. -
Method Summary
Modifier and TypeMethodDescriptionint
formalKeyLookup
(String name) Looks up a single natural key by its formal name, and returns the integer representation for this natural keyformalKeyLookupInteger
(String name) Looks up a single natural key by its formal name, and returns the integer representation for this natural keyint
formalModifierLookup
(String name) Looks up a single modifier key by its formal name, and returns the integer representation for this modifier keyformalNameLookup
(int key) Looks up a key value, and returns the formal string representation for that keyint
getAlt()
Returns the integer representation of the ALT key.int
Returns the integer representation of the COMMAND key.int
getCtrl()
Returns the integer representation of the CTRL key.int
getShift()
Returns the integer representation of the SHIFT key.boolean
isModifierKey
(int key) Returns whether the given key is a modifier key.
-
Field Details
-
ALT_NAME
The formal name of the 'Alt' key.- See Also:
-
ARROW_DOWN_NAME
The formal name of the 'Arrow Down' key.- See Also:
-
ARROW_LEFT_NAME
The formal name of the 'Arrow Left' key.- See Also:
-
ARROW_RIGHT_NAME
The formal name of the 'Arrow Right' key.- See Also:
-
ARROW_UP_NAME
The formal name of the 'Arrow Up' key.- See Also:
-
BACKSPACE_NAME
An alternate name for the backspace key.- See Also:
-
BREAK_NAME
The formal name for the 'Break' key.- See Also:
-
BS_NAME
The formal name of the backspace key.- See Also:
-
CAPS_LOCK_NAME
The formal name for the 'Caps Lock' key.- See Also:
-
COMMAND_NAME
The formal name of the 'Command' key.- See Also:
-
CR_NAME
The formal name of the carriage return (U+000D)- See Also:
-
CTRL_NAME
The formal name of the 'Ctrl' key.- See Also:
-
DEL_NAME
The formal name of the delete (U+007F) key- See Also:
-
DELETE_NAME
An alternative name for the delete key.- See Also:
-
END_NAME
The formal name of the 'End' key.- See Also:
-
ENTER_NAME
An alternative name for the enter key.- See Also:
-
ESC_NAME
The formal name of the escape (U+001B) key.- See Also:
-
ESCAPE_NAME
An alternative name for the escape key.- See Also:
-
F1_NAME
The formal name of the 'F1' key.- See Also:
-
F10_NAME
The formal name of the 'F10' key.- See Also:
-
F11_NAME
The formal name of the 'F11' key.- See Also:
-
F12_NAME
The formal name of the 'F12' key.- See Also:
-
F13_NAME
The formal name of the 'F13' key.- See Also:
-
F14_NAME
The formal name of the 'F14' key.- See Also:
-
F15_NAME
The formal name of the 'F15' key.- See Also:
-
F16_NAME
The formal name of the 'F16' key.- Since:
- 3.6
- See Also:
-
F17_NAME
The formal name of the 'F17' key.- Since:
- 3.6
- See Also:
-
F18_NAME
The formal name of the 'F18' key.- Since:
- 3.6
- See Also:
-
F19_NAME
The formal name of the 'F19' key.- Since:
- 3.6
- See Also:
-
F20_NAME
The formal name of the 'F20' key.- Since:
- 3.6
- See Also:
-
F2_NAME
The formal name of the 'F2' key.- See Also:
-
F3_NAME
The formal name of the 'F3' key.- See Also:
-
F4_NAME
The formal name of the 'F4' key.- See Also:
-
F5_NAME
The formal name of the 'F5' key.- See Also:
-
F6_NAME
The formal name of the 'F6' key.- See Also:
-
F7_NAME
The formal name of the 'F7' key.- See Also:
-
F8_NAME
The formal name of the 'F8' key.- See Also:
-
F9_NAME
The formal name of the 'F9' key.- See Also:
-
FF_NAME
The formal name of the form feed (U+000C) key.- See Also:
-
HOME_NAME
The formal name of the 'Home' key.- See Also:
-
INSERT_NAME
The formal name of the 'Insert' key.- See Also:
-
LF_NAME
The formal name of the line feed (U+000A) key.- See Also:
-
M1_NAME
The formal name of the 'M1' key.- See Also:
-
M2_NAME
The formal name of the 'M2' key.- See Also:
-
M3_NAME
The formal name of the 'M3' key.- See Also:
-
M4_NAME
The formal name of the 'M4' key.- See Also:
-
NUL_NAME
The formal name of the null (U+0000) key.- See Also:
-
NUM_LOCK_NAME
The formal name of the 'NumLock' key.- See Also:
-
NUMPAD_0_NAME
The formal name of the '0' key on the numpad.- See Also:
-
NUMPAD_1_NAME
The formal name of the '1' key on the numpad.- See Also:
-
NUMPAD_2_NAME
The formal name of the '2' key on the numpad.- See Also:
-
NUMPAD_3_NAME
The formal name of the '3' key on the numpad.- See Also:
-
NUMPAD_4_NAME
The formal name of the '4' key on the numpad.- See Also:
-
NUMPAD_5_NAME
The formal name of the '5' key on the numpad.- See Also:
-
NUMPAD_6_NAME
The formal name of the '6' key on the numpad.- See Also:
-
NUMPAD_7_NAME
The formal name of the '7' key on the numpad.- See Also:
-
NUMPAD_8_NAME
The formal name of the '8' key on the numpad.- See Also:
-
NUMPAD_9_NAME
The formal name of the '9' key on the numpad.- See Also:
-
NUMPAD_ADD_NAME
The formal name of the 'Add' key on the numpad.- See Also:
-
NUMPAD_DECIMAL_NAME
The formal name of the 'Decimal' key on the numpad.- See Also:
-
NUMPAD_DIVIDE_NAME
The formal name of the 'Divide' key on the numpad.- See Also:
-
NUMPAD_ENTER_NAME
The formal name of the 'Enter' key on the numpad.- See Also:
-
NUMPAD_EQUAL_NAME
The formal name of the '=' key on the numpad.- See Also:
-
NUMPAD_MULTIPLY_NAME
The formal name of the 'Multiply' key on the numpad.- See Also:
-
NUMPAD_SUBTRACT_NAME
The formal name of the 'Subtract' key on the numpad.- See Also:
-
PAGE_DOWN_NAME
The formal name of the 'Page Down' key.- See Also:
-
PAGE_UP_NAME
The formal name of the 'Page Up' key.- See Also:
-
PAUSE_NAME
The formal name for the 'Pause' key.- See Also:
-
PRINT_SCREEN_NAME
The formal name for the 'Print Screen' key.- See Also:
-
RETURN_NAME
An alternative name for the enter key.- See Also:
-
SCROLL_LOCK_NAME
The formal name for the 'Scroll Lock' key.- See Also:
-
SHIFT_NAME
The formal name of the 'Shift' key.- See Also:
-
SPACE_NAME
The formal name of the space (U+0020) key.- See Also:
-
TAB_NAME
The formal name of the tab (U+0009) key.- See Also:
-
VT_NAME
The formal name of the vertical tab (U+000B) key.- See Also:
-
-
Method Details
-
formalKeyLookup
Looks up a single natural key by its formal name, and returns the integer representation for this natural key- Parameters:
name
- The formal name of the natural key to look-up; must not benull
.- Returns:
- The integer representation of this key. If the natural key cannot
be found, then this method returns
0
.
-
formalKeyLookupInteger
Looks up a single natural key by its formal name, and returns the integer representation for this natural key- Parameters:
name
- The formal name of the natural key to look-up; must not benull
.- Returns:
- The integer representation of this key. If the natural key cannot
be found, then this method returns
0
.
-
formalModifierLookup
Looks up a single modifier key by its formal name, and returns the integer representation for this modifier key- Parameters:
name
- The formal name of the modifier key to look-up; must not benull
.- Returns:
- The integer representation of this key. If the modifier key
cannot be found, then this method returns
0
.
-
formalNameLookup
Looks up a key value, and returns the formal string representation for that key- Parameters:
key
- The key to look-up.- Returns:
- The formal string representation of this key. If this key cannot be found, then it is simply the character corresponding to that integer value.
-
getAlt
int getAlt()Returns the integer representation of the ALT key.- Returns:
- The ALT key
-
getCommand
int getCommand()Returns the integer representation of the COMMAND key.- Returns:
- The COMMAND key
-
getCtrl
int getCtrl()Returns the integer representation of the CTRL key.- Returns:
- The CTRL key
-
getShift
int getShift()Returns the integer representation of the SHIFT key.- Returns:
- The SHIFT key
-
isModifierKey
boolean isModifierKey(int key) Returns whether the given key is a modifier key.- Parameters:
key
- The integer value of the key to check.- Returns:
true
if the key is one of the modifier keys;false
otherwise.
-