description

# 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

KeyCode()

## 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