虚拟键码VK值大全(Virtual-Key_Codes)

合集下载

VR虚拟现实-VB键盘常量大全256个虚拟键码 精品

VR虚拟现实-VB键盘常量大全256个虚拟键码 精品

Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public Const VK_MENU = &H12 Public Const VK_PAUSE = &H13 Public Const VK_CAPITAL = &H14 Public Const VK_ESCAPE = &H1B Public Const VK_SPACE = &H20 Public Const VK_PRIOR = &H21 Public Const VK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26Public Const VK_RIGHT = &H27 Public Const VK_DOWN = &H28 Public Const VK_Select = &H29 Public Const VK_PRINT = &H2A Public Const VK_EXECUTE = &H2B Public Const VK_SNAPSHOT = &H2C Public Const VK_Insert = &H2D Public Const VK_Delete = &H2E Public Const VK_HELP = &H2F Public Const VK_0 = &H30Public Const VK_1 = &H31Public Const VK_2 = &H32Public Const VK_3 = &H33Public Const VK_4 = &H34Public Const VK_5 = &H35Public Const VK_6 = &H36Public Const VK_7 = &H37Public Const VK_8 = &H38Public Const VK_9 = &H39Public Const VK_A = &H41Public Const VK_B = &H42Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_F = &H46Public Const VK_G = &H47Public Const VK_H = &H48Public Const VK_I = &H49Public Const VK_J = &H4APublic Const VK_K = &H4BPublic Const VK_L = &H4CPublic Const VK_M = &H4DPublic Const VK_N = &H4EPublic Const VK_O = &H4FPublic Const VK_P = &H50Public Const VK_Q = &H51Public Const VK_R = &H52Public Const VK_S = &H53Public Const VK_T = &H54Public Const VK_U = &H55Public Const VK_V = &H56Public Const VK_W = &H57Public Const VK_X = &H58Public Const VK_Y = &H59Public Const VK_Z = &H5APublic Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69 Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6BPublic Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6FPublic Const VK_F1 = &H70Public Const VK_F2 = &H71Public Const VK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F6 = &H75Public Const VK_F7 = &H76Public Const VK_F8 = &H77Public Const VK_F9 = &H78Public Const VK_F10 = &H79Public Const VK_F11 = &H7APublic Const VK_F12 = &H7BPublic Const VK_F13 = &H7CPublic Const VK_F14 = &H7DPublic Const VK_F15 = &H7EPublic Const VK_F16 = &H7FPublic Const VK_F17 = &H80Public Const VK_F18 = &H81Public Const VK_F19 = &H82Public Const VK_F20 = &H83Public Const VK_F21 = &H84Public Const VK_F22 = &H85Public Const VK_F23 = &H86Public Const VK_F24 = &H87Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBA Public Const VK_OEM_PLUS = &HBB Public Const VK_OEM_MA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBF Public Const VK_OEM_3 = &HC0 Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDF Public Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4 Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEA Public Const VK_OEM_PA1 = &HEB Public Const VK_OEM_PA2 = &HECPublic Const VK_OEM_PA3 = &HEDPublic Const VK_OEM_WSCTRL = &HEEPublic Const VK_OEM_CUSEL = &HEFPublic Const VK_OEM_A TTN = &HF0Public Const VK_OEM_FINNISH = &HF1Public Const VK_OEM_COPY = &HF2Public Const VK_OEM_AUTO = &HF3Public Const VK_OEM_ENLW = &HF4Public Const VK_OEM_BACKTAB = &HF5Public Const VK_ATTN = &HF6Public Const VK_CRSEL = &HF7Public Const VK_EXSEL = &HF8Public Const VK_EREOF = &HF9Public Const VK_PLAY = &HFAPublic Const VK_ZOOM = &HFBPublic Const VK_NONAME = &HFCPublic Const VK_PA1 = &HFDPublic Const VK_OEM_CLEAR = &HFE虚拟键码虚拟键码保存在WM_KEYDOWN、WM_KEYUP、WM_SYSKEYDOWN和WM_SYSKEYUP 讯息的wParam参数中。

虚拟键码VK值大全(Virtual-Key_Codes)

虚拟键码VK值大全(Virtual-Key_Codes)
VK_OEM_8
用于其他字符,它可以通过键盘的不同而有所差异。
0xDF
-
保留的
0XE0
0xE1
OEM特定
VK_OEM_102
无论是尖括号键或RT 102键键盘上的反斜杠键
0xE2
0xE3-E4
OEM特定
VK_PROCESSKEY
IME处理重要
0xE5
0xE6
OEM特定
VK_PACKET
用于传递Unicode字符,如果他们的击键。VK_PACKET关键是一个32位的虚拟键值用于非键盘输入法的低字中。有关详细信息,请参阅“备注”KEYBDINPUT,SendInput,WM_KEYDOWN,WM_KEYUP
分隔符键
0x6C
VK_SUBTRACT
减去关键
0x6D
VK_DECIMAL
十进位的关键
0x6E
VK_DIVIDE
除以关键
0x6F
VK_F1
F1键
0x70
VK_F2
F2键
0x71
VK_F3
F3键
0x72
VK_F4
F4键
为0x73
VK_F5
F5键
0x74
VK_F6
F6键
0x75
VK_F7
F7键
0x76
VK_F8
F8键
0x77
VK_F9
F9键
0x78
VK_F10
F10键
0x79
VK_F11
F11键
0x7A
VK_F12
F12键
0x7B
VK_F13
F13键
0x7C
VK_F14
F14键
0x7D

虚拟键码表

虚拟键码表

