Javascript character codes (key codes)
Also commonly called in the jargon of programmers Key Codes, are the codes of each of the letters of the keyboard, sometimes we need to know these codes to perform some actions depending on the key that the user is typing, in the javascript events can be heard each time the user makes this action and the event will return an object that will contain the property event.which which will contain the number of each key. Here is a reference that will surely help you.
Backspace / Delete ------------------ 8
Tabulator --------------------------- 9
Enter ------------------------------- 13
Shift ------------------------------- 16
CTRL -------------------------------- 17
ALT --------------------------------- 18
Pause / Break ----------------------- 19
Caps Lock --------------------------- 20
Escape ------------------------------ 27
Page above -------------------------- 33
Page below -------------------------- 34
Final ------------------------------- 35
Home / Home ------------------------- 36
Left arrow -------------------------- 37
Up arrow ---------------------------- 38
Right arrow ------------------------- 39
Down arrow -------------------------- 40
Insert ------------------------------ 45
Delete ------------------------------ 46
Number 0 ---------------------------- 48
Number 1 ---------------------------- 49
Number 2 ---------------------------- 50
Number 3 ---------------------------- 51
Number 4 ---------------------------- 52
Number 5 ---------------------------- 53
Number 6 ---------------------------- 54
Number 7 ---------------------------- 55
Number 8 ---------------------------- 56
Number 9 ---------------------------- 57
a ----------------------------------- 65
b ----------------------------------- 66
c ----------------------------------- 67
d ----------------------------------- 68
e ----------------------------------- 69
f ----------------------------------- 70
g ----------------------------------- 71
h ----------------------------------- 72
i ----------------------------------- 73
j ----------------------------------- 74
k ----------------------------------- 75
l ----------------------------------- 76
m ----------------------------------- 77
n ----------------------------------- 78
o ----------------------------------- 79
p ----------------------------------- 80
q ----------------------------------- 81
r ----------------------------------- 82
s ----------------------------------- 83
t ----------------------------------- 84
u ----------------------------------- 85
v ----------------------------------- 86
w ----------------------------------- 87
x ----------------------------------- 88
y ----------------------------------- 89
z ----------------------------------- 90
Left key Window --------------------- 91
Right key Window -------------------- 92
Selection key ----------------------- 93
Number keyboard 0 ------------------- 96
Number keyboard 1 ------------------- 97
Number keyboard 2 ------------------- 98
Numeric keyboard 3 ------------------ 99
Number keyboard 4 ------------------- 100
Number keyboard 5 ------------------- 101
Number keyboard 6 ------------------- 102
Number keyboard 7 ------------------- 103
Number keyboard 8 ------------------- 104
Number keyboard 9 ------------------- 105
Multiply ---------------------------- 106
+ / Sum ----------------------------- 107
- / Subtraction --------------------- 109
Decimal point ----------------------- 110
Divide ------------------------------ 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
Numeric lock key -------------------- 144
Scroll lock ------------------------- 145
Semicolon --------------------------- 186
Equal sign -------------------------- 187
Eat --------------------------------- 188
Dash -------------------------------- 189
Period ------------------------------ 190
Forward slash ----------------------- 191
Accent grave ------------------------ 192
Open bracket ------------------------ 219
Back slash -------------------------- 220
Closing bracket --------------------- 221
Single quote ------------------------ 222