Tool

Key code finder

Download InputConfig on the Mac App StoreInputConfig is completely free on the Mac App Store.

InputConfig stores every keyboard output as a HID usage code, which is the same number a USB keyboard sends. Press a key below to find its code and the name the editor shows, or search the table. The code is what you see in a preset file, like key 44 for Space.

Click here, then press any key. Tab is not captured, so it still moves you on; its code is 43.

Waiting for a key

Modifier keys show their left or right code. The fn key is not reported by browsers; in the app it is fn / Globe (hold), code 400, and a Globe tap on its own is code 401.

CodeName in InputConfigGroupIn a preset file
4ALetter Keyskey 4
5BLetter Keyskey 5
6CLetter Keyskey 6
7DLetter Keyskey 7
8ELetter Keyskey 8
9FLetter Keyskey 9
10GLetter Keyskey 10
11HLetter Keyskey 11
12ILetter Keyskey 12
13JLetter Keyskey 13
14KLetter Keyskey 14
15LLetter Keyskey 15
16MLetter Keyskey 16
17NLetter Keyskey 17
18OLetter Keyskey 18
19PLetter Keyskey 19
20QLetter Keyskey 20
21RLetter Keyskey 21
22SLetter Keyskey 22
23TLetter Keyskey 23
24ULetter Keyskey 24
25VLetter Keyskey 25
26WLetter Keyskey 26
27XLetter Keyskey 27
28YLetter Keyskey 28
29ZLetter Keyskey 29
301Number Keyskey 30
312Number Keyskey 31
323Number Keyskey 32
334Number Keyskey 33
345Number Keyskey 34
356Number Keyskey 35
367Number Keyskey 36
378Number Keyskey 37
389Number Keyskey 38
390Number Keyskey 39
45-Other Characterskey 45
46=Other Characterskey 46
47[Other Characterskey 47
48]Other Characterskey 48
49\Other Characterskey 49
50#Other Characterskey 50
51;Other Characterskey 51
52'Other Characterskey 52
53`Other Characterskey 53
54,Other Characterskey 54
55.Other Characterskey 55
56/Other Characterskey 56
79RightArrow Keyskey 79
80LeftArrow Keyskey 80
81DownArrow Keyskey 81
82UpArrow Keyskey 82
227Command (Left)Modifier Keyskey 227
231Command (Right)Modifier Keyskey 231
225Shift (Left)Modifier Keyskey 225
229Shift (Right)Modifier Keyskey 229
226Alt / Option (Left)Modifier Keyskey 226
230Alt / Option (Right)Modifier Keyskey 230
224Ctrl (Left)Modifier Keyskey 224
228Ctrl (Right)Modifier Keyskey 228
400fn / Globe (hold)Modifier Keyskey 400
44SpaceOther Keyskey 44
40ReturnOther Keyskey 40
41EscapeOther Keyskey 41
42BackspaceOther Keyskey 42
43TabOther Keyskey 43
73InsertOther Keyskey 73
74HomeOther Keyskey 74
75PageUpOther Keyskey 75
76DeleteOther Keyskey 76
77EndOther Keyskey 77
78PageDownOther Keyskey 78
57Caps LockOther Keyskey 57
70PrintScreenOther Keyskey 70
101ApplicationOther Keyskey 101
58F1Function Keyskey 58
59F2Function Keyskey 59
60F3Function Keyskey 60
61F4Function Keyskey 61
62F5Function Keyskey 62
63F6Function Keyskey 63
64F7Function Keyskey 64
65F8Function Keyskey 65
66F9Function Keyskey 66
67F10Function Keyskey 67
68F11Function Keyskey 68
69F12Function Keyskey 69
104F13Function Keyskey 104
105F14Function Keyskey 105
106F15Function Keyskey 106
107F16Function Keyskey 107
108F17Function Keyskey 108
109F18Function Keyskey 109
110F19Function Keyskey 110
111F20Function Keyskey 111
112F21Function Keyskey 112
113F22Function Keyskey 113
114F23Function Keyskey 114
115F24Function Keyskey 115
83NumlockKeypad Keyskey 83
84Keypad /Keypad Keyskey 84
85Keypad *Keypad Keyskey 85
86Keypad -Keypad Keyskey 86
87Keypad +Keypad Keyskey 87
88Keypad EnterKeypad Keyskey 88
89Keypad 1Keypad Keyskey 89
90Keypad 2Keypad Keyskey 90
91Keypad 3Keypad Keyskey 91
92Keypad 4Keypad Keyskey 92
93Keypad 5Keypad Keyskey 93
94Keypad 6Keypad Keyskey 94
95Keypad 7Keypad Keyskey 95
96Keypad 8Keypad Keyskey 96
97Keypad 9Keypad Keyskey 97
98Keypad 0Keypad Keyskey 98
99Keypad .Keypad Keyskey 99
103Keypad =Keypad Keyskey 103
133Keypad ,Keypad Keyskey 133
71Brightness DownSpecial Keyskey 71
72Brightness UpSpecial Keyskey 72
303Dashboard/LaunchpadSpecial Keyskey 303
304Mission ControlSpecial Keyskey 304
305Keyboard Light DownSpecial Keyskey 305
306Keyboard Light UpSpecial Keyskey 306
401Globe Key (Emoji)Special Keyskey 401
307Rewind TrackSpecial Keyskey 307
308Play Audio TrackSpecial Keyskey 308
309Fast Forward TrackSpecial Keyskey 309
310Mute SoundSpecial Keyskey 310
311Volume UpSpecial Keyskey 311
312Volume DownSpecial Keyskey 312
313EjectSpecial Keyskey 313

Notes

  • Letters are 4 to 29 (A to Z), digits 1 to 9 are 30 to 38, and 0 is 39. F1 to F12 are 58 to 69; F13 to F24 are 104 to 115 and are the safest keys to assign as app hotkeys, because no Mac keyboard has them.
  • Modifiers have a left and a right code. A chord such as Command Shift 3 is stored as three outputs on one row, modifiers first, and sent as a real chord.
  • Codes 303 and up are the Mac's special keys (Mission Control, Launchpad, brightness, media, volume) and are sent as those keys, not as F-keys.
  • Delete here is the forward delete (code 76); the key labeled Delete on a Mac keyboard is Backspace (42).

How this fits with InputConfig

This page tests a keyboard in the browser. InputConfig works one step later: it can make any key, F13 to F19 and keys on gaming, ISO and Japanese keyboards included, send a shortcut, a click, typed text or a macro, in every app or only in one.

A row in the InputConfig editor with F13 as the input and Open App with Mail as the output.
In InputConfig, a spare key such as F13 can open an app, press a shortcut or run a macro.

Per-app keyboard shortcuts on a Mac shows it step by step. InputConfig is free on the Mac App Store.

More keyboard tests

Related

Download InputConfig on the Mac App StoreCompletely free. You don't have to make an account, there are no subscriptions, and nothing is locked. Optimized for Apple silicon. Open source on GitHub.

Updated