下面就是虚拟键码表Virtual Key Code Corresponding key VK_LBUTTON Left mouse buttonVK_RBUTTON Right mouse buttonVK_CANCEL Control+BreakVK_MBUTTON Middle mouse buttonVK_BACK Backspace keyVK_TAB Tab keyVK_CLEAR Clear keyVK_RETURN Enter keyVK_SHIFT Shift keyVK_CONTROL Ctrl keyVK_MENU Alt keyVK_PAUSE Pause keyVK_CAPITAL Caps Lock keyVK_KANA Used with IMEVK_HANGUL Used with IMEVK_JUNJA Used with IMEVK_FINAL Used with IMEVK_HANJA Used with IMEVK_KANJI Used with IMEVK_CONVERT Used with IMEVK_NONCONVERT Used with IMEVK_ACCEPT Used with IMEVK_MODECHANGE Used with IMEVK_ESCAPE Esc keyVK_SPACE Space barVK_PRIOR Page Up keyVK_NEXT Page Down keyVK_END End keyVK_HOME Home keyVK_LEFT Left Arrow keyVK_UP Up Arrow keyVK_RIGHT Right Arrow keyVK_DOWN Down Arrow keyVK_SELECT Select keyVK_PRINT Print key (keyboard-specific)VK_EXECUTE Execute keyVK_SNAPSHOT Print Screen keyVK_INSERT Insert keyVK_DELETE Delete keyVK_HELP Help keyVK_LWIN Left Windows key (Microsoft keyboard)VK_RWIN Right Windows key (Microsoft keyboard) VK_APPS Applications key (Microsoft keyboard)VK_NUMPAD0 0 key (numeric keypad)VK_NUMPAD1 1 key (numeric keypad)VK_NUMPAD2 2 key (numeric keypad)VK_NUMPAD3 3 key (numeric keypad)VK_NUMPAD4 4 key (numeric keypad)VK_NUMPAD5 5 key (numeric keypad)VK_NUMPAD6 6 key (numeric keypad)VK_NUMPAD7 7 key (numeric keypad)VK_NUMPAD8 8 key (numeric keypad)VK_NUMPAD9 9 key (numeric keypad)VK_MULTIPL Y Multiply key (numeric keypad)VK_ADD Add key (numeric keypad)VK_SEPARATOR Separator key (numeric keypad)VK_SUBTRACT Subtract key (numeric keypad)VK_DECIMAL Decimal key (numeric keypad)VK_DIVIDE Divide key (numeric keypad)VK_F1 F1 keyVK_F2 F2 keyVK_F3 F3 keyVK_F4 F4 key VK_F5 F5 key VK_F6 F6 key VK_F7 F7 key VK_F8 F8 key VK_F9 F9 key VK_F10 F10 key VK_F11 F11 key VK_F12 F12 key VK_F13 F13 key VK_F14 F14 key VK_F15 F15 keyVK_F16 F16 key VK_F17 F17 key VK_F18 F18 key VK_F19 F19 key VK_F20 F20 key VK_F21 F21 key VK_F22 F22 key VK_F23 F23 key VK_F24 F24 keyVK_NUMLOCK Num Lock keyVK_SCROLL Scroll Lock keyVK_LSHIFT Left Shift key (only used with GetAsyncKeyState and G etKeyState)VK_RSHIFT Right Shift key (only used with GetAsyncKeyState and GetKeyState)VK_LCONTROL Left Ctrl key (only used with GetAsyncKeyState an d GetKeyState)VK_RCONTROL Right Ctrl key (only used with GetAsyncKeyState a nd GetKeyState)VK_LMENU Left Alt key (only used with GetAsyncKeyState and GetKeyState)VK_RMENU Right Alt key (only used with GetAsyncKeyState and GetKeyState)VK_PROCESSKEY Process keyVK_ATTN Attn keyVK_CRSEL CrSel keyVK_EXSEL ExSel keyVK_EREOF Erase EOF keyVK_PLAY Play keyVK_ZOOM Zoom keyVK_NONAME Reserved for future useVK_PA1 PA1 keyVK_OEM_CLEAR Clear key。

vk_code 宏值

vk_code 宏值

vk_code值2009-08-05 10:55//WinUser.h#ifndef NOVIRTUALKEYCODES/** Virtual Keys, Standard Set*/#define VK_LBUTTON 0x01 鼠标左键#define VK_RBUTTON 0x02 鼠标右键#define VK_CANCEL 0x03 Ctrl+Break#define VK_MBUTTON 0x04 鼠标中键/* NOT contiguous with L & RBUTTON */#if(_WIN32_WINNT >= 0x0500)#define VK_XBUTTON1 0x05 /* NOT contiguous with L & RBUTTON */#define VK_XBUTTON2 0x06 /* NOT contiguous with L & RBUTTON */#endif /* _WIN32_WINNT >= 0x0500 *//** 0x07 : unassigned*/#define VK_BACK 0x08 Backspace键#define VK_TAB 0x09 Tab键/** 0x0A - 0x0B : reserved*/#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 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39) * 0x40 : unassigned* VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A) */#define VK_LWIN 0x5B 左WinKey(104键盘才有)#define VK_RWIN 0x5C 右WinKey(104键盘才有)#define VK_APPS 0x5D AppsKey(104键盘才有)/** 0x5E : reserved*/#define VK_SLEEP 0x5F#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/** 0x88 - 0x8F : unassigned*/#define VK_NUMLOCK 0x90 Num Lock 键#define VK_SCROLL 0x91 Scroll Lock 键/** NEC PC-9800 kbd definitions*/#define VK_OEM_NEC_EQUAL 0x92 // '=' key on numpad/** Fujitsu/OASYS kbd definitions*/#define VK_OEM_FJ_JISHO 0x92 // 'Dictionary' key#define VK_OEM_FJ_MASSHOU 0x93 // 'Unregister word' key#define VK_OEM_FJ_TOUROKU 0x94 // 'Register word' key#define VK_OEM_FJ_LOYA 0x95 // 'Left OYAYUBI' key#define VK_OEM_FJ_ROYA 0x96 // 'Right OYAYUBI' key/** 0x97 - 0x9F : unassigned*//** 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(_WIN32_WINNT >= 0x0500)#define VK_BROWSER_BACK 0xA6#define VK_BROWSER_FORWARD 0xA7#define VK_BROWSER_REFRESH 0xA8#define VK_BROWSER_STOP 0xA9#define VK_BROWSER_SEARCH 0xAA#define VK_BROWSER_FAVORITES 0xAB#define VK_BROWSER_HOME 0xAC#define VK_VOLUME_MUTE 0xAD#define VK_VOLUME_DOWN 0xAE#define VK_VOLUME_UP 0xAF#define VK_MEDIA_NEXT_TRACK 0xB0#define VK_MEDIA_PREV_TRACK 0xB1#define VK_MEDIA_STOP 0xB2#define VK_MEDIA_PLAY_PAUSE 0xB3#define VK_LAUNCH_MAIL 0xB4#define VK_LAUNCH_MEDIA_SELECT 0xB5#define VK_LAUNCH_APP1 0xB6#define VK_LAUNCH_APP2 0xB7#endif /* _WIN32_WINNT >= 0x0500 *//** 0xB8 - 0xB9 : reserved*/#define VK_OEM_1 0xBA // ';:' for US#define VK_OEM_PLUS 0xBB // '+' any country #define VK_OEM_COMMA 0xBC // ',' any country #define VK_OEM_MINUS 0xBD // '-' any country #define VK_OEM_PERIOD 0xBE // '.' any country #define VK_OEM_2 0xBF // '/?' for US#define VK_OEM_3 0xC0 // '`~' for US/** 0xC1 - 0xD7 : reserved*//** 0xD8 - 0xDA : unassigned*/#define VK_OEM_4 0xDB // '[{' for US#define VK_OEM_5 0xDC // '\|' for US#define VK_OEM_6 0xDD // ']}' for US#define VK_OEM_7 0xDE // ''"' for US#define VK_OEM_8 0xDF/** 0xE0 : reserved*//** Various extended or enhanced keyboards*/#define VK_OEM_AX 0xE1 // 'AX' key on Japanese AX kbd #define VK_OEM_102 0xE2 // "<>" or "\|" on RT 102-key kbd. #define VK_ICO_HELP 0xE3 // Help key on ICO#define VK_ICO_00 0xE4 // 00 key on ICO#if(WINVER >= 0x0400)#define VK_PROCESSKEY 0xE5#endif /* WINVER >= 0x0400 */#define VK_ICO_CLEAR 0xE6#if(_WIN32_WINNT >= 0x0500)#define VK_PACKET 0xE7#endif /* _WIN32_WINNT >= 0x0500 *//** 0xE8 : unassigned*//** Nokia/Ericsson definitions*/#define VK_OEM_RESET 0xE9#define VK_OEM_JUMP 0xEA#define VK_OEM_PA1 0xEB#define VK_OEM_PA2 0xEC#define VK_OEM_PA3 0xED#define VK_OEM_WSCTRL 0xEE#define VK_OEM_CUSEL 0xEF#define VK_OEM_ATTN 0xF0#define VK_OEM_FINISH 0xF1#define VK_OEM_COPY 0xF2#define VK_OEM_AUTO 0xF3#define VK_OEM_ENLW 0xF4#define VK_OEM_BACKTAB 0xF5#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/** 0xFF : reserved*/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////#define VK_LBUTTON 0x01#define VK_RBUTTON 0x02#define VK_CANCEL 0x03#define VK_MBUTTON 0x04 /* NOT contiguous with L & RB UTTON */#define VK_BACK 0x08#define VK_TAB 0x09#define VK_CLEAR 0x0C#define VK_RETURN 0x0D#define VK_SHIFT 0x10#define VK_CONTROL 0x11#define VK_MENU 0x12#define VK_PAUSE 0x13#define VK_CAPITAL 0x14#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_ESCAPE 0x1B#define VK_CONVERT 0x1C#define VK_NONCONVERT 0x1D#define VK_ACCEPT 0x1E#define VK_MODECHANGE 0x1F#define VK_SPACE 0x20#define VK_PRIOR 0x21#define VK_NEXT 0x22#define VK_END 0x23#define VK_HOME 0x24#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#define VK_INSERT 0x2D#define VK_DELETE 0x2E#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#define VK_RWIN 0x5C#define VK_APPS 0x5D#define VK_NUMPAD0 0x60#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_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#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#define VK_SCROLL 0x91/** VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual key s.* 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_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。

