ascii or scancodes?
ma.kalbfuss at web.de
Fri May 29 17:03:00 CEST 2009
I have another problem with my text snake game. It's about the use of
the keyboard functions of Crt.
The player record has some fields holding the keys for changing the
direction of the snake.
I want the following key sets as standard.
left -> a
right -> d
up -> w
down -> s
left -> arrow left
right -> arrow right
up -> arrow up
down -> arrow down
I found the scancodes for the arrow keys on the net, and they are
working. But the scancodes I found for the letters doesn't. I also read
that usb keyboards have different scancodes.
Is it possible to use scancodes platform independent?
Or are there ascii codes for the arrow keys, I could use?
More information about the Gpc