Eclipse Platform
Release 3.1

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
static String ALT_NAME
          The formal name of the 'Alt' key.
static String ARROW_DOWN_NAME
          The formal name of the 'Arrow Down' key.
static String ARROW_LEFT_NAME
          The formal name of the 'Arrow Left' key.
static String ARROW_RIGHT_NAME
          The formal name of the 'Arrow Right' key.
static String ARROW_UP_NAME
          The formal name of the 'Arrow Up' key.
static String BACKSPACE_NAME
          An alternate name for the backspace key.
static String BREAK_NAME
          The formal name for the 'Break' key.
static String BS_NAME
          The formal name of the backspace key.
static String CAPS_LOCK_NAME
          The formal name for the 'Caps Lock' key.
static String COMMAND_NAME
          The formal name of the 'Command' key.
static String CR_NAME
          The formal name of the carriage return (U+000D)
static String CTRL_NAME
          The formal name of the 'Ctrl' key.
static String DEL_NAME
          The formal name of the delete (U+007F) key
static String DELETE_NAME
          An alternative name for the delete key.
static String END_NAME
          The formal name of the 'End' key.
static String ENTER_NAME
          An alternative name for the enter key.
static String ESC_NAME
          The formal name of the escape (U+001B) key.
static String ESCAPE_NAME
          An alternative name for the escape key.
static String F1_NAME
          The formal name of the 'F1' key.
static String F10_NAME
          The formal name of the 'F10' key.
static String F11_NAME
          The formal name of the 'F11' key.
static String F12_NAME
          The formal name of the 'F12' key.
static String F13_NAME
          The formal name of the 'F13' key.
static String F14_NAME
          The formal name of the 'F14' key.
static String F15_NAME
          The formal name of the 'F15' key.
static String F2_NAME
          The formal name of the 'F2' key.
static String F3_NAME
          The formal name of the 'F3' key.
static String F4_NAME
          The formal name of the 'F4' key.
static String F5_NAME
          The formal name of the 'F5' key.
static String F6_NAME
          The formal name of the 'F6' key.
static String F7_NAME
          The formal name of the 'F7' key.
static String F8_NAME
          The formal name of the 'F8' key.
static String F9_NAME
          The formal name of the 'F9' key.
static String FF_NAME
          The formal name of the form feed (U+000C) key.
static String HOME_NAME
          The formal name of the 'Home' key.
static String INSERT_NAME
          The formal name of the 'Insert' key.
static String LF_NAME
          The formal name of the line feed (U+000A) key.
static String M1_NAME
          The formal name of the 'M1' key.
static String M2_NAME
          The formal name of the 'M2' key.
static String M3_NAME
          The formal name of the 'M3' key.
static String M4_NAME
          The formal name of the 'M4' key.
static String NUL_NAME
          The formal name of the null (U+0000) key.
static String NUM_LOCK_NAME
          The formal name of the 'NumLock' key.
static String NUMPAD_0_NAME
          The formal name of the '0' key on the numpad.
static String NUMPAD_1_NAME
          The formal name of the '1' key on the numpad.
static String NUMPAD_2_NAME
          The formal name of the '2' key on the numpad.
static String NUMPAD_3_NAME
          The formal name of the '3' key on the numpad.
static String NUMPAD_4_NAME
          The formal name of the '4' key on the numpad.
static String NUMPAD_5_NAME
          The formal name of the '5' key on the numpad.
static String NUMPAD_6_NAME
          The formal name of the '6' key on the numpad.
static String NUMPAD_7_NAME
          The formal name of the '7' key on the numpad.
static String NUMPAD_8_NAME
          The formal name of the '8' key on the numpad.
static String NUMPAD_9_NAME
          The formal name of the '9' key on the numpad.
static String NUMPAD_ADD_NAME
          The formal name of the 'Add' key on the numpad.
static String NUMPAD_DECIMAL_NAME
          The formal name of the 'Decimal' key on the numpad.
static String NUMPAD_DIVIDE_NAME
          The formal name of the 'Divide' key on the numpad.