VB键盘常量大全256个虚拟键码

VB键盘常量大全256个虚拟键码

Public Const VK_LBUTTON = &H1 Public Const VK_RBUTTON = &H2 Public Const VK_CANCEL = &H3 Public Const VK_MBUTTON = &H4 Public Const VK_BACK = &H8 Public Const VK_TAB = &H9Public Const VK_CLEAR = &HC Public Const VK_RETURN = &HD Public Const VK_SHIFT = &H10 Public Const VK_CONTROL = &H11 Public Const VK_MENU = &H12 Public Const VK_PAUSE = &H13 Public Const VK_CAPITAL = &H14 Public Const VK_ESCAPE = &H1B Public Const VK_SPACE = &H20 Public Const VK_PRIOR = &H21 Public Const VK_NEXT = &H22 Public Const VK_END = &H23 Public Const VK_HOME = &H24 Public Const VK_LEFT = &H25 Public Const VK_UP = &H26Public Const VK_RIGHT = &H27 Public Const VK_DOWN = &H28 Public Const VK_Select = &H29 Public Const VK_PRINT = &H2A Public Const VK_EXECUTE = &H2B Public Const VK_SNAPSHOT = &H2C Public Const VK_Insert = &H2D Public Const VK_Delete = &H2E Public Const VK_HELP = &H2F Public Const VK_0 = &H30Public Const VK_1 = &H31Public Const VK_2 = &H32Public Const VK_3 = &H33Public Const VK_4 = &H34Public Const VK_5 = &H35Public Const VK_6 = &H36Public Const VK_7 = &H37Public Const VK_8 = &H38Public Const VK_9 = &H39Public Const VK_A = &H41Public Const VK_B = &H42Public Const VK_C = &H43Public Const VK_D = &H44Public Const VK_F = &H46Public Const VK_G = &H47Public Const VK_H = &H48Public Const VK_I = &H49Public Const VK_J = &H4APublic Const VK_K = &H4BPublic Const VK_L = &H4CPublic Const VK_M = &H4DPublic Const VK_N = &H4EPublic Const VK_O = &H4FPublic Const VK_P = &H50Public Const VK_Q = &H51Public Const VK_R = &H52Public Const VK_S = &H53Public Const VK_T = &H54Public Const VK_U = &H55Public Const VK_V = &H56Public Const VK_W = &H57Public Const VK_X = &H58Public Const VK_Y = &H59Public Const VK_Z = &H5APublic Const VK_STARTKEY = &H5B Public Const VK_CONTEXTKEY = &H5D Public Const VK_NUMPAD0 = &H60 Public Const VK_NUMPAD1 = &H61 Public Const VK_NUMPAD2 = &H62 Public Const VK_NUMPAD3 = &H63 Public Const VK_NUMPAD4 = &H64 Public Const VK_NUMPAD5 = &H65 Public Const VK_NUMPAD6 = &H66 Public Const VK_NUMPAD7 = &H67 Public Const VK_NUMPAD8 = &H68 Public Const VK_NUMPAD9 = &H69 Public Const VK_MULTIPLY = &H6A Public Const VK_ADD = &H6BPublic Const VK_SEPARATOR = &H6C Public Const VK_SUBTRACT = &H6D Public Const VK_DECIMAL = &H6E Public Const VK_DIVIDE = &H6FPublic Const VK_F1 = &H70Public Const VK_F2 = &H71Public Const VK_F3 = &H72Public Const VK_F4 = &H73Public Const VK_F6 = &H75Public Const VK_F7 = &H76Public Const VK_F8 = &H77Public Const VK_F9 = &H78Public Const VK_F10 = &H79Public Const VK_F11 = &H7APublic Const VK_F12 = &H7BPublic Const VK_F13 = &H7CPublic Const VK_F14 = &H7DPublic Const VK_F15 = &H7EPublic Const VK_F16 = &H7FPublic Const VK_F17 = &H80Public Const VK_F18 = &H81Public Const VK_F19 = &H82Public Const VK_F20 = &H83Public Const VK_F21 = &H84Public Const VK_F22 = &H85Public Const VK_F23 = &H86Public Const VK_F24 = &H87Public Const VK_NUMLOCK = &H90 Public Const VK_OEM_SCROLL = &H91 Public Const VK_OEM_1 = &HBA Public Const VK_OEM_PLUS = &HBB Public Const VK_OEM_COMMA = &HBC Public Const VK_OEM_MINUS = &HBD Public Const VK_OEM_PERIOD = &HBE Public Const VK_OEM_2 = &HBFPublic Const VK_OEM_3 = &HC0Public Const VK_OEM_4 = &HDB Public Const VK_OEM_5 = &HDC Public Const VK_OEM_6 = &HDD Public Const VK_OEM_7 = &HDE Public Const VK_OEM_8 = &HDFPublic Const VK_ICO_F17 = &HE0 Public Const VK_ICO_F18 = &HE1 Public Const VK_OEM102 = &HE2 Public Const VK_ICO_HELP = &HE3 Public Const VK_ICO_00 = &HE4Public Const VK_ICO_CLEAR = &HE6 Public Const VK_OEM_RESET = &HE9 Public Const VK_OEM_JUMP = &HEA Public Const VK_OEM_PA1 = &HEB Public Const VK_OEM_PA2 = &HEC。

