Appendix Scan Code Reference

This appendix contains a list of all the scan codes you can use for input in your programs. Scan codes are used in functions such as KeyHit() or KeyDown() like this:

KeyDown(scancode)

Input the scan code for the key you want to test, and this function will return 1 if the key was pressed.

Many of the following keys won’t appear on your keyboard; some of them are international keys (like the symbol for the Yen) and some of them only exist on advanced keyboards that have extra keys (like the Calculator key). Anyway, you can find any key that you would ever think of using on this list, shown in Table A.1

Table A.1. The Scan Code Reference Keyboard Key Scan Code Comments
Keyboard KeyScan CodeComments
ESCAPE1 
12 
23 
34 
45 
56 
67 
78 
89 
910 
011 
Minus (–)12On main keyboard
Equals sign (=)13 
Backspace14Backspace key
Tab15 
Q16 
W17 
E18 
R19 
T20 
Y21 
U22 
I23 
O24 
P25 
Left bracket ([)26 
Right bracket (])27 
Return/Enter28Return/Enter on main keyboard
Left control29 
A30 
S31 
D32 
F33 
G34 
H35 
J36 
K37 
L38 
Semicolon (;)39 
Apostrophe (’)40 
Grave41Accent grave
Left shift42 
Backslash ()43 
Z44 
X45 
C46 
V47 
B48 
N49 
M50 
Comma (,)51 
Period (.)52On main keyboard
Slash (/)53On main keyboard
Right shift54 
Multiply (*)55On numeric keypad
Left Alt/menu56 
Space57 
Capital58 
F159 
F260 
F361 
F462 
F563 
F664 
F765 
F866 
F967 
F1068 
NumLock69 
Scroll Lock70 
NumPad 771 
NumPad 872 
NumPad 973 
Subtract ( )74On numeric keypad
NumPad 475 
NumPad 576 
NumPad 677 
Add (+)78On numeric keypad
NumPad 179 
NumPad 280 
NumPad 381 
NumPad 082 
Decimal (.)86On numeric keypad
OEM_10287On UK and German keyboards
F1187 
F1288 
F13100(NEC PC98)
F14101(NEC PC98)
F15102(NEC PC98)
Kana112On Japanese keyboards
ABNT_C1115/? On Portuguese (Brazilian) keyboards
Convert121On Japanese keyboards
NoConvert123On Japanese keyboards
Yen125On Japanese keyboards
ABNT_C2126Numpad on Portuguese (Brazilian) keyboards
Equals141Equals (=) on numeric keypad (NEC PC98)
PrevTrack144Previous Track (DIK_CIRCUMFLEX) on Japanese keyboards
AT145(NEC PC98)
Colon (:)146(NEC PC98)
Underline147(NEC PC98)
Kanji148On Japanese keyboards
Stop149(NEC PC98)
AX150Japan AX
Unlabeled151(J3100)
Next track153Next Track
Enter156Enter on numeric keypad
Right control157 
Mute160Mute
Calculator161Calculator
Play/Pause162Play/pause
Media stop164Media stop
Volume down174Volume -
Volume up176Volume +
Web home178Web home
Comma (,)179On numeric keypad (NEC PC98)
Divide (/)181On numeric keypad
SysReq183 
Right Alt/menu184Right Alt
Pause197Pause
Home199Home on Arrow keypad
Up200Up Arrow on Arrow keypad
Page Up/Prior201Page Up on Arrow keypad
Left203Left Arrow on Arrow keypad
Right205Right Arrow on Arrow keypad
End207End Key on Arrow keypad
Down208Down Arrow on Arrow keypad
Next209Next Key on Arrow keypad
Insert210Insert Key on Arrow keypad
Delete211Delete Key on Arrow keypad
Left Windows219Left Windows key
Right Windows220Right Windows key
Apps221Apps Menu key
Power222System power
Sleep223System sleep
Wake227System wake
Web search229 
Web favorites230 
Web refresh231 
Web stop232 
Web forward233 
Web back234 
My Computer235 
Mail236 
Media select237 

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.35.255