.

Keycodes and keys in the Microsoft virtual keys implementation

.

Key name or letterKeyCodeFires keypressNotes

.

LBUTTON1Mouse button constant, not necessarily relevant to key API

.

RBUTTON2Mouse button constant, not necessarily relevant to key API

.

CANCEL3Control-break processing

.

MBUTTON4Mouse button constant, not necessarily relevant to key API

.

Backspace8No

.

TAB9YesIf tab moves focus, its keyup may occur on a different element.

.

CLEAR12

.

Enter/return13Yes

.

SHIFT16No

.

CONTROL17No

.

Alt18No

.

PAUSE19No

.

Caps Lock20No

.

ESCAPE27Yes

.

SPACE32Yes

.

Page Up33No

.

Page Down34No

.

END35No

.

HOME36No

.

LEFT37No

.

UP38No

.

RIGHT39No

.

DOWN40No

.

SELECT41

.

PRINT42

.

EXECUTE43

.

Print Screen44No

.

INSERT45No

.

DELETE46No

.

HELP47

.

048YesASCII reference value of corresponding character

.

149YesASCII reference value of corresponding character

.

250YesASCII reference value of corresponding character

.

351YesASCII reference value of corresponding character

.

452YesASCII reference value of corresponding character

.

553YesASCII reference value of corresponding character

.

654YesASCII reference value of corresponding character

.

755YesASCII reference value of corresponding character

.

856YesASCII reference value of corresponding character

.

957YesASCII reference value of corresponding character

.

A65YesASCII reference value of corresponding character

.

B66YesASCII reference value of corresponding character

.

C67YesASCII reference value of corresponding character

.

D68YesASCII reference value of corresponding character

.

E69YesASCII reference value of corresponding character

.

F70YesASCII reference value of corresponding character

.

G71YesASCII reference value of corresponding character

.

H72YesASCII reference value of corresponding character

.

I73YesASCII reference value of corresponding character

.

J74YesASCII reference value of corresponding character

.

K75YesASCII reference value of corresponding character

.

L76YesASCII reference value of corresponding character

.

M77YesASCII reference value of corresponding character

.

N78YesASCII reference value of corresponding character

.

O79YesASCII reference value of corresponding character

.

P80YesASCII reference value of corresponding character

.

Q81YesASCII reference value of corresponding character

.

R82YesASCII reference value of corresponding character

.

S83YesASCII reference value of corresponding character

.

T84YesASCII reference value of corresponding character

.

U85YesASCII reference value of corresponding character

.

V86YesASCII reference value of corresponding character

.

W87YesASCII reference value of corresponding character

.

X88YesASCII reference value of corresponding character

.

Y89YesASCII reference value of corresponding character

.

Z90YesASCII reference value of corresponding character

.

LWIN91No

.

RWIN92No

.

APPS93

.

NUMPAD096Yes

.

NUMPAD197Yes

.

NUMPAD298Yes

.

NUMPAD399Yes

.

NUMPAD4100Yes

.

NUMPAD5101Yes

.

NUMPAD6102Yes

.

NUMPAD7103Yes

.

NUMPAD8104Yes

.

NUMPAD9105Yes

.

MULTIPLY106YesThese codes are for the keys on the “numpad” only

.

ADD107YesThese codes are for the keys on the “numpad” only

.

SEPARATOR108YesThese codes are for the keys on the “numpad” only

.

SUBTRACT109YesThese codes are for the keys on the “numpad” only

.

DECIMAL110YesThese codes are for the keys on the “numpad” only

.

DIVIDE111YesThese codes are for the keys on the “numpad” only

.

F1112No

.

F2113No

.

F3114No

.

F4115No

.

F5116No

.

F6117No

.

F7118No

.

F8119No

.

F9120No

.

F10121No

.

F11122No

.

F12123No

.

F13124No

.

F14125No

.

F15126No

.

F16127No

.

F17128No

.

F18129No

.

F19130No

.

F20131No

.

F21132No

.

F22133No

.

F23134No

.

F24135No

.

NUMLOCK144No

.

Scroll Lock145No

.

LSHIFT160Used in some internal Windows APIs to distinguish right and left control keys. Not relevant for key events.

.

RSHIFT161Used in some internal Windows APIs to distinguish right and left control keys. Not relevant for key events.

.

LCONTROL162Used in some internal Windows APIs to distinguish right and left control keys. Not relevant for key events.

.

RCONTROL163Used in some internal Windows APIs to distinguish right and left control keys. Not relevant for key events.

.

LMENU164Used in some internal Windows APIs to distinguish right and left control keys. Not relevant for key events.

.

RMENU165Used in some internal Windows APIs to distinguish right and left control keys. Not relevant for key events.

.

;186YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

:186YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

+187YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

=187YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

,188YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

<188YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

_189YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

-189YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

.190YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

>190YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

?191YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

/191YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

`192YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

~192YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

[219YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

{219YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

\220YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

|220YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

]221YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

}221YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

222YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

222YesThis mapping varies with keyboard layouts. Given values are en-us layout.

.

PROCESSKEY229

.

ATTN246

.

CRSEL247

.

EXSEL248

.

EREOF249

.

PLAY250

.

ZOOM251

.

NONAME252

.

PA1253

.

OEM_CLEAR254

.

Fn255NoLaptop “Fn” key