static String NUMPAD_ENTER_NAME
          The formal name of the 'Enter' key on the numpad.
static String NUMPAD_EQUAL_NAME
          The formal name of the '=' key on the numpad.
static String NUMPAD_MULTIPLY_NAME
          The formal name of the 'Multiply' key on the numpad.
static String NUMPAD_SUBTRACT_NAME
          The formal name of the 'Subtract' key on the numpad.
static String PAGE_DOWN_NAME
          The formal name of the 'Page Down' key.
static String PAGE_UP_NAME
          The formal name of the 'Page Up' key.
static String PAUSE_NAME
          The formal name for the 'Pause' key.
static String PRINT_SCREEN_NAME
          The formal name for the 'Print Screen' key.
static String RETURN_NAME
          An alternative name for the enter key.
static String SCROLL_LOCK_NAME
          The formal name for the 'Scroll Lock' key.
static String SHIFT_NAME
          The formal name of the 'Shift' key.
static String SPACE_NAME
          The formal name of the space (U+0020) key.
static String TAB_NAME
          The formal name of the tab (U+0009) key.
static String VT_NAME
          The formal name of the vertical tab (U+000B) key.
 
Method Summary
 int formalKeyLookup(String name)
          Looks up a single natural key by its formal name, and returns the integer representation for this natural key
 Integer formalKeyLookupInteger(String name)
          Looks up a single natural key by its formal name, and returns the integer representation for this natural key
 int formalModifierLookup(String name)
          Looks up a single modifier key by its formal name, and returns the integer representation for this modifier key
 String formalNameLookup(int key)
          Looks up a key value, and returns the formal string representation for that key
 int getAlt()
          Returns the integer representation of the ALT key.
 int getCommand()
          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 Detail

ALT_NAME

public static final String ALT_NAME
The formal name of the 'Alt' key.

See Also:
Constant Field Values

ARROW_DOWN_NAME

public static final String ARROW_DOWN_NAME
The formal name of the 'Arrow Down' key.

See Also:
Constant Field Values

ARROW_LEFT_NAME

public static final String ARROW_LEFT_NAME
The formal name of the 'Arrow Left' key.

See Also:
Constant Field Values

ARROW_RIGHT_NAME

public static final String ARROW_RIGHT_NAME
The formal name of the 'Arrow Right' key.

See Also:
Constant Field Values

ARROW_UP_NAME

public static final String ARROW_UP_NAME
The formal name of the 'Arrow Up' key.

See Also:
Constant Field Values

BACKSPACE_NAME

public static final String BACKSPACE_NAME
An alternate name for the backspace key.

See Also:
Constant Field Values

BREAK_NAME

public static final String BREAK_NAME
The formal name for the 'Break' key.

See Also:
Constant Field Values

BS_NAME

public static final String BS_NAME
The formal name of the backspace key.

See Also:
Constant Field Values

CAPS_LOCK_NAME

public static final String CAPS_LOCK_NAME
The formal name for the 'Caps Lock' key.

See Also:
Constant Field Values

COMMAND_NAME

public static final String COMMAND_NAME
The formal name of the 'Command' key.

See Also:
Constant Field Values

CR_NAME

public static final String CR_NAME
The formal name of the carriage return (U+000D)

See Also:
Constant Field Values

CTRL_NAME

public static final String CTRL_NAME
The formal name of the 'Ctrl' key.

See Also:
Constant Field Values

DEL_NAME

public static final String DEL_NAME
The formal name of the delete (U+007F) key

See Also:
Constant Field Values

DELETE_NAME

public static final String DELETE_NAME
An alternative name for the delete key.

See Also:
Constant Field Values

END_NAME

public static final String END_NAME
The formal name of the 'End' key.

See Also:
Constant Field Values

ENTER_NAME

public static final String ENTER_NAME
An alternative name for the enter key.

See Also:
Constant Field Values

ESC_NAME

public static final String ESC_NAME
The formal name of the escape (U+001B) key.

See Also:
Constant Field Values

ESCAPE_NAME

public static final String ESCAPE_NAME
An alternative name for the escape key.