键盘键与虚拟键码对照表

键盘键与虚拟键码对照表

键盘键与虚拟键码对照表字母和数字键数字小键盘的键功能键其它键键键码键键码键键码键键码A650 96 F1 112 Backspace 8B661 97 F2 113Tab 9C67 2 98 F3 114Clear 12D683 99 F4 115Enter 13E69 4 100F5 116Shift16F70 5 101F6 117Control 17G71 6 102F7 118 Alt 18H72 7 103F8 119 Caps Lock 20I73 8 104F9 120Esc 27J74 9 105F10121Spacebar32K75 * 106F11122 Page Up33L76 + 107F12123 Page Down 34M77 Enter 108-- --End 35 N78 - 109-- -- Home36O79 . 110-- -- Left Arrow37 P80 / 111-- -- Up Arrow38Q81 -- ---- -- Right Arrow 39 R82 -- ---- -- Down Arrow 40 S83 -- ---- -- Insert 45 T84 -- ---- -- Delete 46 U85 -- ---- -- Help 47 V86 -- ---- -- Num Lock 144 W87X88Y89Z900481492503514525536547558569570x1 鼠标左键0x2 鼠标右键0x3 CANCEL 键0x4 鼠标中键0x8 BACKSPACE 键0x9 TAB 键0xC CLEAR 键0xD ENTER 键0x10 SHIFT 键0x11 CTRL 键0x12 MENU 键0x13 PAUSE 键0x14 CAPS LOCK 键0x1B ESC 键0x20 SPACEBAR 键0x21 PAGE UP 键0x22 PAGE DOWN 键0x23 END 键0x24 HOME 键0x25 LEFT ARROW 键0x26 UP ARROW 键0x27 RIGHT ARROW 键0x28 DOWN ARROW 键0x29 Select 键0x2A PRINT SCREEN 键0x2B EXECUTE 键0x2C SNAPSHOT 键0x2D Insert 键0x2E Delete 键0x2F HELP 键0x90 NUM LOCK 键A 至 Z 键与 A – Z 字母的 ASCII 码相同:值描述65 A 键66 B 键67 C 键68 D 键69 E 键70 F 键71 G 键72 H 键73 I 键74 J 键75 K 键76 L 键77 M 键78 N 键79 O 键80 P 键81 Q 键82 R 键83 S 键84 T 键85 U 键86 V 键87 W 键88 X 键89 Y 键90 Z 键0 至 9 键与数字 0 – 9 的 ASCII 码相同:48 0 键49 1 键50 2 键51 3 键52 4 键53 5 键54 6 键55 7 键56 8 键57 9 键下列常数代表数字键盘上的键:值描述0x60 0 键0x61 1 键0x62 2 键0x63 3 键0x64 4 键0x65 5 键0x66 6 键0x67 7 键0x68 8 键0x69 9 键0x6A MULTIPLICATION SIGN (*) 键0x6B PLUS SIGN (+) 键0x6C ENTER 键0x6D MINUS SIGN (–) 键0x6E DECIMAL POINT (.) 键0x6F DIVISION SIGN (/) 键下列常数代表功能键:0x70 F1 键0x71 F2 键0x72 F3 键0x73 F4 键0x74 F5 键0x75 F6 键0x76 F7 键0x77 F8 键0x78 F9 键0x79 F10 键0x7A F11 键0x7B F12 键0x7C F13 键0x7D F14 键0x7E F15 键0x7F F16 键0 None3 Cancel(Break)8 Back9 Tab13 Return16 ShiftKey17 ControlKey18 Menu19 Pause20 Capital(大小写)27 Escape32 Space33 PageUp34 Next(PageDonw)35 End36 Home37 Left38 Up39 Right40 Down0-9 48-5745 Insert46 Delete65->90 A->Z91 LWin93 Apps96 105 NumPad0- 106 Multiply * 107 Add+108109 Subtract-110 Decimal .111 Divide /112-123 F1-F12144 NumLock145 Scroll173 VolumeMute174 VolumeDown175 VolumeUp186 Oem1 ;187 Oemplus =188 Oemcomma ,189 OemMinus -190 OemPeriod .191 OemQuestion / 192 Oemtilde `219 OemOpenBrackets [ 220 Oem5 \221 Oem6 ]222 Oem7 '。

键盘虚拟键值编码表 使用keybd

键盘虚拟键值编码表 使用keybd

键盘虚拟键值编码表使用keybd_Event也是在cnblogs上找的,怕到时忘了,先记下来原文章:/nemolog/archive/2005/10/30/265035.ht ml模拟键盘输入首先要用到一个API函数:keybd_event。

我们是菜鸟,所以不必具体去理解它的详细用法,只要按以下方法使用即可了!呵呵!模拟按键有两个基本动作,即按下键和放开按键,所以我们每模拟一次按键就要调用两次该API函数,其方法是:例子1:模拟按下'A'键keybd_event(65,0,0,0);keybd_event(65,0,KEYEVENTF_KEYUP,0);例子2:模拟按下'ALT+F4'键keybd_event(18,0,0,0);keybd_event(115,0,0,0);keybd_event(115,0,KEYEVENTF_KEYUP,0);keybd_event(18,0,KEYEVENTF_KEYUP,0);例子3:在启动一个程序之前清空屏幕(按Win +D)[DllImport("User32.dll")]public static extern void keybd_event(Byte bVk, Byte bScan, Int32 dwFlags, Int32 dwEx traInfo);keybd_event(0x5b, 0, 0, 0);keybd_event(68, 0, 0, 0);keybd_event(0x5b, 0, 0x2, 0);keybd_event(68, 0, 0x2, 0);附:常用模拟键的键值对照表。

键盘键与虚拟键码对照表字母和数字键数字小键盘的键功能键其它键键键码键键码键键码键键码A650 96 F1 112 Backspace 8B66197 F2 113Tab 9C67 2 98 F3 114Clear12D68399 F4 115Enter13E69 4 100 F5 116Shift16F70 5 101 F6 117Control17G71 6102 F7 118 Alt18H72 7 103 F8 119Caps Lock20I73 8 104F9 120Esc27J74 9105F10121Spacebar32K75 * 106F11122Page Up33L76 + 107F12123Page Down34M77 Enter 108-- --End35N78 - 109-- -- Home36O79 . 110---- Left Arrow 37P80 / 111---- Up Arrow38Q81 -- ------ Right Arrow 39R82 -- ------ Down Arrow 40S83 -- ---- -- Insert45T84 -- ------ Delete46U85 -- ---- -- Help47V86 ------ -- Num Lock144W87X88Y89Z90048149250351452553654755856957----------------------------------与键盘上各键对应的键值在软件开发的过程中我们经常与键盘打交道,以下是我查MSDN 所得希望对各位有帮助。

【免费下载】虚拟键码VK值大全(Virtual-Key_Codes)

【免费下载】虚拟键码VK值大全(Virtual-Key_Codes)

【免费下载】虚拟键码VK值大全(Virtual-Key_Codes)虚拟键码适用于:桌面应用程序下表显示了符号常量的名称,十六进制值,鼠标或键盘等值的系统所使用的虚拟键码。

按数字顺序列出的代码。

恒/值描述VK_LBUTTON鼠标左键0X01VK_RBUTTON鼠标右键0X02VK_CANCEL控制中断处理0x03VK_MBUTTON鼠标中键(三键鼠标)0X04VK_XBUTTON1X1鼠标按钮0X05VK_XBUTTON2X2鼠标按钮0X06-未定义0X07VK_BACK退格键0X08VK_TABTAB 键0X09-保留的0X0A-0BVK_CLEARCLEAR 键0X0CVK_RETURN回车键0X0D-未定义0X0E-0FVK_SHIFT按住SHIFT 键0x10VK_CONTROLCTRL 键0x11VK_MENUALT 键0X12VK_PAUSEPAUSE 键0x13VK_CAPITAL CAPS LOCK 键、管路敷设技术通过管线敷设技术,不仅可以解决吊顶层配置不规范问题,而且可保障各类管路习题到位。

在管路敷设过程中,要加强看护关于管路高中资料试卷连接管口处理高中资料试卷弯扁度固定盒位置保护层防腐跨接地线弯曲半径标高等,要求技术交底。

管线敷设技术中包含线槽、管架等多项方式,为解决高中语文电气课件中管壁薄、接口不严等问题,合理利用管线敷设技术。

线缆敷设原则:在分线盒处,当不同电压回路交叉时,应采用金属隔板进行隔开处理;同一线槽内,强电回路须同时切断习题电源,线缆敷设完毕,要进行检查和检测处理。

、电气课件中调试对全部高中资料试卷电气设备,在安装过程中以及安装结束后进行高中资料试卷调整试验;通电检查所有设备高中资料试卷相互作用与相互关系,根据生产工艺高中资料试卷要求,对电气设备进行空载与带负荷下高中资料试卷调控试验;对设备进行调整使其在正常工况下与过度工作下都可以正常工作;对于继电保护进行整核对定值,审核与校对图纸,编写复杂设备与装置高中资料试卷调试方案,编写重要设备高中资料试卷试验方案以及系统启动方案;对整套启动过程中高中资料试卷电气设备进行调试工作并且进行过关运行高中资料试卷技术指导。

键盘鼠标对应码表

键盘鼠标对应码表

键盘鼠标对应码表常数名称十六进制值十进制值对应按键VK_LBUTTON011鼠标的左键VK_RBUTTON022鼠标的右键VK-CANCEL033Ctrl+Break通常不需要处理VK_MBUTTON044鼠标的中键三按键鼠标VK_BACK088Backspace键VK_TAB099Tab键VK_CLEAR0C12Clear键Num Lock关闭时的数字键盘5 VK_RETURN0D13Enter键VK_SHIFT1016Shift键VK_CONTROL1117Ctrl键VK_MENU1218Alt键VK_PAUSE1319Pause键VK_CAPITAL1420Caps Lock键VK_ESCAPE1B27Ese键VK_SPACE2032Spacebar键VK_PRIOR2133Page Up键VK_NEXT2234Page Domw键VK_END2335End键VK_HOME2436Home键VK_LEFT2537LEFT ARROW 键←VK_UP2638UP ARROW键↑VK_RIGHT2739RIGHT ARROW键→VK_DOWN2840DOWN ARROW键↓VK_Select2941Select键VK_PRINT2A42VK_EXECUTE2B43EXECUTE键VK_SNAPSHOT2C44Print Screen键抓屏VK_Insert2D45Ins键Num Lock关闭时的数字键盘0 VK_Delete2E46Del键Num Lock关闭时的数字键盘. VK_HELP2F47Help键VK_030480键VK_131491键VK_232502键VK_333513键VK_434524键VK_535535键VK_636546键VK_737557键VK_838568键VK_939579键VK_A4165A键VK_B4266B键VK_C4367C键VK_D4468D键VK_E4569E键VK_F4670F键VK_G4771G键VK_H4872H键VK_I4973I键VK_J4A74J键VK_K4B75K键VK_L4C76L键VK_M4D77M键VK_N4E78N键VK_O4F79O键VK_P5080P键VK_Q5181Q键VK_R5282R键VK_S5383S键VK_T5484T键VK_U5585U键VK_V5686V键VK_W5787W键VK_X5888X键VK_Y5989Y键VK_Z5A90Z键VK_NUMPAD06096数字键0键 VK_NUMPAD16197数字键1键 VK_NUMPAD26298数字键2键 VK_NUMPAD36299数字键3键 VK_NUMPAD464100数字键4键 VK_NUMPAD565101数字键5键VK_NUMPAD666102数字键6键VK_NUMPAD767103数字键7键VK_NUMPAD868104数字键8键VK_NUMPAD969105数字键9键VK_MULTIPLY6A106数字键盘上的*键 VK_ADD6B107数字键盘上的+键VK_SEPARATOR6C108Separator键VK_SUBTRACT6D109数字键盘上的-键 VK_DECIMAL6E110数字键盘上的.键 VK_DIVIDE6F111数字键盘上的/键 VK_F170112F1键VK_F271113F2键VK_F372114F3键VK_F473115F4键VK_F574116F5键VK_F675117F6键VK_F776118F7键VK_F877119F8键VK_F978120F9键VK_F1079121F10键VK_F117A122F11键VK_F127B123F12键VK_NUMLOCK90144Num Lock 键VK_SCROLL91145Scroll Lock键上面没有提到的:都在大键盘VK_LWIN91左win键VK_RWIN92右win键VK_APPS93右Ctrl左边键,点击相当于点击鼠标右键,会弹出快捷菜单 186;分号187=键188,键逗号189-键减号190.键句号191/键192`键Esc下面219[键220\键221]键222‘键引号delphi虚拟键码对应关键VK_LBUTTON鼠标左键VK_RBUTTON鼠标右键VK_CANCEL控制+休息VK_MBUTTON鼠标中键VK_BACK Backspace键VK_TAB Tab键VK_CLEAR清除主要VK_RETURN Enter键VK_SHIFT Shift键VK_CONTROL Ctrl键VK_MENU Alt键VK_PAUSE暂停关键VK_CAPITAL Caps Lock键 VK_KANA可与输入法VK_HANGUL可与输入法VK_JUNJA可与输入法VK_FINAL可与输入法VK_HANJA可与输入法VK_KANJI可与输入法VK_CONVERT可与输入法VK_NONCONVERT可与输入法 VK_ACCEPT可与输入法VK_MODECHANGE可与输入法 VK_ESCAPE Esc键VK_SPACE空间酒吧VK_PRIOR页键VK_NEXT下一页关键VK_END END键VK_HOME主页关键VK_LEFT左箭头键VK_UP向上键VK_RIGHT右箭头键VK_DOWN下箭头键VK_SELECT选择关键VK_PRINT打印键键盘的具体VK_EXECUTE执行关键VK_SNAPSHOT Print Screen键 VK_INSERT插入关键VK_DELETE Delete键VK_HELP帮助关键VK_LWIN左Windows键微软键盘 VK_RWIN右Windows键微软键盘 VK_APPS应用关键微软键盘VK_NUMPAD0 0键数字键盘VK_NUMPAD1 1键数字键盘VK_NUMPAD2 2键数字键盘VK_NUMPAD3 3键数字键盘VK_NUMPAD4 4键数字键盘VK_NUMPAD5 5键数字键盘VK_NUMPAD6 6键数字键盘VK_NUMPAD7 7键数字键盘VK_NUMPAD8 8键数字键盘VK_NUMPAD9 9键数字键盘VK_MULTIPLY多键数字键盘VK_ADD添加键数字键盘VK_SEPARATOR分离键数字键盘 VK_SUBTRACT减去键数字键盘 VK_DECIMAL小数点键数字键盘 VK_DIVIDE鸿沟键数字键盘VK_F1 F1键VK_F2 F2键VK_F3 F3的关键VK_F4 F4键VK_F5 F5键VK_F6 F6键VK_F7 F7键VK_F8 F8键VK_F9 F9键VK_F10 F10键关键VK_F11 F11键VK_F12 F12键VK_F13 F13键VK_F14 F14键VK_F15 F15键VK_F16 F16键VK_F17 F17键VK_F18 F18键VK_F19 F19键VK_F20 F20键VK_F21 F21键VK_F22 F22键VK_F23 F23键VK_F24 F24键VK_NUMLOCK数Lock键 VK_SCROLL滚动Lock键VK_LSHIFT左Shift键仅用于GetAsyncKeyState和GetKeyState VK_RSHIFT右Shift键仅用于GetAsyncKeyState和GetKeyState VK_LCONTROL左Ctrl键仅用于GetAsyncKeyState和GetKeyState VK_RCONTROL右Ctrl键仅用于GetAsyncKeyState和GetKeyState VK_LMENU左Alt键仅用于GetAsyncKeyState和GetKeyStateVK_RMENU右Alt键仅用于GetAsyncKeyState和GetKeyStateVK_PROCESSKEY工艺关键VK_ATTN经办关键VK_CRSEL CrSel关键VK_EXSEL ExSel关键VK_EREOF擦除EOF分析关键VK_PLAY发挥关键VK_ZOOM变焦关键VK_NONAME保留以供将来使用VK_PA1 PA1关键VK_OEM_CLEAR清除主要标签数: 1 “ F14键VK_F15 F15键VK_F16 F16键VK_F17 F17键VK_F18 F18键VK_F19 F19键VK_F20 F20键VK_F21 F21键VK_F22 F22键VK_F23 F23键VK_F24 F24键VK_NUMLOCK数Lock键VK_SCROLL滚动Lock键VK_LSHIFT左Shift键仅用于GetAsyncKeyState和GetKeyState VK_RSHIFT右Shift键仅用于GetAsyncKeyState和GetKeyState VK_LCONTROL左Ctrl键仅用于GetAsyncKeyState和GetKeyState VK_RCONTROL右Ctrl键仅用于GetAsyncKeyState和GetKeyState VK_LMENU左Alt键仅用于GetAsyncKeyState和GetKeyStateVK_RMENU右Alt键仅用于GetAsyncKeyState和GetKeyStateVK_PROCESSKEY工艺关键VK_ATTN经办关键VK_CRSEL CrSel关键VK_EXSEL ExSel关键VK_EREOF擦除EOF分析关键VK_PLAY发挥关键VK_ZOOM变焦关键VK_NONAME保留以供将来使用VK_PA1 PA1关键VK_OEM_CLEAR清除主要感谢您的阅读,祝您生活愉快。

