KeyCode class abstract
Defines the keycode values for keys that are returned by KeyboardEvent.keyCode.
Important note: There is substantial divergence in how different browsers handle keycodes and their variants in different locales/keyboard layouts. We provide these constants to help make code processing keys more readable.
Constructors
Properties
- hashCode â int
-
The hash code for this object.
no setterinherited
- runtimeType â Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) â dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) â String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) â bool -
The equality operator.
inherited
Static Methods
-
isCharacterKey(
int keyCode) â bool - Returns true if the keyCode produces a (US keyboard) character. Note: This does not (yet) cover characters on non-US keyboards (Russian, Hebrew, etc.).
Constants
- A â const int
- ALT â const int
- APOSTROPHE â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- B â const int
- BACKSLASH â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- BACKSPACE â const int
- C â const int
- CAPS_LOCK â const int
- CLOSE_SQUARE_BRACKET â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- COMMA â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- CONTEXT_MENU â const int
- CTRL â const int
- D â const int
- DASH â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- DELETE â const int
- DOWN â const int
- E â const int
- EIGHT â const int
- END â const int
- ENTER â const int
- EQUALS â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- ESC â const int
- F â const int
- F1 â const int
- F2 â const int
- F3 â const int
- F4 â const int
- F5 â const int
- F6 â const int
- F7 â const int
- F8 â const int
- F9 â const int
- F10 â const int
- F11 â const int
- F12 â const int
- FF_EQUALS â const int
- FF_SEMICOLON â const int
- FIRST_MEDIA_KEY â const int
- FIVE â const int
- FOUR â const int
- G â const int
- H â const int
- HOME â const int
- I â const int
- INSERT â const int
- J â const int
- K â const int
- L â const int
- LAST_MEDIA_KEY â const int
- LEFT â const int
- M â const int
- MAC_ENTER â const int
- MAC_FF_META â const int
- META â const int
- N â const int
- NINE â const int
- NUM_CENTER â const int
- NUM_CENTER is also NUMLOCK for FF and Safari on Mac.
- NUM_DELETE â const int
- NUM_DIVISION â const int
- NUM_EAST â const int
- NUM_EIGHT â const int
- NUM_FIVE â const int
- NUM_FOUR â const int
- NUM_INSERT â const int
- NUM_MINUS â const int
- NUM_MULTIPLY â const int
- NUM_NINE â const int
- NUM_NORTH â const int
- NUM_NORTH_EAST â const int
- NUM_NORTH_WEST â const int
- NUM_ONE â const int
- NUM_PERIOD â const int
- NUM_PLUS â const int
- NUM_SEVEN â const int
- NUM_SIX â const int
- NUM_SOUTH â const int
- NUM_SOUTH_EAST â const int
- NUM_SOUTH_WEST â const int
- NUM_THREE â const int
- NUM_TWO â const int
- NUM_WEST â const int
- NUM_ZERO â const int
- NUMLOCK â const int
- O â const int
- ONE â const int
- OPEN_SQUARE_BRACKET â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- P â const int
- PAGE_DOWN â const int
- PAGE_UP â const int
- PAUSE â const int
- PERIOD â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- PRINT_SCREEN â const int
- Q â const int
- QUESTION_MARK â const int
- CAUTION: The question mark is for US-keyboard layouts. It varies for other locales and keyboard layouts.
- R â const int
- RIGHT â const int
- S â const int
- SCROLL_LOCK â const int
- SEMICOLON â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- SEVEN â const int
- SHIFT â const int
- SINGLE_QUOTE â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- SIX â const int
- SLASH â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- SPACE â const int
- T â const int
- TAB â const int
- THREE â const int
- TILDE â const int
- CAUTION: This constant requires localization for other locales and keyboard layouts.
- TWO â const int
- U â const int
- UNKNOWN â const int
- A sentinel value if the keycode could not be determined.
- UP â const int
- V â const int
- W â const int
- WIN_IME â const int
- WIN_KEY â const int
- WIN_KEY_FF_LINUX â const int
- WIN_KEY_LEFT â const int
- WIN_KEY_RIGHT â const int
- X â const int
- Y â const int
- Z â const int
- ZERO â const int