Skip to content

Instantly share code, notes, and snippets.

@TylorS
Created August 26, 2017 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TylorS/9ce1a3b1e083fd6caf4516bd9baf77b5 to your computer and use it in GitHub Desktop.
Save TylorS/9ce1a3b1e083fd6caf4516bd9baf77b5 to your computer and use it in GitHub Desktop.
export const enum KeyboareEventKey {
// Modifier Keys
Alt = 'Alt',
AltGraph = 'AltGraph',
CapsLock = 'CapsLock',
Control = 'Control',
Fn = 'Fn',
FnLock = 'FnLock',
Hyper = 'Hyper',
Meta = 'Meta',
NumLock = 'NumLock',
ScrollLock = 'ScrollLock',
Shift = 'Shift',
Super = 'Super',
Symbol = 'Symbol',
SymbolLock = 'SymbolLock',
// Whitespace keys
Enter = 'Enter',
Tab = 'Tab',
Space = ' ',
// Navigation keys
ArrowDown = 'ArrowDown',
ArrowLeft = 'ArrowLeft',
ArrowRight = 'ArrowRight',
ArrowUp = 'ArrowUp',
End = 'End',
Home = 'Home',
PageDown = 'PageDown',
PageUp = 'PageUp',
// Editing keys
Backspace = 'Backspace',
Clear = 'Clear',
Copy = 'Copy',
CrSel = 'CrSel',
Cut = 'Cut',
Delete = 'Delete',
EraseEof = 'EraseEof',
ExSel = 'ExSel',
Insert = 'Insert',
Paste = 'Paste',
Redo = 'Redo',
Undo = 'Undo',
// UI keys
Accept = 'Accept',
Again = 'Again',
Attn = 'Attn',
Cancel = 'Cancel',
ContextMenu = 'ContextMenu',
Escape = 'Escape',
Execute = 'Execute',
Find = 'Find',
Finish = 'Finish',
Help = 'Help',
Pause = 'Pause',
Play = 'Play',
Props = 'Props',
Select = 'Select',
ZoomIn = 'ZoomIn',
ZoomOut = 'ZoomOut',
// Numerical keypad events
Decimal = 'Decimal',
Multiply = 'Multiply',
Add = 'Add',
Divide = 'Divide',
Subtract = 'Subtract',
Separator = 'Separator',
// Function keys
F1 = 'F1',
F2 = 'F2',
F3 = 'F3',
F4 = 'F4',
F5 = 'F5',
F6 = 'F6',
F7 = 'F7',
F8 = 'F8',
F9 = 'F9',
F10 = 'F10',
F11 = 'F11',
F12 = 'F12',
F13 = 'F13',
F14 = 'F14',
F15 = 'F15',
F16 = 'F16',
F17 = 'F17',
F18 = 'F18',
F19 = 'F19',
F20 = 'F20',
// Numbers
Zero = '0',
One = '1',
Two = '2',
Three = '3',
Four = '4',
Five = '5',
Six = '6',
Seven = '7',
Eight = '8',
Nine = '9',
// Letters
a = 'a',
A = 'A',
b = 'b',
B = 'B',
c = 'c',
C = 'C',
d = 'd',
D = 'D',
e = 'e',
E = 'E',
f = 'f',
F = 'F',
g = 'g',
G = 'G',
h = 'h',
H = 'H',
i = 'i',
I = 'I',
j = 'j',
J = 'J',
k = 'k',
K = 'K',
l = 'l',
L = 'L',
m = 'm',
M = 'M',
n = 'n',
N = 'N',
o = 'o',
O = 'O',
p = 'p',
P = 'P',
q = 'q',
Q = 'Q',
r = 'r',
R = 'R',
s = 's',
S = 'S',
t = 't',
T = 'T',
u = 'u',
U = 'U',
v = 'v',
V = 'V',
w = 'w',
W = 'W',
x = 'x',
X = 'X',
y = 'y',
Y = 'Y',
z = 'z',
Z = 'z',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment