Skip to main content

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.

warning

Take extra notice of the spelling of the keycodes, especially the shorthand spelling. Otherwise, it will result in an elusive parsing error!

Keyboard vs. Consumer keycodes

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.

WWindows
LLinux
AAndroid
mmacOS
iiOS

Keyboard

Letters

NamesDescriptionWLAmi
A
a and A
B
b and B
C
c and C
D
d and D
E
e and E
F
f and F
G
g and G
H
h and H
I
i and I
J
j and J
K
k and K
L
l and L
M
m and M
N
n and N
O
o and O
P
p and P
Q
q and Q
R
r and R
S
s and S
T
t and T
U
u and U
V
v and V
W
w and W
X
x and X
Y
y and Y
Z
z and Z

Numbers

NamesDescriptionWLAmi
NUMBER_1
N1
1 and !Exclamation
NUMBER_2
N2
2 and @At Sign
NUMBER_3
N3
3 and #Hash / Pound
NUMBER_4
N4
4 and $Dollar
NUMBER_5
N5
5 and %Percent
NUMBER_6
N6
6 and ^Caret
NUMBER_7
N7
7 and &Ampersand
NUMBER_8
N8
8 and *Asterisk / Star
NUMBER_9
N9
9 and (Left Parenthesis
NUMBER_0
N0
0 and )Right Parenthesis

Symbols / Punctuation