虚拟键码VK值大全(Virtual-KeyCodes)

虚拟键码VK值大全(Virtual-KeyCodes)

向上箭头键‎
右箭头键
向下箭头键‎
SELEC ‎T键
PRINT‎键
执行关键
Print ‎Scree ‎n键
INS键
DEL键
HELP键‎
0键 1键 2键 3个关键 4个关键 5个关键 6个关键 7个关键 8键 9键 未定义
一个关键 B键 C键 D键 E键 F键 G键 H键
0X49 0x4A 0x4B 0x4C 0x4D 0x4E 0x4F 0x50 0x51 0x52 0x53 0x54 0x55 0X56 0x57 0x58 0x59 0x5A VK_LW‎IN 0x5B VK_RW‎IN 0x5C VK_AP‎PS 0x5D 0x5e VK_SL‎EEP 0x5F VK_NU‎M PAD 0‎ 0x60 VK_NU‎M PAD 1‎ 31:08:00 VK_NU‎M PAD 2‎ 0x62 VK_NU‎M PAD 3‎ 0x63 VK_NU‎M PAD 4‎ 0x64 VK_NU‎M PAD 5‎ 0x65 VK_NU‎M PAD 6‎
F12键 F13键 F14键 F15键 F16键 F17键 F18键 F19键 F20键 F21键 F22键 F23键 F24键 未分配 NUM LOCK键‎ SCROL‎L LOCK键‎ OEM特定‎ 未分配 左边的Sh‎ift键 右SHIF‎T键 左侧控制键‎
VK_RC‎ONTRO‎L 0xA3 VK_LM‎ENU 0xA4 VK_RM‎ENU 0xA5 VK_BR‎OWSER ‎_BACK‎ 0xA6 VK_BR‎OWSER ‎_ FORW‎ARD 0xA7 VK_BR‎OWSER ‎_REFR ‎ESH 0XA8 VK_BR‎OWSER ‎_STOP ‎ 0xA9 VK_BR‎OWSER ‎_SEAR ‎CH 0XAA VK_BR‎OWSER ‎_ FAVO‎RITES ‎ 0xAB VK_BR‎OWSER ‎_HOM E‎ 0xAC VK_VO‎LUME_‎MUTE 0xAD VK_VO‎LUME_‎DOWN 0xAE VK_VO‎LUME_‎UP 0xAF VK_M E‎DIA_N‎EXT _T‎RACK 0xB0 VK_ME‎DIA_P‎REV_T‎RACK 0xB1 VK_ME‎DIA_S‎TOP 0xB2 VK_ME‎DIA_P‎LAY_P‎AUSE 0xB3 VK_LA‎UNCH_‎MAIL 0xB4 VK_LA‎UNCH_‎MEDIA‎_SELE‎CT 0xB5 VK_LA‎UNCH_‎APP1 0xB6 VK_LA‎UNCH_‎APP2

