KeyCodes class
Contains the native key codes previously defined in {@link com.google.gwt.user.client.ui.KeyboardListener}. When converting keyboard listener instances, developers can use the following static import to access these constants:
import static com.google.gwt.event.dom.client.KeyCodes.*;
These constants are defined with an int data type in order to be compatible with the constants defined in {@link com.google.gwt.user.client.ui.KeyboardListener}.
class KeyCodes { /** * Alt key code. */ static const int KEY_ALT = 18; /** * Backspace key code. */ static const int KEY_BACKSPACE = 8; /** * Control key code. */ static const int KEY_CTRL = 17; /** * Delete key code. */ static const int KEY_DELETE = 46; /** * Down arrow code. */ static const int KEY_DOWN = 40; /** * End key code. */ static const int KEY_END = 35; /** * Enter key code. */ static const int KEY_ENTER = 13; /** * Escape key code. */ static const int KEY_ESCAPE = 27; /** * Home key code. */ static const int KEY_HOME = 36; /** * Left key code. */ static const int KEY_LEFT = 37; /** * Page down key code. */ static const int KEY_PAGEDOWN = 34; /** * Page up key code. */ static const int KEY_PAGEUP = 33; /** * Right arrow key code. */ static const int KEY_RIGHT = 39; /** * Shift key code. */ static const int KEY_SHIFT = 16; /** * Tab key code. */ static const int KEY_TAB = 9; /** * Up Arrow key code. */ static const int KEY_UP = 38; }
Static Properties
const int KEY_ALT #
Alt key code.
static const int KEY_ALT = 18
const int KEY_BACKSPACE #
Backspace key code.
static const int KEY_BACKSPACE = 8
const int KEY_CTRL #
Control key code.
static const int KEY_CTRL = 17
const int KEY_DELETE #
Delete key code.
static const int KEY_DELETE = 46
const int KEY_DOWN #
Down arrow code.
static const int KEY_DOWN = 40
const int KEY_END #
End key code.
static const int KEY_END = 35
const int KEY_ENTER #
Enter key code.
static const int KEY_ENTER = 13
const int KEY_ESCAPE #
Escape key code.
static const int KEY_ESCAPE = 27
const int KEY_HOME #
Home key code.
static const int KEY_HOME = 36
const int KEY_LEFT #
Left key code.
static const int KEY_LEFT = 37
const int KEY_PAGEDOWN #
Page down key code.
static const int KEY_PAGEDOWN = 34
const int KEY_PAGEUP #
Page up key code.
static const int KEY_PAGEUP = 33
const int KEY_RIGHT #
Right arrow key code.
static const int KEY_RIGHT = 39
const int KEY_SHIFT #
Shift key code.
static const int KEY_SHIFT = 16
const int KEY_TAB #
Tab key code.
static const int KEY_TAB = 9
const int KEY_UP #
Up Arrow key code.
static const int KEY_UP = 38