鍵盤鍵值對照

2021-04-13 01:46:55 字數 3891 閱讀 7828

const   byte   zkey_a             =     0x1e;  

const   byte   zkey_b             =     0x30;  

const   byte   zkey_c             =     0x2e;  

const   byte   zkey_d             =     0x20;  

const   byte   zkey_e             =     0x12;  

const   byte   zkey_f             =     0x21;  

const   byte   zkey_g             =     0x22;  

const   byte   zkey_h             =     0x23;  

const   byte   zkey_i             =     0x17;  

const   byte   zkey_j             =     0x24;  

const   byte   zkey_k             =     0x25;  

const   byte   zkey_l             =     0x26;  

const   byte   zkey_m             =     0x32;  

const   byte   zkey_n             =     0x31;  

const   byte   zkey_o             =     0x18;  

const   byte   zkey_p             =     0x19;  

const   byte   zkey_q             =     0x10;  

const   byte   zkey_r             =     0x13;  

const   byte   zkey_s             =     0x1f;  

const   byte   zkey_t             =     0x14;  

const   byte   zkey_u             =     0x16;  

const   byte   zkey_v             =     0x2f;  

const   byte   zkey_w             =     0x11;  

const   byte   zkey_x             =     0x2d;  

const   byte   zkey_y             =     0x15;  

const   byte   zkey_z             =     0x2c;  

const   byte   zkey_1             =     0x02;  

const   byte   zkey_2             =     0x03;  

const   byte   zkey_3             =     0x04;  

const   byte   zkey_4             =     0x05;  

const   byte   zkey_5             =     0x06;  

const   byte   zkey_6             =     0x07;  

const   byte   zkey_7             =     0x08;  

const   byte   zkey_8             =     0x09;  

const   byte   zkey_9             =     0x0a;  

const   byte   zkey_0             =     0x0b;  

const   byte   zkey_f1           =     0x3b;  

const   byte   zkey_f2           =     0x3c;  

const   byte   zkey_f3           =     0x3d;  

const   byte   zkey_f4           =     0x3e;  

const   byte   zkey_f5           =     0x3f;  

const   byte   zkey_f6           =     0x40;  

const   byte   zkey_f7           =     0x41;  

const   byte   zkey_f8           =     0x42;  

const   byte   zkey_f9           =     0x43;  

const   byte   zkey_f10         =     0x44;  

const   byte   zkey_f11         =     0x57;  

const   byte   zkey_f12         =     0x58;  

const   byte   zkey_up           =     0xc8;  

const   byte   zkey_down       =     0xd0;  

const   byte   zkey_left       =     0xcb;  

const   byte   zkey_right     =     0xcd;  

const   byte   zkey_pgup       =     0xc9;  

const   byte   zkey_pgdown   =     0xd1;  

const   byte   zkey_home       =     0xc7;  

const   byte   zkey_end         =     0xcf;  

const   byte   zkey_back       =     0x0e;  

const   byte   zkey_space     =     0x39;  

const   byte   zkey_enter     =     0x1c;  

const   byte   zkey_tab         =     0x0f;  

const   byte   zkey_lshift   =     0x2a;  

const   byte   zkey_rshift   =     0x36;  

const   byte   zkey_lctrl     =     0x1d;  

const   byte   zkey_lalt       =     0x38;  

const   byte   zkey_ralt       =     0xb8;  

const   byte   zkey_del         =     0xd3;  

const   byte   zkey_ins         =     0xd2;  

const   byte   zkey_prtsc     =     0xb7;  

const   byte   zkey_esc         =     0x01;

for(;;)  

if(kbhit())   ;如果有鍵按下  

就可以得到輸入的什麼東西了 

char ch = bioskey(0);    可以獲得按鍵值

常用鍵盤鍵值

以下資料主要來自網際網路,感謝相關兄弟的無私奉獻 vbkeylbutton 0x1 滑鼠左鍵 vbkeyrbutton 0x2 滑鼠右鍵 vbkeycancel 0x3 cancel 鍵 vbkeymbutton 0x4 滑鼠中鍵 vbkeyback 0x8 backspace 鍵 vbkeytab...

鍵盤鍵值表

值 描述 0x1 滑鼠左鍵 0x2 滑鼠右鍵 0x3 cancel 鍵 0x4 滑鼠中鍵 0x8 backspace 鍵 0x9 tab 鍵 0xc clear 鍵 0xd enter 鍵 0x10 shift 鍵 0x11 ctrl 鍵 0x12 menu 鍵 0x13 pause 鍵 0x14 ...

鍵盤鍵值表

值 描述 0x1 滑鼠左鍵 0x2 滑鼠右鍵 0x3 cancel 鍵 0x4 滑鼠中鍵 0x8 backspace 鍵 0x9 tab 鍵 0xc clear 鍵 0xd enter 鍵 0x10 shift 鍵 0x11 ctrl 鍵 0x12 menu 鍵 0x13 pause 鍵 0x14 ...