键盘VK值列表

键盘VK值列表

键盘VK值列表键盘VK值列表/** Virtual Keys, Standard Set*/#define VK_LBUTTON 0x01#define VK_RBUTTON 0x02#define VK_CANCEL 0x03#define VK_MBUTTON 0x04 /* NOT contiguous with L &amp; RBUTTON */#define VK_BACK 0x08#define VK_TAB 0x09#define VK_CLEAR 0x0C#define VK_RETURN 0x0D#define VK_SHIFT 0x10#define VK_CONTROL 0x11#define VK_MENU 0x12#define VK_PAUSE 0x13#define VK_CAPITAL 0x14#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#define VK_CONVERT 0x1C#define VK_NONCONVERT0x1D#define VK_ACCEPT 0x1E#define VK_MODECHANGE 0x1F #define VK_SPACE 0x20#define VK_PRIOR 0x21#define VK_NEXT 0x22#define VK_END 0x23#define VK_HOME 0x24#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#define VK_INSERT 0x2D#define VK_DELETE 0x2E#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#define VK_RWIN 0x5C#define VK_APPS 0x5D#define VK_NUMPAD0 0x60#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#define VK_F2 0x71#define VK_F3 0x72#define VK_F40x73#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#define VK_SCROLL 0x91/** VK_L* &amp; 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 &gt;= 0x0400)#define VK_PROCESSKEY 0xE5#endif /* WINVER &gt;= 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。