See Also:
Constant Field Values

F1_NAME

public static final String F1_NAME
The formal name of the 'F1' key.

See Also:
Constant Field Values

F10_NAME

public static final String F10_NAME
The formal name of the 'F10' key.

See Also:
Constant Field Values

F11_NAME

public static final String F11_NAME
The formal name of the 'F11' key.

See Also:
Constant Field Values

F12_NAME

public static final String F12_NAME
The formal name of the 'F12' key.

See Also:
Constant Field Values

F13_NAME

public static final String F13_NAME
The formal name of the 'F13' key.

See Also:
Constant Field Values

F14_NAME

public static final String F14_NAME
The formal name of the 'F14' key.

See Also:
Constant Field Values

F15_NAME

public static final String F15_NAME
The formal name of the 'F15' key.

See Also:
Constant Field Values

F2_NAME

public static final String F2_NAME
The formal name of the 'F2' key.

See Also:
Constant Field Values

F3_NAME

public static final String F3_NAME
The formal name of the 'F3' key.

See Also:
Constant Field Values

F4_NAME

public static final String F4_NAME
The formal name of the 'F4' key.

See Also:
Constant Field Values

F5_NAME

public static final String F5_NAME
The formal name of the 'F5' key.

See Also:
Constant Field Values

F6_NAME

public static final String F6_NAME
The formal name of the 'F6' key.

See Also:
Constant Field Values

F7_NAME

public static final String F7_NAME
The formal name of the 'F7' key.

See Also:
Constant Field Values

F8_NAME

public static final String F8_NAME
The formal name of the 'F8' key.

See Also:
Constant Field Values

F9_NAME

public static final String F9_NAME
The formal name of the 'F9' key.

See Also:
Constant Field Values

FF_NAME

public static final String FF_NAME
The formal name of the form feed (U+000C) key.

See Also:
Constant Field Values

HOME_NAME

public static final String HOME_NAME
The formal name of the 'Home' key.

See Also:
Constant Field Values

INSERT_NAME

public static final String INSERT_NAME
The formal name of the 'Insert' key.

See Also:
Constant Field Values

LF_NAME

public static final String LF_NAME
The formal name of the line feed (U+000A) key.

See Also:
Constant Field Values

M1_NAME

public static final String M1_NAME
The formal name of the 'M1' key.

See Also:
Constant Field Values

M2_NAME

public static final String M2_NAME
The formal name of the 'M2' key.

See Also:
Constant Field Values

M3_NAME

public static final String M3_NAME
The formal name of the 'M3' key.

See Also:
Constant Field Values

M4_NAME

public static final String M4_NAME
The formal name of the 'M4' key.

See Also:
Constant Field Values

NUL_NAME

public static final String NUL_NAME
The formal name of the null (U+0000) key.

See Also:
Constant Field Values

NUM_LOCK_NAME

public static final String NUM_LOCK_NAME
The formal name of the 'NumLock' key.

See Also:
Constant Field Values

NUMPAD_0_NAME

public static final String NUMPAD_0_NAME
The formal name of the '0' key on the numpad.

See Also:
Constant Field Values

NUMPAD_1_NAME

public static final String NUMPAD_1_NAME
The formal name of the '1' key on the numpad.

See Also:
Constant Field Values

NUMPAD_2_NAME

public static final String NUMPAD_2_NAME
The formal name of the '2' key on the numpad.

See Also:
Constant Field Values

NUMPAD_3_NAME

public static final String NUMPAD_3_NAME
The formal name of the '3' key on the numpad.

See Also:
Constant Field Values

NUMPAD_4_NAME

public static final String NUMPAD_4_NAME
The formal name of the '4' key on the numpad.

See Also:
Constant Field Values

NUMPAD_5_NAME

public static final String NUMPAD_5_NAME
The formal name of the '5' key on the numpad.

See Also:
Constant Field Values

NUMPAD_6_NAME

public static final String NUMPAD_6_NAME
The formal name of the '6' key on the numpad.

See Also:
Constant Field Values

NUMPAD_7_NAME

