O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required