键盘虚拟键值编码表 使用keybd

键盘虚拟键值编码表 使用keybd

键盘虚拟键值编码表使用keybd_Event也是在cnblogs上找的,怕到时忘了,先记下来原文章:/nemolog/archive/2005/10/30/265035.ht ml模拟键盘输入首先要用到一个API函数:keybd_event。

我们是菜鸟,所以不必具体去理解它的详细用法,只要按以下方法使用即可了!呵呵!模拟按键有两个基本动作,即按下键和放开按键,所以我们每模拟一次按键就要调用两次该API函数,其方法是:例子1:模拟按下'A'键keybd_event(65,0,0,0);keybd_event(65,0,KEYEVENTF_KEYUP,0);例子2:模拟按下'ALT+F4'键keybd_event(18,0,0,0);keybd_event(115,0,0,0);keybd_event(115,0,KEYEVENTF_KEYUP,0);keybd_event(18,0,KEYEVENTF_KEYUP,0);例子3:在启动一个程序之前清空屏幕(按Win +D)[DllImport("User32.dll")]public static extern void keybd_event(Byte bVk, Byte bScan, Int32 dwFlags, Int32 dwEx traInfo);keybd_event(0x5b, 0, 0, 0);keybd_event(68, 0, 0, 0);keybd_event(0x5b, 0, 0x2, 0);keybd_event(68, 0, 0x2, 0);附:常用模拟键的键值对照表。

