精华内容
下载资源
问答
  • 虚拟键VK值列表

    2019-12-17 19:52:52
    /* Virtual Keys, Standard Set*/ VK_LBUTTON 0x01 VK_RBUTTON 0x02 VK_CANCEL 0x03 VK_MBUTTON ...

    /* Virtual Keys, Standard Set*/

    VK_LBUTTON 0x01

    VK_RBUTTON 0x02

    VK_CANCEL 0x03

    VK_MBUTTON 0x04

    #define VK_LBUTTON 0x01 //鼠标左键

    #define VK_RBUTTON 0x02 //鼠标右键

    #define VK_CANCEL 0x03 //Ctrl + Break

    #define VK_MBUTTON 0x04 //鼠标中键/* NOT contiguous with L & RBUTTON */

    #define VK_BACK 0x08 //Backspace 键

    #define VK_TAB 0x09 //Tab 键

    #define VK_CLEAR 0x0C

    #define VK_RETURN 0x0D //回车键

    #define VK_SHIFT 0x10

    #define VK_CONTROL 0x11

    #define VK_MENU 0x12 //Alt 键

    #define VK_PAUSE 0x13

    #define VK_CAPITAL 0x14 //Caps Lock 键

    #define VK_KANA 0x15

    #define VK_HANGEUL 0x15 /* old name - should be here for compatibility */

    #define VK_HANGUL 0x15

    #define VK_JUNJA 0x17

    #define VK_FINAL 0x18

    #define VK_HANJA 0x19

    #define VK_KANJI 0x19

    #define VK_ESCAPE 0x1B //Esc 键

    #define VK_CONVERT 0x1C

    #define VK_NONCONVERT 0x1D

    #define VK_ACCEPT 0x1E

    #define VK_MODECHANGE 0x1F

    #define VK_SPACE 0x20 //空格

    #define VK_PRIOR 0x21 //Page Up 键

    #define VK_NEXT 0x22 //Page Down 键

    #define VK_END 0x23 //End 键

    #define VK_HOME 0x24 //Home 键

    #define VK_LEFT 0x25 /方向键/

    #define VK_UP 0x26

    #define VK_RIGHT 0x27

    #define VK_DOWN 0x28

    #define VK_SELECT 0x29

    #define VK_PRINT 0x2A

    #define VK_EXECUTE 0x2B

    #define VK_SNAPSHOT 0x2C //Print Screen 键

    #define VK_INSERT 0x2D //Insert键

    #define VK_DELETE 0x2E //Delete键

    #define VK_HELP 0x2F

    /* VK_0 thru VK_9 are the same as ASCII ‘0’ thru ‘9’ (0x30 - 0x39) */

    /* VK_A thru VK_Z are the same as ASCII ‘A’ thru ‘Z’ (0x41 - 0x5A) */

    #define VK_LWIN 0x5B //左WinKey(104键盘才有)

    #define VK_RWIN 0x5C //右WinKey(104键盘才有)

    #define VK_APPS 0x5D //AppsKey(104键盘才有)

    #define VK_NUMPAD0 0x60 //小键盘0-9

    #define VK_NUMPAD1 0x61

    #define VK_NUMPAD2 0x62

    #define VK_NUMPAD3 0x63

    #define VK_NUMPAD4 0x64

    #define VK_NUMPAD5 0x65

    #define VK_NUMPAD6 0x66

    #define VK_NUMPAD7 0x67

    #define VK_NUMPAD8 0x68

    #define VK_NUMPAD9 0x69

    #define VK_MULTIPLY 0x6A //乘

    #define VK_ADD 0x6B //加

    #define VK_SEPARATOR 0x6C //除

    #define VK_SUBTRACT 0x6D //减

    #define VK_DECIMAL 0x6E //小数点

    #define VK_DIVIDE 0x6F

    #define VK_F1 0x70 //功能键F1-F24

    #define VK_F2 0x71

    #define VK_F3 0x72

    #define VK_F4 0x73

    #define VK_F5 0x74

    #define VK_F6 0x75

    #define VK_F7 0x76

    #define VK_F8 0x77

    #define VK_F9 0x78

    #define VK_F10 0x79

    #define VK_F11 0x7A

    #define VK_F12 0x7B

    #define VK_F13 0x7C

    #define VK_F14 0x7D

    #define VK_F15 0x7E

    #define VK_F16 0x7F

    #define VK_F17 0x80

    #define VK_F18 0x81

    #define VK_F19 0x82

    #define VK_F20 0x83

    #define VK_F21 0x84

    #define VK_F22 0x85

    #define VK_F23 0x86

    #define VK_F24 0x87

    #define VK_NUMLOCK 0x90 //Num Lock 键

    #define VK_SCROLL 0x91 //Scroll Lock 键

    /*

    • VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.

    • Used only as parameters to GetAsyncKeyState() and GetKeyState().

    • No other API or message will distinguish left and right keys in this way.

    */

    #define VK_LSHIFT 0xA0

    #define VK_RSHIFT 0xA1

    #define VK_LCONTROL 0xA2

    #define VK_RCONTROL 0xA3

    #define VK_LMENU 0xA4

    #define VK_RMENU 0xA5

    #if(WINVER >= 0x0400)

    #define VK_PROCESSKEY 0xE5

    #endif /* WINVER >= 0x0400 */

    #define VK_ATTN 0xF6

    #define VK_CRSEL 0xF7

    #define VK_EXSEL 0xF8

    #define VK_EREOF 0xF9

    #define VK_PLAY 0xFA

    #define VK_ZOOM 0xFB

    #define VK_NONAME 0xFC

    #define VK_PA1 0xFD

    #define VK_OEM_CLEAR 0xFE


    /* Virtual Keys, Standard Set*/
    
    VK_LBUTTON                                      0x01
    
    VK_RBUTTON                                     0x02
    
    VK_CANCEL                                    0x03
    
    VK_MBUTTON                                     0x04
    
    #define VK_LBUTTON        0x01    //鼠标左键
    
    #define VK_RBUTTON        0x02    //鼠标右键 
    
    #define VK_CANCEL         0x03    //Ctrl + Break
    
    #define VK_MBUTTON        0x04    //鼠标中键/* NOT contiguous with L & RBUTTON */
    
    #define VK_BACK           0x08   //Backspace 键
    
    #define VK_TAB            0x09   //Tab 键
    
    #define VK_CLEAR          0x0C
    
    #define VK_RETURN         0x0D   //回车键
    
    #define VK_SHIFT          0x10
    
    #define VK_CONTROL        0x11
    
    #define VK_MENU           0x12   //Alt 键
    
    #define VK_PAUSE          0x13
    
    #define VK_CAPITAL        0x14   //Caps Lock 键 
    
    #define VK_KANA           0x15
    
    #define VK_HANGEUL        0x15 /* old name - should be here for compatibility */
    
    #define VK_HANGUL         0x15
    
    #define VK_JUNJA          0x17
    
    #define VK_FINAL          0x18
    
    #define VK_HANJA          0x19
    
    #define VK_KANJI          0x19
    
    #define VK_ESCAPE         0x1B   //Esc 键
    
    #define VK_CONVERT        0x1C
    
    #define VK_NONCONVERT     0x1D
    
    #define VK_ACCEPT         0x1E
    
    #define VK_MODECHANGE     0x1F
    
    #define VK_SPACE          0x20   //空格
    
    #define VK_PRIOR          0x21   //Page Up 键
    
    #define VK_NEXT           0x22   //Page Down 键
    
    #define VK_END            0x23   //End 键
    
    #define VK_HOME           0x24   //Home 键
    
    #define VK_LEFT           0x25  /*方向键*/
    
    #define VK_UP             0x26
    
    #define VK_RIGHT          0x27
    
    #define VK_DOWN           0x28
    
    #define VK_SELECT         0x29
    
    #define VK_PRINT          0x2A
    
    #define VK_EXECUTE        0x2B
    
    #define VK_SNAPSHOT       0x2C   //Print Screen 键
    
    #define VK_INSERT         0x2D  //Insert键
    
    #define VK_DELETE         0x2E  //Delete键
    
    #define VK_HELP           0x2F
    
    /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
    
    /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
    
    #define VK_LWIN           0x5B //左WinKey(104键盘才有) 
    
    #define VK_RWIN           0x5C //右WinKey(104键盘才有)
    
    #define VK_APPS           0x5D //AppsKey(104键盘才有) 
    
    #define VK_NUMPAD0        0x60 //小键盘0-9
    
    #define VK_NUMPAD1        0x61
    
    #define VK_NUMPAD2        0x62
    
    #define VK_NUMPAD3        0x63
    
    #define VK_NUMPAD4        0x64
    
    #define VK_NUMPAD5        0x65
    
    #define VK_NUMPAD6        0x66
    
    #define VK_NUMPAD7        0x67
    
    #define VK_NUMPAD8        0x68
    
    #define VK_NUMPAD9        0x69
    
    #define VK_MULTIPLY       0x6A //乘
    
    #define VK_ADD            0x6B //加
    
    #define VK_SEPARATOR      0x6C //除
    
    #define VK_SUBTRACT       0x6D //减
    
    #define VK_DECIMAL        0x6E //小数点
    
    #define VK_DIVIDE         0x6F 
    
    #define VK_F1             0x70 //功能键F1-F24
    
    #define VK_F2             0x71
    
    #define VK_F3             0x72
    
    #define VK_F4             0x73
    
    #define VK_F5             0x74
    
    #define VK_F6             0x75
    
    #define VK_F7             0x76
    
    #define VK_F8             0x77
    
    #define VK_F9             0x78
    
    #define VK_F10            0x79
    
    #define VK_F11            0x7A
    
    #define VK_F12            0x7B
    
    #define VK_F13            0x7C
    
    #define VK_F14            0x7D
    
    #define VK_F15            0x7E
    
    #define VK_F16            0x7F
    
    #define VK_F17            0x80
    
    #define VK_F18            0x81
    
    #define VK_F19            0x82
    
    #define VK_F20            0x83
    
    #define VK_F21            0x84
    
    #define VK_F22            0x85
    
    #define VK_F23            0x86
    
    #define VK_F24            0x87
    
    #define VK_NUMLOCK        0x90 //Num Lock 键
    
    #define VK_SCROLL         0x91 //Scroll Lock 键
    
    /*
    
    * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
    
    * Used only as parameters to GetAsyncKeyState() and GetKeyState().
    
    * No other API or message will distinguish left and right keys in this way.
    
    */
    
    #define VK_LSHIFT          0xA0
    
    #define VK_RSHIFT          0xA1
    
    #define VK_LCONTROL        0xA2
    
    #define VK_RCONTROL        0xA3
    
    #define VK_LMENU           0xA4
    
    #define VK_RMENU           0xA5
    
    #if(WINVER >= 0x0400)
    
    #define VK_PROCESSKEY      0xE5
    
    #endif /* WINVER >= 0x0400 */
    
    #define VK_ATTN            0xF6
    
    #define VK_CRSEL           0xF7
    
    #define VK_EXSEL           0xF8
    
    #define VK_EREOF           0xF9
    
    #define VK_PLAY            0xFA
    
    #define VK_ZOOM            0xFB
    
    #define VK_NONAME          0xFC
    
    #define VK_PA1             0xFD
    
    #define VK_OEM_CLEAR       0xFE
    
    展开全文
  • 键盘VK键值列表 /* Virtual Keys, Standard Set*/ VK_LBUTTON 0x01 VK_RBUTTON 0x02 VK_CANCEL ...
    键盘VK键值列表
     
     
    /* Virtual Keys, Standard Set*/
     
    VK_LBUTTON                                      0x01
    VK_RBUTTON                                     0x02
    VK_CANCEL                                    0x03
    VK_MBUTTON                                     0x04
     
    #define VK_LBUTTON        0x01    //鼠标左键
    #define VK_RBUTTON        0x02    //鼠标右键 
    #define VK_CANCEL         0x03    //Ctrl + Break
    #define VK_MBUTTON        0x04    //鼠标中键/* NOT contiguous with L & RBUTTON */
     
    #define VK_BACK           0x08   //Backspace 键
    #define VK_TAB            0x09   //Tab 键
     
    #define VK_CLEAR          0x0C
    #define VK_RETURN         0x0D   //回车键
     
    #define VK_SHIFT          0x10
    #define VK_CONTROL        0x11
    #define VK_MENU           0x12   //Alt 键
    #define VK_PAUSE          0x13
    #define VK_CAPITAL        0x14   //Caps Lock 键 
     
    #define VK_KANA           0x15
    #define VK_HANGEUL        0x15 /* old name - should be here for compatibility */
    #define VK_HANGUL         0x15
    #define VK_JUNJA          0x17
    #define VK_FINAL          0x18
    #define VK_HANJA          0x19
    #define VK_KANJI          0x19
     
    #define VK_ESCAPE         0x1B   //Esc 键
     
    #define VK_CONVERT        0x1C
    #define VK_NONCONVERT     0x1D
    #define VK_ACCEPT         0x1E
    #define VK_MODECHANGE     0x1F
     
    #define VK_SPACE          0x20   //空格
    #define VK_PRIOR          0x21   //Page Up 键
    #define VK_NEXT           0x22   //Page Down 键
    #define VK_END            0x23   //End 键
    #define VK_HOME           0x24   //Home 键
     
    #define VK_LEFT           0x25  /*方向键*/
    #define VK_UP             0x26
    #define VK_RIGHT          0x27
    #define VK_DOWN           0x28
     
    #define VK_SELECT         0x29
    #define VK_PRINT          0x2A
    #define VK_EXECUTE        0x2B
    #define VK_SNAPSHOT       0x2C   //Print Screen 键
     
    #define VK_INSERT         0x2D  //Insert键
    #define VK_DELETE         0x2E  //Delete键
     
    #define VK_HELP           0x2F
     
    /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
    /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
     
    #define VK_LWIN           0x5B //左WinKey(104键盘才有) 
    #define VK_RWIN           0x5C //右WinKey(104键盘才有)
    #define VK_APPS           0x5D //AppsKey(104键盘才有) 
     
    #define VK_NUMPAD0        0x60 //小键盘0-9
    #define VK_NUMPAD1        0x61
    #define VK_NUMPAD2        0x62
    #define VK_NUMPAD3        0x63
    #define VK_NUMPAD4        0x64
    #define VK_NUMPAD5        0x65
    #define VK_NUMPAD6        0x66
    #define VK_NUMPAD7        0x67
    #define VK_NUMPAD8        0x68
    #define VK_NUMPAD9        0x69
     
    #define VK_MULTIPLY       0x6A //乘
    #define VK_ADD            0x6B //加
    #define VK_SEPARATOR      0x6C //除
    #define VK_SUBTRACT       0x6D //减
    #define VK_DECIMAL        0x6E //小数点
    #define VK_DIVIDE         0x6F 
     
    #define VK_F1             0x70 //功能键F1-F24
    #define VK_F2             0x71
    #define VK_F3             0x72
    #define VK_F4             0x73
    #define VK_F5             0x74
    #define VK_F6             0x75
    #define VK_F7             0x76
    #define VK_F8             0x77
    #define VK_F9             0x78
    #define VK_F10            0x79
    #define VK_F11            0x7A
    #define VK_F12            0x7B
    #define VK_F13            0x7C
    #define VK_F14            0x7D
    #define VK_F15            0x7E
    #define VK_F16            0x7F
    #define VK_F17            0x80
    #define VK_F18            0x81
    #define VK_F19            0x82
    #define VK_F20            0x83
    #define VK_F21            0x84
    #define VK_F22            0x85
    #define VK_F23            0x86
    #define VK_F24            0x87
     
    #define VK_NUMLOCK        0x90 //Num Lock 键
    #define VK_SCROLL         0x91 //Scroll Lock 键
     
    /*
    * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
    * Used only as parameters to GetAsyncKeyState() and GetKeyState().
    * No other API or message will distinguish left and right keys in this way.
    */
    #define VK_LSHIFT          0xA0
    #define VK_RSHIFT          0xA1
    #define VK_LCONTROL        0xA2
    #define VK_RCONTROL        0xA3
    #define VK_LMENU           0xA4
    #define VK_RMENU           0xA5
     
    #if(WINVER >= 0x0400)
    #define VK_PROCESSKEY      0xE5
    #endif /* WINVER >= 0x0400 */
     
    #define VK_ATTN            0xF6
    #define VK_CRSEL           0xF7
    #define VK_EXSEL           0xF8
    #define VK_EREOF           0xF9
    #define VK_PLAY            0xFA
    #define VK_ZOOM            0xFB
    #define VK_NONAME          0xFC
    #define VK_PA1             0xFD
    #define VK_OEM_CLEAR       0xFE

    转载于:https://www.cnblogs.com/sc9602590/p/10912199.html

    展开全文
  • 键盘VK键值列表 /* Virtual Keys, Standard Set*/ VK_LBUTTON 0x01 VK_RBUTTON 0x02 VK_CANCEL 0x03 ...

    键盘VK键值列表

    /* Virtual Keys, Standard Set*/

    VK_LBUTTON                                      0x01

    VK_RBUTTON                                     0x02

    VK_CANCEL                                    0x03

    VK_MBUTTON                                     0x04

    #define VK_LBUTTON        0x01    //鼠标左键

    #define VK_RBUTTON        0x02    //鼠标右键 

    #define VK_CANCEL         0x03    //Ctrl + Break

    #define VK_MBUTTON        0x04    //鼠标中键/* NOT contiguous with L & RBUTTON */

    #define VK_BACK           0x08   //Backspace 键

    #define VK_TAB            0x09   //Tab 键

    #define VK_CLEAR          0x0C

    #define VK_RETURN         0x0D   //回车键

    #define VK_SHIFT          0x10

    #define VK_CONTROL        0x11

    #define VK_MENU           0x12   //Alt 键

    #define VK_PAUSE          0x13

    #define VK_CAPITAL        0x14   //Caps Lock 键 

    #define VK_KANA           0x15

    #define VK_HANGEUL        0x15 /* old name - should be here for compatibility */

    #define VK_HANGUL         0x15

    #define VK_JUNJA          0x17

    #define VK_FINAL          0x18

    #define VK_HANJA          0x19

    #define VK_KANJI          0x19

    #define VK_ESCAPE         0x1B   //Esc 键

    #define VK_CONVERT        0x1C

    #define VK_NONCONVERT     0x1D

    #define VK_ACCEPT         0x1E

    #define VK_MODECHANGE     0x1F

    #define VK_SPACE          0x20   //空格

    #define VK_PRIOR          0x21   //Page Up 键

    #define VK_NEXT           0x22   //Page Down 键

    #define VK_END            0x23   //End 键

    #define VK_HOME           0x24   //Home 键

    #define VK_LEFT           0x25  /*方向键*/

    #define VK_UP             0x26

    #define VK_RIGHT          0x27

    #define VK_DOWN           0x28

    #define VK_SELECT         0x29

    #define VK_PRINT          0x2A

    #define VK_EXECUTE        0x2B

    #define VK_SNAPSHOT       0x2C   //Print Screen 键

    #define VK_INSERT         0x2D  //Insert键

    #define VK_DELETE         0x2E  //Delete键

    #define VK_HELP           0x2F

    /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */

    /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */

    #define VK_LWIN           0x5B //左WinKey(104键盘才有) 

    #define VK_RWIN           0x5C //右WinKey(104键盘才有)

    #define VK_APPS           0x5D //AppsKey(104键盘才有) 

    #define VK_NUMPAD0        0x60 //小键盘0-9

    #define VK_NUMPAD1        0x61

    #define VK_NUMPAD2        0x62

    #define VK_NUMPAD3        0x63

    #define VK_NUMPAD4        0x64

    #define VK_NUMPAD5        0x65

    #define VK_NUMPAD6        0x66

    #define VK_NUMPAD7        0x67

    #define VK_NUMPAD8        0x68

    #define VK_NUMPAD9        0x69

    #define VK_MULTIPLY       0x6A //乘

    #define VK_ADD            0x6B //加

    #define VK_SEPARATOR      0x6C //除

    #define VK_SUBTRACT       0x6D //减

    #define VK_DECIMAL        0x6E //小数点

    #define VK_DIVIDE         0x6F 

    #define VK_F1             0x70 //功能键F1-F24

    #define VK_F2             0x71

    #define VK_F3             0x72

    #define VK_F4             0x73

    #define VK_F5             0x74

    #define VK_F6             0x75

    #define VK_F7             0x76

    #define VK_F8             0x77

    #define VK_F9             0x78

    #define VK_F10            0x79

    #define VK_F11            0x7A

    #define VK_F12            0x7B

    #define VK_F13            0x7C

    #define VK_F14            0x7D

    #define VK_F15            0x7E

    #define VK_F16            0x7F

    #define VK_F17            0x80

    #define VK_F18            0x81

    #define VK_F19            0x82

    #define VK_F20            0x83

    #define VK_F21            0x84

    #define VK_F22            0x85

    #define VK_F23            0x86

    #define VK_F24            0x87

    #define VK_NUMLOCK        0x90 //Num Lock 键

    #define VK_SCROLL         0x91 //Scroll Lock 键

    /*

    * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.

    * Used only as parameters to GetAsyncKeyState() and GetKeyState().

    * No other API or message will distinguish left and right keys in this way.

    */

    #define VK_LSHIFT          0xA0

    #define VK_RSHIFT          0xA1

    #define VK_LCONTROL        0xA2

    #define VK_RCONTROL        0xA3

    #define VK_LMENU           0xA4

    #define VK_RMENU           0xA5

    #if(WINVER >= 0x0400)

    #define VK_PROCESSKEY      0xE5

    #endif /* WINVER >= 0x0400 */

    #define VK_ATTN            0xF6

    #define VK_CRSEL           0xF7

    #define VK_EXSEL           0xF8

    #define VK_EREOF           0xF9

    #define VK_PLAY            0xFA

    #define VK_ZOOM            0xFB

    #define VK_NONAME          0xFC

    #define VK_PA1             0xFD

    #define VK_OEM_CLEAR       0xFE

    展开全文
  • 虚拟键VK值

    2016-02-22 10:49:06
    键盘 响应虚拟键值 C++ 编程开发!
  • C语言虚拟按键值

    千次阅读 2017-09-11 18:01:32
    符号常量 十六进制 指定的鼠标或键盘按键  VK_LBUTTON 01 鼠标左键  VK_RBUTTON 02 鼠标右键  VK_CANCEL 03 Control-break 过程  VK_MBUTTON 04 鼠标中  VK_BACK 08 BACKSPACE   VK_TAB 09 ...
    符号常量 十六进制值 指定的鼠标或键盘按键 
    VK_LBUTTON 01 鼠标左键 
    VK_RBUTTON 02 鼠标右键 
    VK_CANCEL 03 Control-break 过程 
    VK_MBUTTON 04 鼠标中键 
    VK_BACK 08 BACKSPACE 键 
    VK_TAB 09 TAB 键 
    VK_CLEAR 0C CLEAR 键 
    VK_RETURN 0D ENTER 键 
    VK_SHIFT 10 SHIFT 键 
    VK_CONTROL 11 CTRL 键 
    VK_MENU 12 ALT 键 
    VK_PAUSE 13 PAUSE 键 
    VK_CAPITAL 14 CAPS LOCK 键 
    VK_ESCAPE 1B ESC 键 
    VK_SPACE 20 SPACEBAR 
    VK_PRIOR 21 PAGE UP 键 
    VK_NEXT 22 PAGE DOWN 键 
    VK_END 23 END 键 
    VK_HOME 24 HOME 键 
    VK_LEFT 25 LEFT ARROW 键 
    VK_UP 26 UP ARROW 键 
    VK_RIGHT 27 RIGHT ARROW 键 
    VK_DOWN 28 DOWN ARROW 键 
    VK_SELECT 29 SELECT 键 
    VK_EXECUTE 2B EXECUTE 键 
    VK_SNAPSHOT 2C PRINT SCREEN键(用于Windows 3.0及以后版本) 
    VK_INSERT 2D INS 键 
    VK_DELETE 2E DEL 键 
    VK_HELP 2F HELP键 

    对于非小键盘上的数字键和字母键,直接在单引号中加入该键就行. 
    比如: a 键: 'A' 
    1 键: '1' 
    // /// 
    VK_LWIN 5B Left Windows 键 (Microsoft自然键盘) 
    VK_RWIN 5C Right Windows 键 (Microsoft自然键盘) 
    VK_APPS 5D Applications 键 (Microsoft自然键盘) 
    VK_NUMPAD0 60 数字小键盘上的 0 键 
    VK_NUMPAD1 61 数字小键盘上的 1 键 
    VK_NUMPAD2 62 数字小键盘上的 2 键 
    VK_NUMPAD3 63 数字小键盘上的 3 键 
    VK_NUMPAD4 64 数字小键盘上的 4 键 
    VK_NUMPAD5 65 数字小键盘上的 5 键 
    VK_NUMPAD6 66 数字小键盘上的 6 键 
    VK_NUMPAD7 67 数字小键盘上的 7 键 
    VK_NUMPAD8 68 数字小键盘上的 8 键 
    VK_NUMPAD9 69 数字小键盘上的 9 键 
    VK_MULTIPLY 6A Multiply 键 
    VK_ADD 6B Add键 
    VK_SEPARATOR 6C Separator 键 
    VK_SUBTRACT 6D Subtract 键 
    VK_DECIMAL 6E Decimal 键 
    VK_DIVIDE 6F Divide 键 
    VK_F1 70 F1 键 
    VK_F2 71 F2 键 
    VK_F3 72 F3 键 
    VK_F4 73 F4 键 
    VK_F5 74 F5 键 
    VK_F6 75 F6 键 
    VK_F7 76 F7 键 
    VK_F8 77 F8 键 
    VK_F9 78 F9 键 
    VK_F10 79 F10 键 
    VK_F11 7A F11 键 
    VK_F12 7B F12 键 
    VK_F13 7C F13 键 
    VK_F14 7D F14 键 
    VK_F15 7E F15 键 
    VK_F16 7F F16 键 
    VK_F17 80H F17 键 
    VK_F18 81H F18 键 
    VK_F19 82H F19 键 
    VK_F20 83H F20 键 
    VK_F21 84H F21 键 
    VK_F22 85H F22 键 
    VK_F23 86H F23 键 
    VK_F24 87H F24 键 
    VK_NUMLOCK 90 NUM LOCK 键 
    VK_SCROLL 91 SCROLL LOCK 键 
    VK_ATTN F6 Attn 键 
    VK_CRSEL F7 CrSel 键 
    VK_EXSEL F8 ExSel 键 
    VK_EREOF F9 Erase EOF 键 
    VK_PLAY FA Play 键 
    VK_ZOOM FB Zoom 键 
    VK_OEM_CLEAR FE Clear 键 
    举例说明这些键的用法: 
    (一)响应单独的按键: 
    先添加PreTranslateMessage()(响应WM_ CHAR)也是同样的效果,因为本例只捕捉键盘) 
    BOOL CMydilog::PreTranslateMessage( MSG* pMsg) 

    if (pMsg->message == WM_KEYDOWN) 

    if(pMsg->wParam=='M')// 直接用上面的虚码代替就可以响应所指键 
    MessageBox("hello");// 如果按下M键弹出消息. 

    return CDialog::PreTranslateMessage( pMsg); 

    (二)组合键的用法:(本例响应Ctrl+X键) 
    BOOL CMydilog::PreTranslateMessage( MSG* pMsg) 

    if (pMsg->message == WM_KEYDOWN) 

    switch (pMsg->wParam) 

    case VK_ESCAPE: 
    SetFocus (); 
    return TRUE; 
    case 'X': 
    if(::GetKeyState(VK_CONTROL) < 0 
    MessageBox("hello"); 
    return TRUE; 


    return CDialog::PreTranslateMessage( pMsg); 
    }


    ==================================================没有整理,直接拷过来,也不知道哪个全

    符号常量            十六进制值       指定的鼠标或键盘按键   
      VK_LBUTTON       01                鼠标左键   
      VK_RBUTTON       02                鼠标右键   
      VK_CANCEL         03                Control-break   过程   
      VK_MBUTTON       04                鼠标中键   
      VK_BACK             08                BACKSPACE   键   
      VK_TAB                09               TAB   键   
      VK_CLEAR            0C               CLEAR   键   
      VK_RETURN          0D               ENTER   键   
      VK_SHIFT            10                SHIFT   键   
      VK_CONTROL      11               CTRL   键   
      VK_MENU            12               ALT   键   
      VK_PAUSE           13               PAUSE   键   
      VK_CAPITAL        14               CAPS   LOCK   键   
      VK_ESCAPE         1B               ESC   键   
      VK_SPACE           20               SPACEBAR   
      VK_PRIOR           21               PAGE   UP   键   
      VK_NEXT             22                PAGE   DOWN   键   
      VK_END              23                END   键   
      VK_HOME           24                HOME   键   
      VK_LEFT             25                LEFT   ARROW   键   
      VK_UP                26                UP   ARROW   键   
      VK_RIGHT           27                RIGHT   ARROW   键   
      VK_DOWN          28                DOWN   ARROW   键   
      VK_SELECT         29                SELECT   键   
      VK_EXECUTE      2B                EXECUTE   键   
      VK_SNAPSHOT   2C                 PRINT   SCREEN键(用于Windows   3.0及以后版本)   
      VK_INSERT         2D                INS   键   
      VK_DELETE        2E                 DEL   键   
      VK_HELP            2F                 HELP键

      VK_LWIN           5B                 Left   Windows   键   (Microsoft自然键盘)   
      VK_RWIN           5C                 Right   Windows   键   (Microsoft自然键盘)   
      VK_APPS            5D                 Applications   键   (Microsoft自然键盘)   
      VK_NUMPAD0     60                 数字小键盘上的   0   键   
      VK_NUMPAD1     61                  数字小键盘上的   1   键   
      VK_NUMPAD2     62                  数字小键盘上的   2   键   
      VK_NUMPAD3     63                  数字小键盘上的   3   键   
      VK_NUMPAD4     64                  数字小键盘上的   4   键   
      VK_NUMPAD5     65                  数字小键盘上的   5   键   
      VK_NUMPAD6     66                  数字小键盘上的   6   键   
      VK_NUMPAD7     67                  数字小键盘上的   7   键   
      VK_NUMPAD8     68                  数字小键盘上的   8   键   
      VK_NUMPAD9     69                  数字小键盘上的   9   键   
      VK_MULTIPLY      6A                  Multiply   键   
      VK_ADD              6B                  Add键   
      VK_SEPARATOR   6C                 Separator   键   
      VK_SUBTRACT     6D                 Subtract   键   
      VK_DECIMAL       6E                  Decimal   键   
      VK_DIVIDE          6F                 Divide   键   
      VK_F1                 70                  F1   键   
      VK_F2                 71                  F2   键   
      VK_F3                 72                  F3   键   
      VK_F4                 73                  F4   键   
      VK_F5                 74                  F5   键   
      VK_F6                 75                  F6   键   
      VK_F7                 76                  F7   键   
      VK_F8                 77                  F8   键   
      VK_F9                 78                  F9   键   
      VK_F10               79                  F10   键   
      VK_F11               7A                  F11   键   
      VK_F12               7B                  F12   键   
      VK_F13               7C                  F13   键   
      VK_F14               7D                  F14   键   
      VK_F15               7E                  F15   键   
      VK_F16               7F                  F16   键   
      VK_F17              80                   F17   键   
      VK_F18              81                   F18   键   
      VK_F19              82                   F19   键   
      VK_F20              83                   F20   键   
      VK_F21              84                   F21   键   
      VK_F22              85                   F22   键   
      VK_F23              86                   F23   键   
      VK_F24              87                   F24   键   
      VK_NUMLOCK    90                   NUM   LOCK   键   
      VK_SCROLL       91                   SCROLL   LOCK   键   
      VK_ATTN            F6                   Attn   键   
      VK_CRSEL          F7                  CrSel   键   
      VK_EXSEL          F8                  ExSel   键   
      VK_EREOF         F9                   Erase   EOF   键   
      VK_PLAY            FA                  Play   键   
      VK_ZOOM          FB                  Zoom   键   
      VK_OEM_CLEAR  FE                 Clear   键  

    大键盘上的数字键用'0'-'9'表示,字母键用'A'-'Z'表示即可。

    这些常量定义在/VC98/Include/winuser.h中。

     

    使用时,VK_UP与0x26或38(ASCII)是等价的。

    展开全文
  • 键盘 C语言虚拟按键值

    千次阅读 2016-03-30 16:15:27
    符号常量 十六进制 指定的鼠标或键盘按键  VK_LBUTTON 01 鼠标左键  VK_RBUTTON 02 鼠标右键  VK_CANCEL 03 Control-break 过程  VK_MBUTTON 04 鼠标中  VK_BACK 08 BACKSPACE   VK_TAB 09 TAB   VK_...
  • DELPHI 常用虚拟键VK_

    千次阅读 2010-12-27 10:15:00
      常数名称 十六进制 十进制 对应按键 VK_LBUTTON 01 1 鼠标的左键 VK_RBUTTON 02 2 鼠标的右键 VK-CANCEL 03 3 
  • 虚拟按键

    千次阅读 2019-05-11 20:59:07
    虚拟键码 对应 对应 VK_LBUTTON 1 鼠标左键 VK_RBUTTON 2 鼠标右键 VK_CANCEL 3 Cancel VK_MBUTTON 4 鼠标中 VK_XBUTTON1 5 VK_XBUTTON2 6 VK_...
  • MFC 虚拟键值VK

    千次阅读 2010-11-01 11:06:00
    #define VK_LBUTTON 0x01  #define VK_RBUTTON 0x02   #define VK_CANCEL 0x03   #define VK_MBUTTON 0x04   #define VK_BACK 0x08   #define VK_TAB 0x09 
  • ESC键VK_ESCAPE (27) 回车VK_RETURN (13) TABVK_TAB (9) Caps LockVK_CAPITAL (20) ShiftVK_SHIFT (16) CtrlVK_CONTROL (17) AltVK_MENU (18) 空格VK_SPACE (32) 退格VK_BACK (8) ...
  • 虚拟键盘对应键值

    2018-11-13 14:19:40
    虚拟键 十六进制 十进制 相应键盘或鼠标键 VK_LBUTTON 1 1 鼠标左键 VK_RBUTTON 2 2 鼠标右键 VK_CANCEL 3 3 Ctrl-Break键 VK_MBUTTON 4 4 鼠标中键 ...
  • VC++虚拟按键代码

    2014-01-21 15:59:24
    符号常量 十六进制 指定的鼠标或键盘按键 VK_LBUTTON 01 鼠标左键 VK_RBUTTON 02 鼠标右键 VK_CANCEL 03 Control-break 过程 VK_MBUTTON 04 鼠标中 VK_BACK 08 BACKSPACE VK_TAB 09 TAB ...
  • 虚拟按键总结列表

    千次阅读 2006-05-16 09:50:00
    在编程当中,我们会经常用到虚拟按键,然而具体的对应关系我们经常需要现查,下面将一些常用的虚拟按键总结如下:符号常量 十六进制 指定的鼠标或键盘按键VK_LBUTTON 01 鼠标左键VK_RBUTTON 02 鼠标右键VK_...
  • 与C/C++相比,某些键(如shift,[,],Del等)的虚拟键代码在java中显示为不同的.例如 :Key Java C/C++++Shift 16 160[ 91 219] 93 221\ 92 220Del 127 46Window 524 ...
  • Windows VK_虚拟键盘表

    2010-07-08 15:30:00
    1键盘VK值表22007-11-0118:393VK_LBUTTON0x014VK_RBUTTON0x025VK_CANCEL0x036VK_MBUTTON0x047VK_BACK0x088VK_TAB0x099VK_CLEAR0x0C10VK_RETURN11VK_ENTER0x0D12VK_...
  • 符号常量 十六进制 指定的鼠标或键盘按键  VK_LBUTTON 01 鼠标左键  VK_RBUTTON 02 鼠标右键  VK_CANCEL 03 Control-break 过程  VK_MBUTTON 04 鼠标中  VK_BACK 08 BACKSPACE   VK...
  • 虚拟按键的总结

    2008-10-27 17:19:00
    Windows消息中的虚拟键列表(VC Virtual Key)VK_LBUTTON 鼠标左键 0x01VK_RBUTTON 鼠标右键 0x02VK_CANCEL Ctrl + Break 0x03VK_MBUTTON 鼠标中键 0x04 VK_BACK Backspace 键 0x08VK_TAB Tab 键 0x09VK_RETURN 回车键...
  • 符号常量 十六进制 指定的鼠标或键盘按键  VK_LBUTTON 01 鼠标左键  VK_RBUTTON 02 鼠标右键  VK_CANCEL 03 Control-break 过程  VK_MBUTTON 04 鼠标中  VK_BACK 08 BACKSPACE  VK_TAB 09 TAB ...
  • 符号常量 十六进制 指定的鼠标或键盘按键 VK_LBUTTON 01 鼠标左键 VK_RBUTTON 02 鼠标右键 VK_CANCEL 03 Control-break 过程 VK_MBUTTON 04 鼠标中 VK_BACK 08 BACKSPACE VK_TAB 09 TAB VK_CLEAR 0C CLEAR...
  • 虚拟按键的总结及示例: (转)[@more@]符号常量 十六进制 指定的鼠标或键盘按键VK_LBUTTON 01 鼠标左键VK_RBUTTON 02 鼠标右键VK_CANCEL 03 Control-break ...
  • VC键盘虚拟按键...

    2008-11-17 14:12:00
    摘自:http://hi.baidu.com/stone5566/blog/item/81f28d388c81dac3d46225cb.html符号常量 十六进制 指定的鼠标或键盘按键VK_LBUTTON 01 鼠标左键VK_RBUTTON 02 鼠标右键VK_CANCEL 03 Control-break 过程VK...
  • 虚拟按键 鼠标操作

    千次阅读 2012-11-30 14:42:26
    虚拟按键 鼠标操作  2011-10-08 17:47:46| 分类: python | 标签: |字号大中小 订阅 今天用win32gui.SendMessage(hld, win32con.WM_SYSCOMMAND, win32con.SC_CLOSE, 0)关闭minitab窗口竟然让程式...
  • 虚拟按键的总结及示例:

    千次阅读 2004-05-17 17:03:00
    符号常量 十六进制 指定的鼠标或键盘按键VK_LBUTTON 01 鼠标左键VK_RBUTTON 02 鼠标右键VK_CANCEL 03 Control-break 过程VK_MBUTTON 04 鼠标中VK_BACK 08 BACKSPACE VK_TAB 09 TAB VK_CLEAR 0...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,118
精华内容 1,247
关键字:

虚拟键vk值