List of Keycodes
This is the reference page for keycodes used by behaviors. Use the table of contents (on the right or the top) for easy navigation.
Take extra notice of the spelling of the keycodes, especially the shorthand spelling. Otherwise, it will result in an elusive parsing error!
In the below tables, there are keycode pairs with similar names where one variant has a K_
prefix and another C_
.
These variants correspond to similarly named usages from different HID usage pages,
namely the "keyboard/keypad" and "consumer" ones respectively.
In practice, some OS and applications might listen to only one of the variants. You can use the values in the compatibility columns below to assist you in selecting which one to use.
Keyboard
Letters
Numbers
Symbols / Punctuation
Control & Whitespace
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
ESCAPE ESC | Escape | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
RETURN ENTER RET | Return (Enter) | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
RETURN2 RET2 | Return | ❌ | ❌ | ❌ | ❔ | ❔ | |
SPACE | Space | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
TAB | Tab | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
BACKSPACE BSPC | Backspace | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
DELETE DEL | Delete | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
INSERT INS | Insert | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ |
Navigation
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
HOME | Home | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
END | End | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
PAGE_UP PG_UP | Page Up | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
PAGE_DOWN PG_DN | Page Down | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
UP_ARROW UP | ⬆ Up Arrow | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
DOWN_ARROW DOWN | ⬇ Down Arrow | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
LEFT_ARROW LEFT | ⬅ Left Arrow | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
RIGHT_ARROW RIGHT | ⮕ Right Arrow | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
K_APPLICATION K_APP K_CONTEXT_MENU K_CMENU | Application (Context Menu) | ⭐ | ⭐ | ⭐ | ⭐ | ⭐1 |
Locks
F Keys
International
Language
Miscellaneous
Modifiers
The Modifiers page includes further information.
Keypad
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
KP_NUMLOCK KP_NUM KP_NLCK | Numlock and Clear | ⭐ | ⭐ | ⭐ | ❔ | ❔ | |
KP_CLEAR | Clear | ❔ | ⭐ | ❌ | ❌ | ❌ | |
CLEAR2 | Clear | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
KP_ENTER | Enter | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ |
Numbers
Symbols / Operations
Editing
Cut, Copy, Paste
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
C_AC_CUT | Cut Consumer AC | ❌ | ⭐ | ❌ | ❔ | ❔ | |
K_CUT | Cut Keyboard | ❌ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_COPY | Copy Consumer AC | ❌ | ⭐ | ❌ | ❔ | ❔ | |
K_COPY | Copy Keyboard | ❌ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_PASTE | Paste Consumer AC | ❌ | ⭐ | ❌ | ❔ | ❔ | |
K_PASTE | Paste Keyboard | ❌ | ⭐ | ❌ | ❔ | ❔ |
Undo, Redo
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
C_AC_UNDO | Undo Consumer AC | ❌ | ⭐ | ❌ | ❔ | ❔ | |
K_UNDO | Undo Keyboard | ❌ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_REDO | Redo / Repeat Consumer AC | ❌ | ⭐ | ❌ | ❔ | ❔ | |
K_AGAIN K_REDO | Again Keyboard | ❌ | ⭐ | ❌ | ❔ | ❔ |
Media
Sound / Volume
Display
Media Controls
Consumer Menus
Consumer Controls
Applications
Application Controls
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
K_MENU | Menu Keyboard | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_PROPERTIES C_AC_PROPS | Properties Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
K_SELECT | Select Keyboard | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_CANCEL | Cancel Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
K_EXECUTE K_EXEC | Execute Keyboard | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_REFRESH | Refresh Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
K_REFRESH | Refresh Keyboard | ❔ | ⭐ | ❌ | ❌ | ❌ | |
C_AC_STOP | Stop Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
K_STOP | Stop Keyboard | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
C_AC_FORWARD | Forward Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
K_FORWARD | Forward Keyboard | ❔ | ⭐ | ⭐ | ❌ | ❌ | |
C_AC_BACK | Back Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
K_BACK | Back Keyboard | ❔ | ⭐ | ⭐ | ❌ | ❌ | |
C_AC_HOME | Home Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
C_AC_BOOKMARKS C_AC_FAVORITES C_AC_FAVOURITES | Bookmarks Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
C_AC_NEW | New Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_OPEN | Open Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_SAVE | Save Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_CLOSE | Close Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_EXIT | Exit Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_PRINT | Print Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_FIND | Find Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
K_FIND | Find Keyboard | ❔ | ⭐ | ❌ | ❔ | ❔ | |
K_FIND2 | Find Keyboard | ❔ | ⭐ | ❌ | ❌ | ❌ | |
C_AC_SEARCH | Search Consumer AC | ❔ | ⭐ | ⭐ | ⭐ | ❔ | |
C_AC_GOTO | Go To Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_ZOOM | Zoom Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_ZOOM_IN | Zoom In Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_ZOOM_OUT | Zoom Out Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_SCROLL_UP | Scroll Up Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
K_SCROLL_UP | Scroll Up Keyboard | ❔ | ⭐ | ⭐ | ❌ | ❌ | |
C_AC_SCROLL_DOWN | Scroll Down Consumer AC | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
K_SCROLL_DOWN | Scroll Down Keyboard | ❔ | ⭐ | ⭐ | ❌ | ❌ | |
C_AC_REPLY | Reply Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_FORWARD_MAIL | Forward Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_SEND | Send Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_EDIT | Edit Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_INSERT C_AC_INS | Insert Mode Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_DEL | Delete Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_VIEW_TOGGLE | View Toggle Consumer AC | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AC_DESKTOP_SHOW_ALL_WINDOWS | Desktop Show All Windows Consumer AC | ❔ | ⭐ | ❔ | ⭐ | ❔ | |
C_AC_DESKTOP_SHOW_ALL_APPLICATIONS | Desktop Show All Applications Consumer AC | ❔ | ⭐ | ❔ | ⭐ | ❔ | |
C_VOICE_COMMAND | Voice Command Consumer | ❔ | ⭐ | ❔ | ❔ | ❔ | |
C_AC_NEXT_KEYBOARD_LAYOUT_SELECT GLOBE | AC Next Keyboard Layout Select (Apple Globe) Consumer AC | ❔ | ❔ | ❔ | ⭐1 | ⭐ |
Does not exactly replicate original key behavior on macOS, works for Globe+key modifiers but not Fn+key (#1938).
Applications (Launch)
Input Assist
Power & Lock
Names | Description | W | L | A | m | i | |
---|---|---|---|---|---|---|---|
C_POWER C_PWR | Power Consumer | ❔ | ⭐ | ❌ | ⭐1 | ⭐2 | |
K_POWER K_PWR | Power Keyboard | ❔ | ❌ | ⭐ | ⭐1 | ⭐2 | |
C_RESET | Reset Consumer | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_SLEEP | Sleep Consumer | ❔ | ⭐ | ❌ | ❔ | ❔ | |
K_SLEEP | Sleep Keyboard | ❔ | ⭐ | ❌ | ❌ | ❌ | |
C_SLEEP_MODE | Sleep Mode Consumer | ❔ | ❌ | ⭐ | ❔ | ❔ | |
C_AL_LOGOFF | Logoff Consumer AL | ❔ | ⭐ | ❌ | ❔ | ❔ | |
C_AL_LOCK C_AL_SCREENSAVER C_AL_COFFEE | Terminal Lock / Screensaver Consumer AL | ❔ | ⭐ | ⭐ | ❔ | ❔ | |
K_LOCK K_SCREENSAVER K_COFFEE | Lock Keyboard | ❔ | ⭐ | ⭐ | ❌ | ❌ |