键盘键与虚拟键码对照表字母和数字键数字小键盘的键功能键其它键键键码键键码键键码键键码A650 96 F1 112 Backspace 8B66197 F2 113Tab 9C67 2 98 F3 114Clear12D68399 F4 115Enter13E69 4 100 F5 116Shift16F70 5 101 F6 117Control17G71 6102 F7 118 Alt18H72 7 103 F8 119Caps Lock20I73 8 104F9 120Esc27J74 9105F10121Spacebar32K75 * 106F11122Page Up33L76 + 107F12123Page Down34M77 Enter 108-- --End35N78 - 109-- -- Home36O79 . 110---- Left Arrow 37P80 / 111---- Up Arrow38Q81 -- ------ Right Arrow 39R82 -- ------ Down Arrow 40S83 -- ---- -- Insert45T84 -- ------ Delete46U85 -- ---- -- Help47V86 ------ -- Num Lock144W87X88Y89Z90048149250351452553654755856957----------------------------------与键盘上各键对应的键值在软件开发的过程中我们经常与键盘打交道,以下是我查MSDN 所得希望对各位有帮助。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
浏览器启动和Home键
0xAC
VK_VOLUME_MUTE
静音键
0xAD
VK_VOLUME_DOWN
音量键
0xAE
VK_VOLUME_UP
音量键
0xAF
VK_MEDIA_NEXT_TRACK
下一首键
0xB0
VK_MEDIA_PREV_TRACK
上一曲目键
0xB1
VK_MEDIA_STOP
停止媒体键
0xB2
X1鼠标按钮
0X05
VK_XBUTTON2
X2鼠标按钮
0X06
-
未定义
0X07
VK_BACK
退格键
0X08
VK_TAB
TAB键
0X09
-
保留的
0X0A-0B
VK_CLEAR
CLEAR键
0X0C
VK_RETURN
回车键
0X0D
-
未定义
0X0E-0F
VK_SHIFT
按住SHIFT键
0x10
VK_CONTROL
虚拟键码
适用于:桌面应用程序
下表显示了符号常量的名称,十六进制值,鼠标或键盘等值的系统所使用的虚拟键码。按数字顺序列出的代码。
恒/值
描述
VK_LBUTTON
鼠标左键
0X01
VK_RBUTTON
鼠标右键
0X02
VK_CANCEL
控制中断处理
0x03
VK_MBUTTON
鼠标中键(三键鼠标)
0X04
VK_XBUTTON1
DEL键
0x2E
VK_HELP
HELP键
0x2F
0X30
0键
0X31
1键
0x32
2键
0x33
3个关键
0x34
4个关键
0x35
5个关键
0x36
6个关键
0x37
7个关键
0x38
8键
0x39
9键
-
未定义
0x3A-40
$41
一个关键
0x42
B键
×43
C键
0×44
D键
0X45
E键
0x46
F键
0X47
G键
0X48
数字小键盘4键
0x64
VK_NUMPAD5
数字小键盘5键
0x65
VK_NUMPAD6
数字小键盘6键
0x66
VK_NUMPAD7
数字小键盘7键
0x67
VK_NUMPAD8
数字键盘8键
为0x68
VK_NUMPAD9
9键数字键盘
0×69
VK_MULTIPLY
乘关键
0x6A
VK_ADD
添加关键
0x6B
VK_SEPARATOR
0x97-9F
VK_LSHIFT
左边的Shift键
0xA0
VK_RSHIFT
右SHIFT键
0XA1
VK_LCONTROL
左侧控制键
0xA2
VK_RCONTROL
右边的Control键
0xA3
VK_LMENU
左边的菜单键
0xA4
VK_RMENU
右侧的菜单键
0xA5
VK_BROWSER_BACK
浏览器的后退键
VK_OEM_CLEAR
清除键
0xFE
需求
最低支持的客户端
Windows 2000专业版
最低支持的服务器
Windows 2000 Server
头文件
Winuser.h
聚优网zgILrxmheqn4
0xA6
VK_BROWSER_FORWARD
浏览器快进键
0xA7
VK_BROWSER_REFRESH
浏览器刷新键
0XA8
VK_BROWSER_STOP
浏览器停止键
0xA9
VK_BROWSER_SEARCH
浏览器搜索键
0XAA
VK_BROWSER_FAVORITES
浏览器的收藏夹键
0xAB
VK_BROWSER_HOME
0xDB
美国标准键盘,“[{'键
VK_OEM_5
用于其他字符,它可以通过键盘的不同而有所差异。
0xDC
美国标准键盘的“\ |”键
VK_OEM_6
用于其他字符,它可以通过键盘的不同而有所差异。
0xDD
美国标准键盘,']}“键
VK_OEM_7
用于其他字符,它可以通过键盘的不同而有所差异。
0xDE
对于美国标准键盘,single-quote/double-quote“键
向上箭头键
0X26
VK_RIGHT
右箭头键
0x27
VK_DOWN
向下箭头键
0x28
VK_SELECT
SELECT键
0x29
VK_PRINT
PRINT键
0x2A
VK_EXECUTE
执行关键
0x2B
VK_SNAPSHOT
Print Screen键
0x2c
VK_INSERT
INS键
0x2D
VK_DELETE
用于其他字符,它可以通过键盘的不同而有所差异。
0xBA
美国标准键盘,':'关键
VK_OEM_PLUS
对于任何一个国家/地区,'+'键
0xBB
VK_OEM_COMMA
对于任何国家/地区,','关键
0xBC
VK_OEM_MINUS
对于任何国家/地区,“ - ”键
0xBD
VK_OEM_PERIOD
对于任何一个国家/地区的'。' 关键
H键
0X49
I键
0x4A
J键
0x4B
K键
0x4C
L键
0x4D
M键
0x4E
N键
0x4F
O键
0x50
P键
0x51
Q键
0x52
R键
0x53
S键
0x54
T键。
0x55
U键
0X56
V键
0x57
W键
0x58
X键
0x59
Y键。
0x5A
Z键
VK_LWIN
左边的Windows键(键盘)
0x5B
VK_RWIN
正确的Windows键(键盘)
VK_OEM_8
用于其他字符,它可以通过键盘的不同而有所差异。
0xDF
-
保留的
0XE0
0xE1
OEM特定
VK_OEM_102
无论是尖括号键或RT 102键键盘上的反斜杠键
0xE2
0xE3-E4
OEM特定
VK_PROCESSKEY
IME处理重要
0xE5
0xE6
OEM特定
VK_PACKET
用于传递Unicode字符,如果他们的击键。VK_PACKET关键是一个32位的虚拟键值用于非键盘输入法的低字中。有关详细信息,请参阅“备注”KEYBDINPUT,SendInput,WM_KEYDOWN,WM_KEYUP
CTRL键
0x11
VK_MENU
ALT键
0X12
VK_PAUSE
PAUSE键
0x13
VK_CAPITAL
CAPS LOCK键
0x14
VK_KANA
IME假名模式
0x15
VK_HANGUEL
IME Hanguel模式(保持兼容性;使用VK_HANGUL的)
0x15
VK_HANGUL
IME韩文模式
0x15
-
未定义
0x16
VK_JUNJA
IME Junja模式
0x17
VK_FINAL
IME的最终模式
为0x18
VK_HANJA
IME汉字模式
0×19
VK_KANJI
IME汉字模式
0×19
-
未定义
0x1A的
VK_ESCAPE
ESC键
0x1B
VK_CONVERT
IME转换
0x1C
VK_NONCONVERT
IME nonconvert
0x5C
VK_APPS
应用键(自然科学键盘)
0x5D
-
保留的
0x5e
VK_SLEEP
计算机休眠键
0x5F
VK_NUMPAD0
数字小键盘的0键
0x60
VK_NUMPAD1
数字小键盘1键
31:08:00
VK_NUMPAD2
数字小键盘数字键2
0x62
VK_NUMPAD3
数字键盘3键
0x63
VK_NUMPAD4
0xE7
-
未分配
0xE8
0xE9-F5
OEM特定
VK_ATTN
联系人键
0xF6
VK_CRSEL
CRSEL关键
0XF7
VK_EXSEL
ExSel关键
0XF8
VK_EREOF
删除EOF键
0xF9
VK_PLAY
播放键
0NONAME
保留的
0xFC
VK_PA1
PA1键
0xFD
F8键
0x77
VK_F9
F9键
0x78
VK_F10
F10键
0x79
相关文档
最新文档