Package org.eclipse.jface.bindings.keys
Interface IKeyLookup
-
- All Known Implementing Classes:
SWTKeyLookup
public interface IKeyLookupA facilitiy for converting the formal representation for key strokes (i.e., used in persistence) into real key stroke instances.
- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALT_NAMEThe formal name of the 'Alt' key.static java.lang.StringARROW_DOWN_NAMEThe formal name of the 'Arrow Down' key.static java.lang.StringARROW_LEFT_NAMEThe formal name of the 'Arrow Left' key.static java.lang.StringARROW_RIGHT_NAMEThe formal name of the 'Arrow Right' key.static java.lang.StringARROW_UP_NAMEThe formal name of the 'Arrow Up' key.static java.lang.StringBACKSPACE_NAMEAn alternate name for the backspace key.static java.lang.StringBREAK_NAMEThe formal name for the 'Break' key.static java.lang.StringBS_NAMEThe formal name of the backspace key.static java.lang.StringCAPS_LOCK_NAMEThe formal name for the 'Caps Lock' key.static java.lang.StringCOMMAND_NAMEThe formal name of the 'Command' key.static java.lang.StringCR_NAMEThe formal name of the carriage return (U+000D)static java.lang.StringCTRL_NAMEThe formal name of the 'Ctrl' key.static java.lang.StringDEL_NAMEThe formal name of the delete (U+007F) keystatic java.lang.StringDELETE_NAMEAn alternative name for the delete key.static java.lang.StringEND_NAMEThe formal name of the 'End' key.static java.lang.StringENTER_NAMEAn alternative name for the enter key.static java.lang.StringESC_NAMEThe formal name of the escape (U+001B) key.static java.lang.StringESCAPE_NAMEAn alternative name for the escape key.static java.lang.StringF1_NAMEThe formal name of the 'F1' key.static java.lang.StringF10_NAMEThe formal name of the 'F10' key.static java.lang.StringF11_NAMEThe formal name of the 'F11' key.static java.lang.StringF12_NAMEThe formal name of the 'F12' key.static java.lang.StringF13_NAMEThe formal name of the 'F13' key.static java.lang.StringF14_NAMEThe formal name of the 'F14' key.static java.lang.StringF15_NAMEThe formal name of the 'F15' key.static java.lang.StringF16_NAMEThe formal name of the 'F16' key.static java.lang.StringF17_NAMEThe formal name of the 'F17' key.static java.lang.StringF18_NAMEThe formal name of the 'F18' key.static java.lang.StringF19_NAMEThe formal name of the 'F19' key.static java.lang.StringF2_NAMEThe formal name of the 'F2' key.static java.lang.StringF20_NAMEThe formal name of the 'F20' key.static java.lang.StringF3_NAMEThe formal name of the 'F3' key.static java.lang.StringF4_NAMEThe formal name of the 'F4' key.static java.lang.StringF5_NAMEThe formal name of the 'F5' key.static java.lang.StringF6_NAMEThe formal name of the 'F6' key.static java.lang.StringF7_NAMEThe formal name of the 'F7' key.static java.lang.StringF8_NAMEThe formal name of the 'F8' key.static java.lang.StringF9_NAMEThe formal name of the 'F9' key.static java.lang.StringFF_NAMEThe formal name of the form feed (U+000C) key.static java.lang.StringHOME_NAMEThe formal name of the 'Home' key.static java.lang.StringINSERT_NAMEThe formal name of the 'Insert' key.static java.lang.StringLF_NAMEThe formal name of the line feed (U+000A) key.static java.lang.StringM1_NAMEThe formal name of the 'M1' key.static java.lang.StringM2_NAMEThe formal name of the 'M2' key.static java.lang.StringM3_NAMEThe formal name of the 'M3' key.static java.lang.StringM4_NAMEThe formal name of the 'M4' key.static java.lang.StringNUL_NAMEThe formal name of the null (U+0000) key.static java.lang.StringNUM_LOCK_NAMEThe formal name of the 'NumLock' key.static java.lang.StringNUMPAD_0_NAMEThe formal name of the '0' key on the numpad.static java.lang.StringNUMPAD_1_NAMEThe formal name of the '1' key on the numpad.static java.lang.StringNUMPAD_2_NAMEThe formal name of the '2' key on the numpad.static java.lang.StringNUMPAD_3_NAMEThe formal name of the '3' key on the numpad.static java.lang.StringNUMPAD_4_NAMEThe formal name of the '4' key on the numpad.static java.lang.StringNUMPAD_5_NAMEThe formal name of the '5' key on the numpad.static java.lang.StringNUMPAD_6_NAMEThe formal name of the '6' key on the numpad.static java.lang.StringNUMPAD_7_NAMEThe formal name of the '7' key on the numpad.static java.lang.StringNUMPAD_8_NAMEThe formal name of the '8' key on the numpad.static java.lang.StringNUMPAD_9_NAMEThe formal name of the '9' key on the numpad.static java.lang.StringNUMPAD_ADD_NAMEThe formal name of the 'Add' key on the numpad.static java.lang.StringNUMPAD_DECIMAL_NAMEThe formal name of the 'Decimal' key on the numpad.static java.lang.StringNUMPAD_DIVIDE_NAMEThe formal name of the 'Divide' key on the numpad.static java.lang.StringNUMPAD_ENTER_NAMEThe formal name of the 'Enter' key on the numpad.static java.lang.StringNUMPAD_EQUAL_NAMEThe formal name of the '=' key on the numpad.static java.lang.StringNUMPAD_MULTIPLY_NAMEThe formal name of the 'Multiply' key on the numpad.static java.lang.StringNUMPAD_SUBTRACT_NAMEThe formal name of the 'Subtract' key on the numpad.static java.lang.StringPAGE_DOWN_NAMEThe formal name of the 'Page Down' key.static java.lang.StringPAGE_UP_NAMEThe formal name of the 'Page Up' key.static java.lang.StringPAUSE_NAMEThe formal name for the 'Pause' key.static java.lang.StringPRINT_SCREEN_NAMEThe formal name for the 'Print Screen' key.static java.lang.StringRETURN_NAMEAn alternative name for the enter key.static java.lang.StringSCROLL_LOCK_NAMEThe formal name for the 'Scroll Lock' key.static java.lang.StringSHIFT_NAMEThe formal name of the 'Shift' key.static java.lang.StringSPACE_NAMEThe formal name of the space (U+0020) key.static java.lang.StringTAB_NAMEThe formal name of the tab (U+0009) key.static java.lang.StringVT_NAMEThe formal name of the vertical tab (U+000B) key.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intformalKeyLookup(java.lang.String name)Looks up a single natural key by its formal name, and returns the integer representation for this natural keyjava.lang.IntegerformalKeyLookupInteger(java.lang.String name)Looks up a single natural key by its formal name, and returns the integer representation for this natural keyintformalModifierLookup(java.lang.String name)Looks up a single modifier key by its formal name, and returns the integer representation for this modifier keyjava.lang.StringformalNameLookup(int key)Looks up a key value, and returns the formal string representation for that keyintgetAlt()Returns the integer representation of the ALT key.intgetCommand()Returns the integer representation of the COMMAND key.intgetCtrl()Returns the integer representation of the CTRL key.intgetShift()Returns the integer representation of the SHIFT key.booleanisModifierKey(int key)Returns whether the given key is a modifier key.
-
-
-
Field Detail
-
ALT_NAME
static final java.lang.String ALT_NAME
The formal name of the 'Alt' key.- See Also:
- Constant Field Values
-
ARROW_DOWN_NAME
static final java.lang.String ARROW_DOWN_NAME
The formal name of the 'Arrow Down' key.- See Also:
- Constant Field Values
-
ARROW_LEFT_NAME
static final java.lang.String ARROW_LEFT_NAME
The formal name of the 'Arrow Left' key.- See Also:
- Constant Field Values
-
ARROW_RIGHT_NAME
static final java.lang.String ARROW_RIGHT_NAME
The formal name of the 'Arrow Right' key.- See Also:
- Constant Field Values
-
ARROW_UP_NAME
static final java.lang.String ARROW_UP_NAME
The formal name of the 'Arrow Up' key.- See Also:
- Constant Field Values
-
BACKSPACE_NAME
static final java.lang.String BACKSPACE_NAME
An alternate name for the backspace key.- See Also:
- Constant Field Values
-
BREAK_NAME
static final java.lang.String BREAK_NAME
The formal name for the 'Break' key.- See Also:
- Constant Field Values
-
BS_NAME
static final java.lang.String BS_NAME
The formal name of the backspace key.- See Also:
- Constant Field Values
-
CAPS_LOCK_NAME
static final java.lang.String CAPS_LOCK_NAME
The formal name for the 'Caps Lock' key.- See Also:
- Constant Field Values
-
COMMAND_NAME
static final java.lang.String COMMAND_NAME
The formal name of the 'Command' key.- See Also:
- Constant Field Values
-
CR_NAME
static final java.lang.String CR_NAME
The formal name of the carriage return (U+000D)- See Also:
- Constant Field Values
-
CTRL_NAME
static final java.lang.String CTRL_NAME
The formal name of the 'Ctrl' key.- See Also:
- Constant Field Values
-
DEL_NAME
static final java.lang.String DEL_NAME
The formal name of the delete (U+007F) key- See Also:
- Constant Field Values
-
DELETE_NAME
static final java.lang.String DELETE_NAME
An alternative name for the delete key.- See Also:
- Constant Field Values
-
END_NAME
static final java.lang.String END_NAME
The formal name of the 'End' key.- See Also:
- Constant Field Values
-
ENTER_NAME
static final java.lang.String ENTER_NAME
An alternative name for the enter key.- See Also:
- Constant Field Values
-
ESC_NAME
static final java.lang.String ESC_NAME
The formal name of the escape (U+001B) key.- See Also:
- Constant Field Values
-
ESCAPE_NAME
static final java.lang.String ESCAPE_NAME
An alternative name for the escape key.- See Also:
- Constant Field Values
-
F1_NAME
static final java.lang.String F1_NAME
The formal name of the 'F1' key.- See Also:
- Constant Field Values
-
F10_NAME
static final java.lang.String F10_NAME
The formal name of the 'F10' key.- See Also:
- Constant Field Values
-
F11_NAME
static final java.lang.String F11_NAME
The formal name of the 'F11' key.- See Also:
- Constant Field Values
-
F12_NAME
static final java.lang.String F12_NAME
The formal name of the 'F12' key.- See Also:
- Constant Field Values
-
F13_NAME
static final java.lang.String F13_NAME
The formal name of the 'F13' key.- See Also:
- Constant Field Values
-
F14_NAME
static final java.lang.String F14_NAME
The formal name of the 'F14' key.- See Also:
- Constant Field Values
-
F15_NAME
static final java.lang.String F15_NAME
The formal name of the 'F15' key.- See Also:
- Constant Field Values
-
F16_NAME
static final java.lang.String F16_NAME
The formal name of the 'F16' key.- Since:
- 3.6
- See Also:
- Constant Field Values
-
F17_NAME
static final java.lang.String F17_NAME
The formal name of the 'F17' key.- Since:
- 3.6
- See Also:
- Constant Field Values
-
F18_NAME
static final java.lang.String F18_NAME
The formal name of the 'F18' key.- Since:
- 3.6
- See Also:
- Constant Field Values
-
F19_NAME
static final java.lang.String F19_NAME
The formal name of the 'F19' key.- Since:
- 3.6
- See Also:
- Constant Field Values
-
F20_NAME
static final java.lang.String F20_NAME
The formal name of the 'F20' key.- Since:
- 3.6
- See Also:
- Constant Field Values
-
F2_NAME
static final java.lang.String F2_NAME
The formal name of the 'F2' key.- See Also:
- Constant Field Values
-
F3_NAME
static final java.lang.String F3_NAME
The formal name of the 'F3' key.- See Also:
- Constant Field Values
-
F4_NAME
static final java.lang.String F4_NAME
The formal name of the 'F4' key.- See Also:
- Constant Field Values
-
F5_NAME
static final java.lang.String F5_NAME
The formal name of the 'F5' key.- See Also:
- Constant Field Values
-
F6_NAME
static final java.lang.String F6_NAME
The formal name of the 'F6' key.- See Also:
- Constant Field Values
-
F7_NAME
static final java.lang.String F7_NAME
The formal name of the 'F7' key.- See Also:
- Constant Field Values
-
F8_NAME
static final java.lang.String F8_NAME
The formal name of the 'F8' key.- See Also:
- Constant Field Values
-
F9_NAME
static final java.lang.String F9_NAME
The formal name of the 'F9' key.- See Also:
- Constant Field Values
-
FF_NAME
static final java.lang.String FF_NAME
The formal name of the form feed (U+000C) key.- See Also:
- Constant Field Values
-
HOME_NAME
static final java.lang.String HOME_NAME
The formal name of the 'Home' key.- See Also:
- Constant Field Values
-
INSERT_NAME
static final java.lang.String INSERT_NAME
The formal name of the 'Insert' key.- See Also:
- Constant Field Values
-
LF_NAME
static final java.lang.String LF_NAME
The formal name of the line feed (U+000A) key.- See Also:
- Constant Field Values
-
M1_NAME
static final java.lang.String M1_NAME
The formal name of the 'M1' key.- See Also:
- Constant Field Values
-
M2_NAME
static final java.lang.String M2_NAME
The formal name of the 'M2' key.- See Also:
- Constant Field Values
-
M3_NAME
static final java.lang.String M3_NAME
The formal name of the 'M3' key.- See Also:
- Constant Field Values
-
M4_NAME
static final java.lang.String M4_NAME
The formal name of the 'M4' key.- See Also:
- Constant Field Values
-
NUL_NAME
static final java.lang.String NUL_NAME
The formal name of the null (U+0000) key.- See Also:
- Constant Field Values
-
NUM_LOCK_NAME
static final java.lang.String NUM_LOCK_NAME
The formal name of the 'NumLock' key.- See Also:
- Constant Field Values
-
NUMPAD_0_NAME
static final java.lang.String NUMPAD_0_NAME
The formal name of the '0' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_1_NAME
static final java.lang.String NUMPAD_1_NAME
The formal name of the '1' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_2_NAME
static final java.lang.String NUMPAD_2_NAME
The formal name of the '2' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_3_NAME
static final java.lang.String NUMPAD_3_NAME
The formal name of the '3' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_4_NAME
static final java.lang.String NUMPAD_4_NAME
The formal name of the '4' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_5_NAME
static final java.lang.String NUMPAD_5_NAME
The formal name of the '5' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_6_NAME
static final java.lang.String NUMPAD_6_NAME
The formal name of the '6' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_7_NAME
static final java.lang.String NUMPAD_7_NAME
The formal name of the '7' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_8_NAME
static final java.lang.String NUMPAD_8_NAME
The formal name of the '8' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_9_NAME
static final java.lang.String NUMPAD_9_NAME
The formal name of the '9' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_ADD_NAME
static final java.lang.String NUMPAD_ADD_NAME
The formal name of the 'Add' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_DECIMAL_NAME
static final java.lang.String NUMPAD_DECIMAL_NAME
The formal name of the 'Decimal' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_DIVIDE_NAME
static final java.lang.String NUMPAD_DIVIDE_NAME
The formal name of the 'Divide' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_ENTER_NAME
static final java.lang.String NUMPAD_ENTER_NAME
The formal name of the 'Enter' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_EQUAL_NAME
static final java.lang.String NUMPAD_EQUAL_NAME
The formal name of the '=' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_MULTIPLY_NAME
static final java.lang.String NUMPAD_MULTIPLY_NAME
The formal name of the 'Multiply' key on the numpad.- See Also:
- Constant Field Values
-
NUMPAD_SUBTRACT_NAME
static final java.lang.String NUMPAD_SUBTRACT_NAME
The formal name of the 'Subtract' key on the numpad.- See Also:
- Constant Field Values
-
PAGE_DOWN_NAME
static final java.lang.String PAGE_DOWN_NAME
The formal name of the 'Page Down' key.- See Also:
- Constant Field Values
-
PAGE_UP_NAME
static final java.lang.String PAGE_UP_NAME
The formal name of the 'Page Up' key.- See Also:
- Constant Field Values
-
PAUSE_NAME
static final java.lang.String PAUSE_NAME
The formal name for the 'Pause' key.- See Also:
- Constant Field Values
-
PRINT_SCREEN_NAME
static final java.lang.String PRINT_SCREEN_NAME
The formal name for the 'Print Screen' key.- See Also:
- Constant Field Values
-
RETURN_NAME
static final java.lang.String RETURN_NAME
An alternative name for the enter key.- See Also:
- Constant Field Values
-
SCROLL_LOCK_NAME
static final java.lang.String SCROLL_LOCK_NAME
The formal name for the 'Scroll Lock' key.- See Also:
- Constant Field Values
-
SHIFT_NAME
static final java.lang.String SHIFT_NAME
The formal name of the 'Shift' key.- See Also:
- Constant Field Values
-
SPACE_NAME
static final java.lang.String SPACE_NAME
The formal name of the space (U+0020) key.- See Also:
- Constant Field Values
-
TAB_NAME
static final java.lang.String TAB_NAME
The formal name of the tab (U+0009) key.- See Also:
- Constant Field Values
-
VT_NAME
static final java.lang.String VT_NAME
The formal name of the vertical tab (U+000B) key.- See Also:
- Constant Field Values
-
-
Method Detail
-
formalKeyLookup
int formalKeyLookup(java.lang.String name)
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
java.lang.Integer formalKeyLookupInteger(java.lang.String name)
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
int formalModifierLookup(java.lang.String name)
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
java.lang.String formalNameLookup(int key)
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:
trueif the key is one of the modifier keys;falseotherwise.
-
-