Keyboard codes are often used in underlying development. Sometimes we forget them, so we have to rush to the key-code table to view them. In fact, the program can print the key-code value by itself.
#include <stdio.h> #include <bios.h> int main(void) { int key, modifiers; while ((key=bioskey(0)) != 0 && key!=0x11b){ printf("0x%x ",key); } return 0; }
Scan key
Functional Area
0x011b ESC
0x3b00 F1
0x3c00 F2
0x3d00 F3
0x3e00 F4
0x3f00 F5
0X4000 F6
0x4100 F7
0x4200 F8
0x4300 F9
0x4400 F10
Primary Key area:
0x2960 ~
0x0231 1
0x0332 2
0x0433 3
0x0534 4
0x0635 5
0x0736 6
0x0837 7
0x0938 8
0x0a39 9
0x0b30 0
0x0c2d-
0x0d3d =
0x2b5c \
0x0e08 return key
0x0f09 Tab
0x1071 Q
0x1177 W
0x1265 E
0x1372 R
0x1474 t
0x1579 y
0x1675 u
0x1769 I
0x186f o
0x1970 p
0x1a5b [
0x1b5d]
0x1e61
0x1f73 s
0x2064 d
0x2166 F
0x2267g
0x2368 H
0x246a J
0x256b K
0x266c L
0x273b;
0x2827'
0x1c0d press ENTER
0x2c7a Z
0x2d78 x
0x2e63 C
0x2f76 v
0x3062 B
0x0000e n
0x326d m
0x332c,
0x342e.
0x352f/
0x3920 Space key
Right numeric keyboard:
0x5200 insert
0x4700 home
0x4900 page up
0x5300 Delete
0x4f00 end
0x5100 Pagedown
0x4800 up arrow
0x4b00 left arrow
0x5000 down arrow
0x4d00 right arrow
0x352f/
0x372a *
0x4a2d-(Note: This is a numeric keyboard)
0x4737 7
0x4838 8
0x4939 9
0x4b34 4
0x4c35 5
0x4d36 6
0x4e2b +
0x4f31 1
0x5032 2
0x5133 3
0x5230 0
0x532e del