scan codes

I need help on how to use scan codes. I have a scan code chart, but I don't know how to use them. Suppose I want to lock the 'up arrow key', how can I do it?
Any help will be appreciated.
It depends on how you are getting them.

If it is directly from the keyboard interrupt, then they are exactly as they appear, with the "make" or "break" bit set appropriately.

If you are using some version of <conio.h> 's getch(), then they are probably given to you unchanged. To test to see if an extended key is pressed, and accounting for modern hardware/systems, you'll have to check as I have listed here:
http://www.cplusplus.com/forum/beginner/12361/#msg59186

If you are using some other input method, let us know.

Good luck!

[edit]
More reading on keyboards: http://www.cplusplus.com/forum/general/4237/#msg18827
Last edited on
Topic archived. No new replies allowed.