public static final String NUMPAD_7_NAME
The formal name of the '7' key on the numpad.

See Also:
Constant Field Values

NUMPAD_8_NAME

public static final String NUMPAD_8_NAME
The formal name of the '8' key on the numpad.

See Also:
Constant Field Values

NUMPAD_9_NAME

public static final String NUMPAD_9_NAME
The formal name of the '9' key on the numpad.

See Also:
Constant Field Values

NUMPAD_ADD_NAME

public static final String NUMPAD_ADD_NAME
The formal name of the 'Add' key on the numpad.

See Also:
Constant Field Values

NUMPAD_DECIMAL_NAME

public static final String NUMPAD_DECIMAL_NAME
The formal name of the 'Decimal' key on the numpad.

See Also:
Constant Field Values

NUMPAD_DIVIDE_NAME

public static final String NUMPAD_DIVIDE_NAME
The formal name of the 'Divide' key on the numpad.

See Also:
Constant Field Values

NUMPAD_ENTER_NAME

public static final String NUMPAD_ENTER_NAME
The formal name of the 'Enter' key on the numpad.

See Also:
Constant Field Values

NUMPAD_EQUAL_NAME

public static final String NUMPAD_EQUAL_NAME
The formal name of the '=' key on the numpad.

See Also:
Constant Field Values

NUMPAD_MULTIPLY_NAME

public static final String NUMPAD_MULTIPLY_NAME
The formal name of the 'Multiply' key on the numpad.

See Also:
Constant Field Values

NUMPAD_SUBTRACT_NAME

public static final String NUMPAD_SUBTRACT_NAME
The formal name of the 'Subtract' key on the numpad.

See Also:
Constant Field Values

PAGE_DOWN_NAME

public static final String PAGE_DOWN_NAME
The formal name of the 'Page Down' key.

See Also:
Constant Field Values

PAGE_UP_NAME

public static final String PAGE_UP_NAME
The formal name of the 'Page Up' key.

See Also:
Constant Field Values

PAUSE_NAME

public static final String PAUSE_NAME
The formal name for the 'Pause' key.

See Also:
Constant Field Values

PRINT_SCREEN_NAME

public static final String PRINT_SCREEN_NAME
The formal name for the 'Print Screen' key.

See Also:
Constant Field Values

RETURN_NAME

public static final String RETURN_NAME
An alternative name for the enter key.

See Also:
Constant Field Values

SCROLL_LOCK_NAME

public static final String SCROLL_LOCK_NAME
The formal name for the 'Scroll Lock' key.

See Also:
Constant Field Values

SHIFT_NAME

public static final String SHIFT_NAME
The formal name of the 'Shift' key.

See Also:
Constant Field Values

SPACE_NAME

public static final String SPACE_NAME
The formal name of the space (U+0020) key.

See Also:
Constant Field Values

TAB_NAME

public static final String TAB_NAME
The formal name of the tab (U+0009) key.

See Also:
Constant Field Values

VT_NAME

public static final String VT_NAME
The formal name of the vertical tab (U+000B) key.

See Also:
Constant Field Values
Method Detail

formalKeyLookup

public int formalKeyLookup(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 be null.
Returns:
The integer representation of this key. If the natural key cannot be found, then this method returns 0.

formalKeyLookupInteger

public Integer formalKeyLookupInteger(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 be null.
Returns:
The integer representation of this key. If the natural key cannot be found, then this method returns 0.

formalModifierLookup

public int formalModifierLookup(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 be null.
Returns:
The integer representation of this key. If the modifier key cannot be found, then this method returns 0.

formalNameLookup

public 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

public int getAlt()
Returns the integer representation of the ALT key.

Returns:
The ALT key

getCommand

public int getCommand()
Returns the integer representation of the COMMAND key.

Returns:
The COMMAND key

getCtrl

public int getCtrl()
Returns the integer representation of the CTRL key.

Returns:
The CTRL key

getShift

public int getShift()
Returns the integer representation of the SHIFT key.

Returns:
The SHIFT key

isModifierKey

public 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.

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.