zoukankan      html  css  js  c++  java
  • 键盘扫描码(转)(转自:http://blog.sina.com.cn/s/blog_4d75136a0100doxp.html)

    键盘扫描码(转)

    键盘扫描码
    Esc1 F159 F260 F361 F462 F563 F664 F765 F866 F967 F1068 F1187 F1288
    ` 41   2 2 3 3 4 4 5 5 6  7 7 8 8 9 910 011 - 12 = 13 43  14
    Tab15 Q 16 W17 E18 R19 T20 Y21 U22 I23 O24 P25 [ 26 ] 27
    Caps58 A 30 S31 D32 F33 G34 H35 J36 K37 L38 ;39 ' 40 Enter 28
    Shift42 Z 44 X45 C46 V47 B48 N49 M50 ,51 .52 /53 Shift 54
    Ctrl29 Win219 Alt184
    Space 57
    Alt184 Win220 Menu221 Ctrl 157
    Wake
    Up
    Sleep Power
      
                       
    Ins210 Home199 PgUp201 Num197  181 *55   - 74
    Del211 End207 PgDn209 7 71 872 973 + 78
    4 75 576 677
    200 1 79 280 381 Enter156
    203 208  205 0 82 .83

    这里罗列了键盘上各键的扫描码,还有ALT、CTR、SHIFT与部分键的组合扫描码。这对于编写需要键盘处理的程序应该有所帮助!

    #define KEY_L1 0x4F  
    #define KEY_L2 0x50
    #define KEY_L3 0x51
    #define KEY_L4 0x4B
    #define KEY_L6 0x4D
    #define KEY_L7 0x47
    #define KEY_L8 0x48
    #define KEY_L9 0x49
    #define KEY_ADD 0x2B
    #define KEY_SUB 0x2D
    #define KEY_LEFT 75      
    #define KEY_RIGHT 77    
    #define KEY_UP 72        
    #define KEY_DOWN 80      
    #define KEY_F1 59
    #define KEY_F2 60
    #define KEY_F3 61
    #define KEY_F4 62
    #define KEY_F5 63
    #define KEY_F6 64
    #define KEY_F7 65
    #define KEY_F8 66
    #define KEY_F9 67
    #define KEY_F10 68
    #define KEY_INSERT 82
    #define KEY_HOME 71
    #define KEY_PAGEUP 73
    #define KEY_PAGEDOWN 81
    #define KEY_DEL 83
    #define KEY_END 79

    #define KEY_DASH 12
    #define KEY_EQUAL 13
    #define KEY_LBRACKET 26
    #define KEY_RBRACKET 27
    #define KEY_SEMICOLON 39
    #define KEY_RQUOTE 40
    #define KEY_LQUOTE 41
    #define KEY_PERIOD 52
    #define KEY_COMMA 51
    #define KEY_SLASH 53
    #define KEY_BACKSLASH 43
    #define KEY_ENTER 28        
    #define KEY_BACKSPACE 14    
    #define KEY_SPACE 57        
    #define KEY_TAB 15
    #define KEY_ESC 1
    #define KEY_Q 16
    #define KEY_W 17
    #define KEY_E 18
    #define KEY_R 19
    #define KEY_T 20
    #define KEY_Y 21
    #define KEY_U 22
    #define KEY_I 23
    #define KEY_O 24
    #define KEY_P 25
    #define KEY_A 30
    #define KEY_S 31
    #define KEY_D 32
    #define KEY_F 33
    #define KEY_G 34
    #define KEY_H 35
    #define KEY_J 36
    #define KEY_K 37
    #define KEY_L 38
    #define KEY_Z 44
    #define KEY_X 45
    #define KEY_C 46
    #define KEY_V 47
    #define KEY_B 48
    #define KEY_N 49
    #define KEY_M 50
    #define KEY_1 2
    #define KEY_2 3
    #define KEY_3 4
    #define KEY_4 5
    #define KEY_5 6
    #define KEY_6 7
    #define KEY_7 8
    #define KEY_8 9
    #define KEY_9 10
    #define KEY_0 11

    /+++++++++++++++++++++++++CTR+各键扫描码+++++++++++++++++++++++++/
    #define KEY_F1 0x5E
    #define KEY_F2 0x5F
    #define KEY_F3 0x60
    #define KEY_F4 0x61
    #define KEY_F5 0x62
    #define KEY_F6 0x63
    #define KEY_F7 0x64
    #define KEY_F8 0x65
    #define KEY_F9 0x66
    #define KEY_F10 0x67
    #define KEY_2 0x03
    #define KEY_6 0x1E
    #define KEY_Q 0x11
    #define KEY_W 0x17
    #define KEY_E 0x05
    #define KEY_R 0x12
    #define KEY_T 0x14
    #define KEY_Y 0x19
    #define KEY_U 0x15
    #define KEY_I 0x09
    #define KEY_O 0x0F
    #define KEY_P 0x10
    #define KEY_LBRACKET 0x1B  
    #define KEY_RBRACKET 0x1D  
    #define KEY_A 0x01
    #define KEY_S 0x13
    #define KEY_D 0x04
    #define KEY_F 0x06
    #define KEY_G 0x07
    #define KEY_H 0x08
    #define KEY_J 0x0A
    #define KEY_K 0x0B
    #define KEY_L 0x0C
    #define KEY_Z 0x1A
    #define KEY_X 0x18
    #define KEY_C 0x03
    #define KEY_V 0x16
    #define KEY_B 0x02
    #define KEY_N 0x0E
    #define KEY_M 0x0D
    #define KEY_SPACE 0x20
    #define KEY_BACKSPACE 0x7F
    #define KEY_ENTER 0x0A
    #define KEY_BACKSLASH 0x1C  
    #define KEY_L1 0x75  
    #define KEY_L3 0x76
    #define KEY_L4 0x73
    #define KEY_L6 0x74
    #define KEY_L7 0x77
    #define KEY_L9 0x84

    /+++++++++++++++++++++++++SHIFT+各键扫描码+++++++++++++++++++++++++/
    #define KEY_LQUOTE 0x7E  
    #define KEY_1 0x21
    #define KEY_2 0x40
    #define KEY_3 0x23
    #define KEY_4 0x24
    #define KEY_5 0x25
    #define KEY_6 0x5E
    #define KEY_7 0x26
    #define KEY_8 0x2A
    #define KEY_9 0x28
    #define KEY_0 0x29
    #define KEY_DASH 0x5F  
    #define KEY_EQUAL 0x2B  
    #define KEY_BACKSPACE 0x08
    #define KEY_Q 0x51
    #define KEY_W 0x57
    #define KEY_E 0x45
    #define KEY_R 0x52
    #define KEY_T 0x54
    #define KEY_Y 0x59
    #define KEY_U 0x55
    #define KEY_I 0x49
    #define KEY_O 0x4F
    #define KEY_P 0x50
    #define KEY_LBRACKET 0x7B  
    #define KEY_RBRACKET 0x7D  
    #define KEY_ENTER 0x0D
    #define KEY_A 0x41
    #define KEY_S 0x53
    #define KEY_D 0x44
    #define KEY_F 0x46
    #define KEY_G 0x47
    #define KEY_H 0x48
    #define KEY_J 0x4A

    个人主页: http://www.lslxdx.com
  • 相关阅读:
    cf B. Sereja and Suffixes
    cf E. Dima and Magic Guitar
    cf D. Dima and Trap Graph
    cf C. Dima and Salad
    最短路径问题(floyd)
    Drainage Ditches(网络流(EK算法))
    图结构练习—BFSDFS—判断可达性(BFS)
    Sorting It All Out(拓扑排序)
    Power Network(最大流(EK算法))
    Labeling Balls(拓扑)
  • 原文地址:https://www.cnblogs.com/lslxdx/p/1728091.html
Copyright © 2011-2022 走看看