Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Keys

There are 255 keys on any keyboard being used on Microsoft Windows.

These keys can all be used by their numeric form, while some can also be used by a string form. The table below defines these values, as well as the name of the physical key each one represents.

Key strings are case-insensitive, and may optionally be wrapped in quotes (ex: km.down(space) or km.down('space')). Keys without a key string can only be used by their key number.

Some punctuation keys, such as =, /, and ;, have no key string, because those characters cannot be sent as arguments (see Command Syntax). Use their key number instead.

Keys
Key NumberKey StringKey Name
4aA
5bB
6cC
7dD
8eE
9fF
10gG
11hH
12iI
13jJ
14kK
15lL
16mM
17nN
18oO
19pP
20qQ
21rR
22sS
23tT
24uU
25vV
26wW
27xX
28yY
29zZ
3011 and !
3122 and @
3233 and #
3344 and $
3455 and %
3566 and ^
3677 and &
3788 and *
3899 and (
3900 and )
40enterReturn (Enter)
41escEscape
42backDelete (Backspace)
43tabTab
44spaceSpacebar
45-- and _
46= and +
47[ and {
48] and }
49\ and |
50Non-US # and ~
51; and :
52’ and “
53Grave Accent and Tilde
54, and <
55.. and >
56/ and ?
57capsCaps Lock
58f1F1
59f2F2
60f3F3
61f4F4
62f5F5
63f6F6
64f7F7
65f8F8
66f9F9
67f10F10
68f11F11
69f12F12
70printPrint Screen
71scrollScroll Lock
72pausePause
73insertInsert
74homeHome
75pgupPage Up
76delDelete Forward
77endEnd
78pgdownPage Down
79rightRight Arrow
80leftLeft Arrow
81downDown Arrow
82upUp Arrow
83Keypad Num Lock and Clear
84Keypad /
85Keypad *
86Keypad -
87Keypad +
88Keypad Enter
89Keypad 1 and End
90Keypad 2 and Down Arrow
91Keypad 3 and Page Down
92Keypad 4 and Left Arrow
93Keypad 5
94Keypad 6 and Right Arrow
95Keypad 7 and Home
96Keypad 8 and Up Arrow
97Keypad 9 and Page Up
98Keypad 0 and Insert
99Keypad . and Delete
100Non-US \ and |
101aplcatApplication
102Power
103Keypad =
104f13F13
105f14F14
106f15F15
107f16F16
108f17F17
109f18F18
110f19F19
111f20F20
112F21
113F22
114F23
115F24
116Execute
117Help
118Menu
119Select
120Stop
121Again
122Undo
123Cut
124Copy
125Paste
126Find
127Mute
128Volume Up
129Volume Down
130Locking Caps Lock
131Locking Num Lock
132Locking Scroll Lock
133Keypad Comma
134Keypad Equal Sign
135International1
136International2
137International3
138International4
139International5
140International6
141International7
142International8
143International9
144LANG1
145LANG2
146LANG3
147LANG4
148LANG5
149LANG6
150LANG7
151LANG8
152LANG9
153Alternate Erase
154SysReq/Attention
155Cancel
156Clear
157Prior
158Return
159Separator
160Out
161Oper
162Clear/Again
163CrSel/Props
164ExSel
165–175Reserved
176Keypad 00
177Keypad 000
178Thousands Separator
179Decimal Separator
180Currency Unit
181Currency Sub-unit
182Keypad (
183Keypad )
184Keypad {
185Keypad }
186Keypad Tab
187Keypad Backspace
188Keypad A
189Keypad B
190Keypad C
191Keypad D
192Keypad E
193Keypad F
194Keypad XOR
195Keypad ^
196Keypad %
197Keypad <
198Keypad >
199Keypad &
200Keypad &&
201Keypad |
202Keypad ||
203Keypad :
204Keypad #
205Keypad Space
206Keypad @
207Keypad !
208Keypad Memory Store
209Keypad Memory Recall
210Keypad Memory Clear
211Keypad Memory Add
212Keypad Memory Subtract
213Keypad Memory Multiply
214Keypad Memory Divide
215Keypad +/-
216Keypad Clear
217Keypad Clear Entry
218Keypad Binary
219Keypad Octal
220Keypad Decimal
221Keypad Hexadecimal
222–223Reserved
224ctr-lLeft Control
225shift-lLeft Shift
226alt-lLeft Alt
227gui-lLeft GUI
228ctr-rRight Control
229shift-rRight Shift
230alt-rRight Alt
231gui-rRight GUI
232–253Reserved
254helpReserved
255Reserved

The key numbers and names come from the Keyboard/Keypad page (section 10) of the USB HID Usage Tables 1.5 document.

https://usb.org/sites/default/files/hut1_5.pdf