NamesDescriptionWLAmi
EXCLAMATION
EXCL
!Exclamation
AT_SIGN
AT
@At Sign
HASH
POUND
#Hash / Pound
DOLLAR
DLLR
$Dollar
PERCENT
PRCNT
%Percent
CARET
^Caret
AMPERSAND
AMPS
&Ampersand
ASTERISK
ASTRK
STAR
*Asterisk / Star
LEFT_PARENTHESIS
LPAR
(Left Parenthesis
RIGHT_PARENTHESIS
RPAR
)Right Parenthesis
EQUAL
=Equal and +Plus
PLUS
+Plus
MINUS
-Minus and _Underscore
UNDERSCORE
UNDER
_Underscore
SLASH
FSLH
/Forward Slash and ?Question Mark
QUESTION
QMARK
?Question Mark
BACKSLASH
BSLH
\Backslash and |Pipe
PIPE
|Pipe
NON_US_BACKSLASH
NON_US_BSLH
NUBS
Non-US \Backslash and |Pipe
PIPE2
|Pipe
SEMICOLON
SEMI
;Semicolon and :Colon
COLON
:Colon
SINGLE_QUOTE
SQT
APOSTROPHE
APOS
'Apostrophe and "Quote (Double)
DOUBLE_QUOTES
DQT
"Quote (Double)
COMMA
,Comma and <Less Than
LESS_THAN
LT
<Less Than
PERIOD
DOT
.Period and >Greater Than
GREATER_THAN
GT
>Greater Than
LEFT_BRACKET
LBKT
[Left Bracket and {Left Brace
LEFT_BRACE
LBRC
{Left Brace
RIGHT_BRACKET
RBKT
]Right Bracket and }Right Brace
RIGHT_BRACE
RBRC
}Right Brace
GRAVE
`Grave Accent and ~Tilde
TILDE
~Tilde
NON_US_HASH
NUHS
Non-US #Hash/Pound and ~Tilde
TILDE2
~Tilde

Control & Whitespace

NamesDescriptionWLAmi
ESCAPE
ESC
Escape
RETURN
ENTER
RET
Return (Enter)
RETURN2
RET2
Return
SPACE
Space
TAB
Tab
BACKSPACE
BSPC
Backspace
DELETE
DEL
Delete
INSERT
INS
Insert
NamesDescriptionWLAmi
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
Notes
1

Key press is registered, but has no visible effect in tested apps (Gmail, Safari, Notes) iPhone 6 / iOS 12.4.6

Locks

NamesDescriptionWLAmi
CAPSLOCK
CAPS
CLCK
Caps Lock
LOCKING_CAPS
LCAPS
Locking Caps Lock
SCROLLLOCK
SLCK
Scroll Lock
LOCKING_SCROLL
LSLCK
Locking Scroll Lock
LOCKING_NUM
LNLCK
Locking Num Lock

F Keys

NamesDescriptionWLAmi
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
F21
F21
F22
F22
F23
F23
F24
F24

International

NamesDescriptionWLAmi
INTERNATIONAL_1
INT1
INT_RO
ろ (International 1)
INTERNATIONAL_2
INT2
INT_KATAKANAHIRAGANA
INT_KANA
かな (International 2)
INTERNATIONAL_3
INT3
INT_YEN
¥ (International 3)
INTERNATIONAL_4
INT4
INT_HENKAN
変換 (International 4)
INTERNATIONAL_5
INT5
INT_MUHENKAN
無変換 (International 5)
INTERNATIONAL_6
INT6
INT_KPJPCOMMA
,カンマ (International 6)
INTERNATIONAL_7
INT7
International 7
INTERNATIONAL_8
INT8
International 8
INTERNATIONAL_9
INT9
International 9

Language

NamesDescriptionWLAmi
LANGUAGE_1
LANG1
LANG_HANGEUL
한/영 (Language 1)
LANGUAGE_2
LANG2
LANG_HANJA
한자 (Language 2)
LANGUAGE_3
LANG3
LANG_KATAKANA
カタカナ (Language 3)
LANGUAGE_4
LANG4
LANG_HIRAGANA
ひらがな (Language 4)
LANGUAGE_5
LANG5
LANG_ZENKAKUHANKAKU
半角/全角 (Language 5)
LANGUAGE_6
LANG6
Language 6
LANGUAGE_7
LANG7
Language 7
LANGUAGE_8
LANG8
Language 8
LANGUAGE_9
LANG9
Language 9

Miscellaneous

NamesDescriptionWLAmi
PRINTSCREEN
PSCRN
Print Screen
PAUSE_BREAK
Pause / Break
ALT_ERASE
Alternate Erase
SYSREQ
ATTENTION
SysReq / Attention
K_CANCEL
Cancel

Keyboard

CLEAR
Clear
CLEAR_AGAIN
Clear / Again
CRSEL
CrSel / Props
PRIOR
Prior
SEPARATOR
Separator
OUT
Out
OPER
Oper
EXSEL
ExSel
K_EDIT
Edit

Keyboard

Modifiers

The Modifiers page includes further information.

NamesDescriptionWLAmi
LEFT_SHIFT
LSHIFT
LSHFT
LS(code)
Left Shift ⇧
RIGHT_SHIFT
RSHIFT
RSHFT
RS(code)
Right Shift ⇧
LEFT_CONTROL
LCTRL
LC(code)
Left Control
RIGHT_CONTROL
RCTRL
RC(code)
Right Control
LEFT_ALT
LALT
LA(code)
Left Alt
RIGHT_ALT
RALT
RA(code)
Right Alt
LEFT_GUI
LGUI
LG(code)
LEFT_WIN
LWIN
LEFT_COMMAND
LCMD
LEFT_META
LMETA
Left GUI (Windows / Command / Meta)
RIGHT_GUI
RGUI
RG(code)
RIGHT_WIN
RWIN
RIGHT_COMMAND
RCMD
RIGHT_META
RMETA
Right GUI (Windows / Command / Meta)

Keypad

NamesDescriptionWLAmi
KP_NUMLOCK
KP_NUM
KP_NLCK
Numlock and Clear
KP_CLEAR
Clear
CLEAR2
Clear
KP_ENTER
Enter

Numbers

NamesDescriptionWLAmi
KP_NUMBER_1
KP_N1
1
KP_NUMBER_2
KP_N2
2
KP_NUMBER_3
KP_N3
3
KP_NUMBER_4
KP_N4
4
KP_NUMBER_5
KP_N5
5
KP_NUMBER_6
KP_N6
6
KP_NUMBER_7
KP_N7
7
KP_NUMBER_8
KP_N8
8
KP_NUMBER_9
KP_N9
9
KP_NUMBER_0
KP_N0
0

Symbols / Operations

NamesDescriptionWLAmi
KP_PLUS
+Plus
KP_MINUS
KP_SUBTRACT
-Minus
KP_MULTIPLY
KP_ASTERISK
*Multiply
KP_DIVIDE
KP_SLASH
/Divide
KP_EQUAL
=Equal
KP_EQUAL_AS400
=Equal (AS/400 keyboards)
KP_DOT
.Dot
KP_COMMA
,Comma
KP_LEFT_PARENTHESIS
KP_LPAR
(Left Parenthesis
KP_RIGHT_PARENTHESIS
KP_RPAR
)Right Parenthesis

Editing

Cut, Copy, Paste

NamesDescriptionWLAmi
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

NamesDescriptionWLAmi
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

NamesDescriptionWLAmi
C_VOLUME_UP
C_VOL_UP
Volume Up

Consumer

K_VOLUME_UP
K_VOL_UP
Volume Up

Keyboard

K_VOLUME_UP2
K_VOL_UP2
Volume Up

Keyboard

C_VOLUME_DOWN
C_VOL_DN
Volume Down

Consumer

K_VOLUME_DOWN
K_VOL_DN
Volume Down

Keyboard

K_VOLUME_DOWN2
K_VOL_DN2
Volume Down

Keyboard

C_MUTE
Mute

Consumer

K_MUTE
Mute

Keyboard

K_MUTE2
Mute

Keyboard

C_ALTERNATE_AUDIO_INCREMENT
C_ALT_AUDIO_INC
Alternate Audio Increment

Consumer

C_BASS_BOOST
Bass Boost

Consumer

Display

NamesDescriptionWLAmi
C_BRIGHTNESS_INC
C_BRI_INC
C_BRI_UP
Increase Brightness

Consumer

C_BRIGHTNESS_DEC
C_BRI_DEC
C_BRI_DN
Decrease Brightness

Consumer

C_BRIGHTNESS_MINIMUM
C_BRI_MIN
Minimum Brightness

Consumer

C_BRIGHTNESS_MAXIMUM
C_BRI_MAX
Maximum Brightness

Consumer

C_BRIGHTNESS_AUTO
C_BRI_AUTO
Auto Brightness

Consumer

C_BACKLIGHT_TOGGLE
C_BKLT_TOG
Backlight Toggle

Consumer

C_ASPECT
Aspect

Consumer

C_PIP
Picture-in-Picture Toggle

Consumer

Media Controls

NamesDescriptionWLAmi
C_RECORD
C_REC
Record

Consumer

C_PLAY
Play

Consumer

C_PLAY_PAUSE
C_PP
Play / Pause

Consumer

K_PLAY_PAUSE
K_PP
Play / Pause

Keyboard

C_PAUSE
Pause

Consumer

C_STOP
Stop

Consumer

K_STOP2
Stop

Keyboard

K_STOP3
Stop

Keyboard

C_STOP_EJECT
Stop / Eject

Consumer

C_EJECT
Eject

Consumer

K_EJECT
Eject

Keyboard

C_NEXT
Next

Consumer

K_NEXT
Next

Keyboard

C_PREVIOUS
C_PREV
Previous

Consumer

K_PREVIOUS
K_PREV
Previous

Keyboard

C_FAST_FORWARD
C_FF
Fast Forward

Consumer

C_REWIND
C_RW
Rewind

Consumer

C_SLOW
Slow

Consumer

C_SLOW_TRACKING
C_SLOW2
Slow Tracking

Consumer

C_REPEAT
Repeat

Consumer

C_RANDOM_PLAY
C_SHUFFLE
Random Play

Consumer

C_CAPTIONS
C_SUBTITLES
Closed Caption

Consumer

C_DATA_ON_SCREEN
Data On Screen

Consumer

C_SNAPSHOT
Snapshot

Consumer

Consumer Menus

NamesDescriptionWLAmi
C_MENU
Menu

Consumer Menu

C_MENU_PICK
C_MENU_SELECT
Pick

Consumer Menu

C_MENU_UP
Up

Consumer Menu

C_MENU_DOWN
Down

Consumer Menu

C_MENU_LEFT
Left

Consumer Menu

C_MENU_RIGHT
Right

Consumer Menu

C_MENU_ESCAPE
C_MENU_ESC
Escape

Consumer Menu

C_MENU_INCREASE
C_MENU_INC
Value Increase

Consumer Menu

C_MENU_DECREASE
C_MENU_DEC
Value Decrease

Consumer Menu

C_RED_BUTTON
C_RED
Red Button

Consumer Menu

C_GREEN_BUTTON
C_GREEN
Green Button

Consumer Menu

C_BLUE_BUTTON
C_BLUE
Blue Button

Consumer Menu

C_YELLOW_BUTTON
C_YELLOW
Yellow Button

Consumer Menu

Consumer Controls

NamesDescriptionWLAmi
C_CHANNEL_INC
C_CHAN_INC
Channel Increment

Consumer

C_CHANNEL_DEC
C_CHAN_DEC
Channel Decrement

Consumer

C_RECALL_LAST
C_CHAN_LAST
Recall Last

Consumer

C_MEDIA_VCR_PLUS
VCR Plus

Consumer Media

C_MEDIA_GUIDE
Program Guide

Consumer Media

C_MEDIA_STEP
C_MODE_STEP
Mode Step

Consumer Media

C_MEDIA_HOME
Home

Consumer Media

C_MEDIA_TV
TV

Consumer Media

C_MEDIA_CABLE
Cable

Consumer Media

C_MEDIA_TUNER
Tuner

Consumer Media

C_MEDIA_DVD
DVD

Consumer Media

C_MEDIA_CD
CD

Consumer Media

C_MEDIA_SATELLITE
Satellite

Consumer Media

C_MEDIA_VCR
VCR

Consumer Media

C_MEDIA_TAPE
Tape

Consumer Media

C_MEDIA_COMPUTER
Computer

Consumer Media

C_MEDIA_WWW
WWW

Consumer Media

C_MEDIA_GAMES
Games

Consumer Media

C_MEDIA_PHONE
Telephone

Consumer Media

C_MEDIA_VIDEOPHONE
Video Phone

Consumer Media

C_MEDIA_MESSAGES
Messages

Consumer Media

C_QUIT
Quit

Consumer

C_HELP
Help

Consumer

Applications

Application Controls

NamesDescriptionWLAmi
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
Notes
1

Does not exactly replicate original key behavior on macOS, works for Globe+key modifiers but not Fn+key (#1938).

Applications (Launch)

NamesDescriptionWLAmi
C_AL_NEXT_TASK
Next Task / Application

Consumer AL

C_AL_PREVIOUS_TASK
C_AL_PREV_TASK
Previous Task / Application

Consumer AL

C_AL_SELECT_TASK
Select Task / Application

Consumer AL

C_AL_MY_COMPUTER
Local Machine Browser

Consumer AL

C_AL_DOCUMENTS
C_AL_DOCS
Documents

Consumer AL

C_AL_FILE_BROWSER
C_AL_FILES
File Browser

Consumer AL

C_AL_WWW
Internet Browser

Consumer AL

K_WWW
Internet Browser

Keyboard

C_AL_EMAIL
C_AL_MAIL
Email Reader

Consumer AL

C_AL_INSTANT_MESSAGING
C_AL_IM
Instant Messaging

Consumer AL

C_AL_NETWORK_CHAT
C_AL_CHAT
Network Chat

Consumer AL

C_AL_CONTACTS
C_AL_ADDRESS_BOOK
Contacts / Address Book

Consumer AL

C_AL_CALENDAR
C_AL_CAL
Calendar / Schedule

Consumer AL

C_AL_IMAGE_BROWSER
C_AL_IMAGES
Image Browser

Consumer AL

C_AL_AUDIO_BROWSER
C_AL_AUDIO
C_AL_MUSIC
Audio Browser

Consumer AL

C_AL_MOVIE_BROWSER
C_AL_MOVIES
Movie Browser

Consumer AL

C_AL_TEXT_EDITOR
Text Editor

Consumer AL

C_AL_WORD
Word Processor

Consumer AL

C_AL_SPREADSHEET
C_AL_SHEET
Spreadsheet

Consumer AL

C_AL_PRESENTATION
Presentation

Consumer AL

C_AL_GRAPHICS_EDITOR
Graphics Editor

Consumer AL

C_AL_CALCULATOR
C_AL_CALC
Calculator

Consumer AL

K_CALCULATOR
K_CALC
Calculator

Keyboard

C_AL_NEWS
Newsreader

Consumer AL

C_AL_DATABASE
C_AL_DB
Database App

Consumer AL

C_AL_VOICEMAIL
Voicemail

Consumer AL

C_AL_FINANCE
Checkbook / Finance

Consumer AL

C_AL_TASK_MANAGER
Task / Project Manager

Consumer AL

C_AL_JOURNAL
Log / Journal / Timecard

Consumer AL

C_AL_AV_CAPTURE_PLAYBACK
A/V Capture / Playback

Consumer AL

C_AL_SPELLCHECK
C_AL_SPELL
Spell Check

Consumer AL

C_AL_SCREEN_SAVER
Screen Saver

Consumer AL

C_AL_KEYBOARD_LAYOUT
Keyboard Layout

Consumer AL

C_AL_CONTROL_PANEL
Control Panel

Consumer AL

C_AL_HELP
Integrated Help Center

Consumer AL

K_HELP
Help

Keyboard

C_AL_OEM_FEATURES
C_AL_TIPS
C_AL_TUTORIAL
OEM Features / Tips / Tutorial Browser

Consumer AL

C_AL_CCC
Consumer Control Configuration

Consumer AL

Input Assist

NamesDescriptionWLAmi
C_KEYBOARD_INPUT_ASSIST_NEXT
C_KBIA_NEXT
Next

Consumer KBIA

C_KEYBOARD_INPUT_ASSIST_PREVIOUS
C_KBIA_PREV
Previous

Consumer KBIA

C_KEYBOARD_INPUT_ASSIST_NEXT_GROUP
C_KBIA_NEXT_GRP
Next Group

Consumer KBIA

C_KEYBOARD_INPUT_ASSIST_PREVIOUS_GROUP
C_KBIA_PREV_GRP
Previous Group

Consumer KBIA

C_KEYBOARD_INPUT_ASSIST_ACCEPT
C_KBIA_ACCEPT
Accept

Consumer KBIA

C_KEYBOARD_INPUT_ASSIST_CANCEL
C_KBIA_CANCEL
Cancel

Consumer KBIA

Power & Lock

NamesDescriptionWLAmi
C_POWER
C_PWR
Power

Consumer

12
K_POWER
K_PWR
Power

Keyboard

12
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

Notes
1

Both macOS power keys ignore quick presses, sleep on deliberate press, and display a prompt on long-press.

2

Both iOS power keys lock the home screen.