Skip to main content

KeyCode Enum

Lists key names and codes.

Declaration

export enum KeyCode {
    Backspace = 8,
    Tab = 9,
    Enter = 13,
    Pause = 19,
    CapsLock = 20,
    Esc = 27,
    Spacebar = 32,
    PageUp = 33,
    PageDown = 34,
    End = 35,
    Home = 36,
    Left = 37,
    Up = 38,
    Right = 39,
    Down = 40,
    Insert = 45,
    Delete = 46,
    Key_0 = 48,
    Key_1 = 49,
    Key_2 = 50,
    Key_3 = 51,
    Key_4 = 52,
    Key_5 = 53,
    Key_6 = 54,
    Key_7 = 55,
    Key_8 = 56,
    Key_9 = 57,
    Key_a = 65,
    Key_b = 66,
    Key_c = 67,
    Key_d = 68,
    Key_e = 69,
    Key_f = 70,
    Key_g = 71,
    Key_h = 72,
    Key_i = 73,
    Key_j = 74,
    Key_k = 75,
    Key_l = 76,
    Key_m = 77,
    Key_n = 78,
    Key_o = 79,
    Key_p = 80,
    Key_q = 81,
    Key_r = 82,
    Key_s = 83,
    Key_t = 84,
    Key_u = 85,
    Key_v = 86,
    Key_w = 87,
    Key_x = 88,
    Key_y = 89,
    Key_z = 90,
    Windows = 91,
    ApplicationKey = 93,
    Numpad_0 = 96,
    Numpad_1 = 97,
    Numpad_2 = 98,
    Numpad_3 = 99,
    Numpad_4 = 100,
    Numpad_5 = 101,
    Numpad_6 = 102,
    Numpad_7 = 103,
    Numpad_8 = 104,
    Numpad_9 = 105,
    Asterisk = 106,
    PlusSign = 107,
    MinusSign = 109,
    Numpad_Period = 110,
    Numpad_Slash = 111,
    F1 = 112,
    F2 = 113,
    F3 = 114,
    F4 = 115,
    F5 = 116,
    F6 = 117,
    F7 = 118,
    F8 = 119,
    F9 = 120,
    F10 = 121,
    F11 = 122,
    F12 = 123,
    NumLock = 144,
    ScrollLock = 145,
    Semicolon = 186,
    EqualsSign = 187,
    Comma = 188,
    Hyphen = 189,
    Period = 190,
    Slash = 191,
    GraveAccent = 192,
    OpenBracket = 219,
    BackSlash = 220,
    CloseBracket = 221,
    Quotes = 222
}

Members

Name Description
ApplicationKey

The Application key.

Asterisk

The Asterisk key.

BackSlash

The Back slash key.

Backspace

The Backspace key.

CapsLock

The Caps lock key.

CloseBracket

The Close bracket key.

Comma

The Comma key.

Delete

The Delete key.

Down

The Down arrow key.

End

The End key.

Enter

The Enter key.

EqualsSign

The Equals sign key.

Esc

The Esc key.

F1

The F1 key.

F10

The F10 key.

F11

The F11 key.

F12

The F12 key.

F2

The F2 key.

F3

The F3 key.

F4

The F4 key.

F5

The F5 key.

F6

The F6 key.

F7

The F7 key.

F8

The F8 key.

F9

The F9 key.

GraveAccent

The Grave accent key.

Home

The Home key.

Hyphen

The Hyphen key.

Insert

The Insert key.

Key_0

The 0 key.

Key_1

The 1 key.

Key_2

The 2 key.

Key_3

The 3 key.

Key_4

The 4 key.

Key_5

The 5 key.

Key_6

The 6 key.

Key_7

The 7 key.

Key_8

The 8 key.

Key_9

The 9 key.

Key_a

The A key.

Key_b

The B key.

Key_c

The C key.

Key_d

The D key.

Key_e

The E key.

Key_f

The F key.

Key_g

The G key.

Key_h

The H key.

Key_i

The I key.

Key_j

The J key.

Key_k

The K key.

Key_l

The L key.

Key_m

The M key.

Key_n

The N key.

Key_o

The O key.

Key_p

The P key.

Key_q

The Q key.

Key_r

The R key.

Key_s

The S key.

Key_t

The T key.

Key_u

The U key.

Key_v

The V key.

Key_w

The W key.

Key_x

The X key.

Key_y

The Y key.

Key_z

The Z key.

Left

The Left arrow key.

MinusSign

The Minus sign key.

NumLock

The Num lock key.

Numpad_0

The 0 key on the numeric keypad.

Numpad_1

The 1 key on the numeric keypad.

Numpad_2

The 2 key on the numeric keypad.

Numpad_3

The 3 key on the numeric keypad.

Numpad_4

The 4 key on the numeric keypad.

Numpad_5

The 5 key on the numeric keypad.

Numpad_6

The 6 key on the numeric keypad.

Numpad_7

The 7 key on the numeric keypad.

Numpad_8

The 8 key on the numeric keypad.

Numpad_9

The 9 key on the numeric keypad.

Numpad_Period

The Period key on the numeric keypad.

Numpad_Slash

The Slash key on the numeric keypad.

OpenBracket

The Open bracket key.

PageDown

The Page down key.

PageUp

The Page up key.

Pause

The Pause key.

Period

The Period key.

PlusSign

The Plus sign key.

Quotes

The Quotes key.

Right

The Right arrow key.

ScrollLock

The Scroll lock key.

Semicolon

The Semicolon key.

Slash

The Slash key.

Spacebar

The Spacebar.

Tab

The Tab key.

Up

The Up arrow key.

Windows

The Windows logo key.