what are the values of the keyboard keys:
Esc , up arrow, down arrow, left arrow, right arrow, tab, shift, enter and space?
I want to use them in a game I am writing in x86 and I want to detect if those key were pressed by the player with the ax, 0 int 16h
interrupt. Thank you all for helping me
Asked
Active
Viewed 29 times
0

user17341742
- 59
- 4
-
1Sounds like you want to read raw scan-codes, not terminal input, if you want to detect presses of shift keys and so on. Google `bios scan codes` if you want to do it using BIOS input functions like AH=0 / int 16h (https://en.wikipedia.org/wiki/INT_16H) – Peter Cordes Feb 22 '22 at 10:12
-
ESC has an ASCII code: 27 (decimal) – Martin Rosenau Feb 22 '22 at 10:16
-
[What are the scan codes for keyboard arrows? (right,left,down,up)](https://stackoverflow.com/q/23188540) is a partial duplicate, but unfortunately doesn't link where to find more for keys it doesn't mention. With an edit to add a reference for such info, it could maybe work as a duplicate. Of course, you can just try it (e.g. in a debugger). – Peter Cordes Feb 22 '22 at 10:30
-
1Note that the scan codes for keys are not a property of the x86 architecture but rather of the computer built around it. In your case, you are working on a PC, so it's a detail of the PC architecture. – fuz Feb 22 '22 at 12:28