虚拟键值表

合集下载

键值表——精选推荐

键值表——精选推荐

键值表什么是键值表键值表是键值对集合,相似字典,⽀持存⼊键值对,按键查值等操作。

对外接⼝public void put(Key key, Value val);public Value get(Key key);public boolean contains(Key key);public Value remove(Key key);public int size();public boolean isEmpty();接⼝代码public interface IMap<Key, Value> {/*** 存⼊键值对** @param key* 键* @param value* 值*/public void put(Key key, Value value);/*** 按鍵查值** @param key* 鍵* @return 值*/public Value get(Key key);/*** 推断是否包括某键** @param key* 键* @return <code>true</code> 若包括;否则,<code>false</code>*/public boolean contains(Key key);/*** 删除键为key的键值对** @param key* 键*/public Value remove(Key key);/*** 返回键值对个数** @return 键值对个数*/public int size();/*** 推断键值表是否为空** @return <code>true</code> 假设键值表为空;否则,<code>false</code>。

*/public boolean isEmpty();}0基础实现package com.gmail.dailyefforts.ds;import java.util.HashMap;import java.util.Map;import java.util.Random;public class SimpleLinkedMap<Key, Value> implements IMap<Key, Value>{ private class Node {private Node prev;private Key key;private Value val;private Node next;public Node(Node prev, Key key, Value val, Node next) {this.prev = prev;this.key = key;this.val = val;this.next = next;}@Overridepublic String toString() {return String.format("%s=%s", String.valueOf(key),String.valueOf(val));}}private int size;private Node first;private Node last;@Overridepublic void put(Key key, Value val) {for (Node x = first; x != null; x = x.next) {if (key.equals(x.key)) {x.val = val;return;}}Node oldLast = last;last = new Node(last, key, val, null);if (oldLast != null) {oldLast.next = last;}size++;if (first == null) {first = last;}}@Overridepublic Value remove(Key key) {for (Node x = first; x != null; x = x.next) {if (key.equals(x.key)) {if (x.prev == null) {first = x.next;} else {x.prev.next = x.next;}if (x.next == null) {last = x.prev;} else {x.next.prev = x.prev;}size--;return x.val;}}return null;}@Overridepublic boolean contains(Key key) {return get(key) != null;}@Overridepublic Value get(Key key) {for (Node x = first; x != null; x = x.next) {if (key.equals(x.key)) {return x.val;}}return null;}@Overridepublic int size() {return size;}@Overridepublic boolean isEmpty() {return size() == 0;}@Overridepublic String toString() {StringBuilder builder = new StringBuilder();builder.append('{');for (Node x = first; x != null; x = x.next) {builder.append(x);if (x.next != null) {builder.append(", ");}}builder.append('}');return builder.toString();}public static void main(String[] args) {final int N = 100 * 100;SimpleLinkedMap<Integer, String> map = new SimpleLinkedMap<>();Map<Integer, String> map2 = new HashMap<>();for (int i = 0; i < N; i++) {Integer key = Integer.valueOf(i);String value = "item-" + i;map2.put(key, value);map.put(key, value);}// System.out.println(map2);// System.out.println(map);Random random = new Random(System.currentTimeMillis());for (int i = 0; i < N / 2; i++) {final int key = random.nextInt(N);final String a = map.remove(key);final String b = map2.remove(key);if (a == null) {assert (b == null);} else {assert (a.equals(b));}}assert(map.size() == map2.size());for (int i = 0; i < N; i++) {final String a = map.get(i);final String b = map2.get(i);if (a == null) {assert (b == null);} else {assert (a.equals(b));}}}}Hash实现在上⾯的0基础实现中。

虚拟键值表

虚拟键值表

mfc虚拟按键的总结符号常量十六进制值指定的鼠标或键盘按键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 SPACEBARVK_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 键。

c#键值表

c#键值表
keycode 210 = plusminus hyphen macron
keycode 211 =
keycode 212 = copyright registered
keycode 213 = guillemotleft guillemotright
keycode 214 = masculine ordfeminine
keycode 235 = oslash Ooblique
keycode 236 = aring Aring
keycode 237 = ccedilla Ccedilla
keycode 238 = thorn THORN
keycode 239 = eth ETH
keycode 240 = diaeresis cedilla currency
keycode 221 = plus asterisk asciitilde
keycode 227 = multiply division
keycode 228 = acircumflex Acircumflex
keycode 229 = ecircumflex Ecircumflex
keycode 121 = F10
keycode 122 = F11
keycode 123 = F12
keycode 124 = F13
keycode 125 = F14
keycode 126 = F15
keycode 127 = F16
keycode 128 = F17
keycode 36 = Home
keycode 37 = Left
keycode 38 = Up

键盘虚拟键值编码表 使用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 所得希望对各位有帮助。

delphi 键盘键值对照表

delphi 键盘键值对照表

delphi 键盘键值对照表(2013-07-30 22:48:13)转载▼标签:delphi 键值it 分类:Delphi常数名称十六进制值十进制值对应按键VK_LBUTTON 01 1 鼠标的左键VK_RBUTTON 02 2 鼠标的右键VK-CANCEL 03 3 Ctrl+Break(通常不需要处理)VK_MBUTTON 04 4 鼠标的中键(三按键鼠标)VK_BACK 08 8 Backspace键VK_TAB 09 9 Tab键VK_CLEAR 0C 12 Clear键(Num Lock关闭时的数字键盘5)VK_RETURN 0D 13 Enter键VK_SHIFT 10 16 Shift键VK_CONTROL 11 17 Ctrl键VK_MENU 12 18 Alt键VK_PAUSE 13 19 Pause键VK_CAPITAL 14 20 Caps Lock键VK_ESCAPE 1B 27 Ese键VK_SPACE 20 32 Spacebar键VK_PRIOR 21 33 Page Up键VK_NEXT 22 34 Page Domw键VK_END 23 35 End键VK_HOME 24 36 Home键VK_LEFT 25 37 LEFT ARROW 键(←)VK_UP 26 38 UP ARROW键(↑)VK_RIGHT 27 39 RIGHT ARROW键(→)VK_DOWN 28 40 DOWN ARROW键(↓)VK_Select 29 41 Select键VK_PRINT 2A 42VK_EXECUTE 2B 43 EXECUTE键VK_SNAPSHOT 2C 44 Print Screen键(抓屏)VK_Insert 2D 45 Ins键(Num Lock关闭时的数字键盘0)VK_Delete 2E 46 Del键(Num Lock关闭时的数字键盘.)VK_HELP 2F 47 Help键VK_0 30 48 0键VK_1 31 49 1键VK_2 32 50 2键VK_3 33 51 3键VK_4 34 52 4键VK_5 35 53 5键VK_6 36 54 6键VK_7 37 55 7键VK_8 38 56 8键VK_9 39 57 9键VK_A 41 65 A键VK_C 43 67 C键VK_D 44 68 D键VK_E 45 69 E键VK_F 46 70 F键VK_G 47 71 G键VK_H 48 72 H键VK_I 49 73 I键VK_J 4A 74 J键VK_K 4B 75 K键VK_L 4C 76 L键VK_M 4D 77 M键VK_N 4E 78 N键VK_O 4F 79 O键VK_P 50 80 P键VK_Q 51 81 Q键VK_R 52 82 R键VK_S 53 83 S键VK_T 54 84 T键VK_U 55 85 U键VK_V 56 86 V键VK_W 57 87 W键VK_X 58 88 X键VK_Y 59 89 Y键VK_Z 5A 90 Z键VK_NUMPAD0 60 96 数字键0键VK_NUMPAD1 61 97 数字键1键VK_NUMPAD2 62 98 数字键2键VK_NUMPAD3 62 99 数字键3键VK_NUMPAD4 64 100 数字键4键VK_NUMPAD5 65 101 数字键5键VK_NUMPAD6 66 102 数字键6键VK_NUMPAD7 67 103 数字键7键VK_NUMPAD8 68 104 数字键8键VK_NUMPAD9 69 105 数字键9键VK_MULTIPLY 6A 106 数字键盘上的*键VK_ADD 6B 107 数字键盘上的+键VK_SEPARATOR 6C 108 Separator键VK_SUBTRACT 6D 109 数字键盘上的-键VK_DECIMAL 6E 110 数字键盘上的.键VK_DIVIDE 6F 111 数字键盘上的/键VK_F1 70 112 F1键VK_F2 71 113 F2键VK_F3 72 114 F3键VK_F5 74 116 F5键VK_F6 75 117 F6键VK_F7 76 118 F7键VK_F8 77 119 F8键VK_F9 78 120 F9键VK_F10 79 121 F10键VK_F11 7A 122 F11键VK_F12 7B 123 F12键VK_NUMLOCK 90 144 Num Lock 键VK_SCROLL 91 145 Scroll Lock键上面没有提到的:(都在大键盘)VK_LWIN 91 左win键VK_RWIN 92 右win键VK_APPS 93 右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和GetKeyState )VK_RMENU右Alt键(仅用于GetAsyncKeyState和GetKeyState )VK_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和GetKeyState )VK_RMENU右Alt键(仅用于GetAsyncKeyState和GetKeyState )VK_PROCESSKEY工艺关键VK_ATTN经办关键VK_CRSEL CrSel关键VK_EXSEL ExSel关键VK_EREOF擦除EOF分析关键VK_PLAY发挥关键VK_ZOOM变焦关键VK_NONAME保留以供将来使用VK_PA1 PA1关键VK_OEM_CLEAR清除主要。

虚拟键盘值表(Virtualkeyboardvaluetable)

虚拟键盘值表(Virtualkeyboardvaluetable)

虚拟键盘值表(Virtual keyboard value table)Keyboard virtual key encoding table using keybd_EvAnalog keyboard input, first of all to use a API function: keybd_event.We are new, so we don't have to understand the details. Just use the following method! Ha-ha!The analog button has two basic actions, that is, press the key and release the button, so we call the two API function every time we simulate the button:Example 1: simulate pressing the'A'keyKeybd_event (65,0,0,0);Keybd_event (65,0, KEYEVENTF_KEYUP, 0);Example 2: simulate pressing the'ALT+F4'keyKeybd_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);Example 3: empty the screen before pressing a program (press Win +D)[DllImport ("User32.dll")]Public, static, extern, void, keybd_event (Byte, bVk, Byte, bScan, Int32, dwFlags, Int32, dwExtraInfo);Keybd_event (0x5b, 0, 0, 0);Keybd_event (68, 0, 0, 0);Keybd_event (0x5b, 0, 0x2, 0);Keybd_event (68, 0, 0x2, 0);Attached: commonly used analog key key table.Keyboard key and virtual key code comparison tableLetters and numbers keys, keys, keys, keys, other keysKey, code key, key code, key key, code key, key codeA 65096, F1 112, Backspace 8B 66197, F2 113, Tab 9C 67298, F3 114, Clear 12D 68399, F4 115, Enter 13E 694100, F5 116, Shift 16F 705101, F6 117, Control 17G 716102, F7 118, Alt 18H 727103, F8 119, Caps Lock 20I 738104, F9 120, Esc 27J 749105, F10 121, Spacebar 32K 75 * 106 F11 122 Page Up 33L 76 + 107 F12 123 Page Down 34M 77, Enter 108 -- End 35no. 78 - 109 - home.(79). 110 - left arrow.n 80 / 111 - up arrow.- 81 - - - - - - - - - - - - - - - - - - right arrow.r (82) - - - - - - - - - - - - - - - - - - down arrow 40 s 83 - - - - - - - - - - - - - - - - - - insert.t 10 - - - - - - - - - - - - - - - - - delete.u - - - - - - - - - - - - - - help.(v) - - - - - - - - - - - - - - - - - - num lock. w 87x x x x x x x.y 89z 900 0 0 0 0 0 481.2 503.4.5.6.7.8 569.----------------------------------与键盘上各键对应的键值在软件开发的过程中我们经常与键盘打交道, 以下是我查msdn 所得希望对各位有帮助.可在代码中的任何地方用下列值代替键盘上的键.值描述鼠标左键 0鼠标右键 0x2键 0x3 cancel鼠标中键 0x4backspace 键 request键 0x9 tabthis 0xc 键in 键 0xd键 0x10 shift键 0x11 ctrl0x12 键 menu键 0x13 break键 0x14 caps lock0x1b is 键0x20 spacebar 键键 0x21 page up键 0x22 page down0x23 键.键 0x24 home键 0x25 left arrow 键 0x26 up arrow键 0x27 right arrow 键 0x28 down arrow0x29 select 键键 0x2a print screen0x2b execute 键the 0x2c 键键 0x2d insert键 0x2e delete0x2f help 键键 0x90 num locka 至 z 键与码相同字母的 ascii a-z: 值描述a 键.(b 键(c 键(d 键(e 键(f 键(g 键键 72 hi 键.i 键. 键 75 k the 键. 键 77 键 78.a 键. 键 80 w 键 81. 键 82 r 键. s 键. t 键 85. 键) v 键 87.键 88 x x x x x x xit 键)90% 键0 0 0 0 0 0 0 - 9 的至 9 键与数字 ascii 码相同.值描述键 48 0键. 1键 50 2.51 (3) 键键 52 4键. 56 键557 keys568 keys579 keysThe following constants represent keys on numeric keys:Value description0x60 0 key0x61 1 key0x62 2 key0x63 3 key0x64 4 key0x65 5 key0x66 6 key0x67 7 key0x68 8 key0x69 9 key0x6A, MULTIPLICATION, SIGN (*) key 0x6B, PLUS, SIGN (+) keys0x6C ENTER key0x6D, MINUS, SIGN (-) key0x6E, DECIMAL, POINT (...) key0x6F DIVISION SIGN (/) keyThe following constants represent function keys: Value description0x70 F1 key0x71 F2 key0x72 F3 key0x73 F4 key0x74 F5 key0x75 F6 key0x76 F7 key0x77 F8 key0x78 F9 key0x79 F10 key0x7A F11 key0x7B F12 key0x7C F13 key 0x7D F14 key 0x7E F15 key 0x7F F16 key。

鼠标键盘虚拟键值表

鼠标键盘虚拟键值表

#defin‎e VK_RB‎U TTON‎0x02 鼠标右键#defin‎e VK_CA‎N CEL 0x03 Contr‎o l-Break‎处理#defin‎e VK_MB‎U TTON‎ 0x04 /* NOT conti‎g uous‎with L & RBUTT‎O N */ 鼠标中间键‎#defin‎e VK_BA‎C K 0x08 Backs‎p ace键‎#defin‎e VK_TA‎B0x09 Tab键#defin‎e VK_CL‎E AR 0x0C Clear‎键#defin‎e VK_RE‎T URN 0x0D Enter‎键#defin‎e VK_SH‎I FT 0x10 Shift‎键#defin‎e VK_CO‎N TROL‎0x11 Ctrl键‎#defin‎e VK_ME‎N U 0x12 Alt键#defin‎e VK_PA‎U SE 0x13#defin‎e VK_CA‎P ITAL‎0x14 Caps lock键‎#defin‎e VK_KA‎N A0x15#defin‎e VK_HA‎N GEUL‎ 0x15 /* old name - shoul‎d be here for compa‎t ibil‎i ty */#defin‎e VK_HA‎N GUL 0x15#defin‎e VK_JU‎N JA0x17#defin‎e VK_FI‎N AL 0x18#defin‎e VK_HA‎N JA0x19#defin‎e VK_KA‎N JI 0x19#defin‎e VK_ES‎C APE 0x1B Escap‎e键#defin‎e VK_CO‎N VERT‎0x1C#defin‎e VK_NO‎N CONV‎E RT 0x1D#defin‎e VK_AC‎C EPT 0x1E#defin‎e VK_MO‎D ECHA‎N GE 0x1F#defin‎e VK_SP‎A CE 0x20 空格键#defin‎e VK_PR‎I OR 0x21 Page up键#defin‎e VK_NE‎X T 0x22 Page down键‎#defin‎e VK_EN‎D0x23 End键#defin‎e VK_HO‎M E 0x24 Home键‎#defin‎e VK_LE‎F T 0x25 左箭头键#defin‎e VK_UP‎0x26 上箭头键#defin‎e VK_RI‎G HT 0x27 右箭头键#defin‎e VK_DO‎W N 0x28 下箭头键#defin‎e VK_SE‎L ECT 0x29 Selec‎t键#defin‎e VK_PR‎I NT 0x2A#defin‎e VK_SN‎A PSHO‎T 0x2C Print‎scree‎n键#defin‎e VK_IN‎S ERT 0x2D Inser‎t键#defin‎e VK_DE‎L ETE 0x2E Delet‎e键#defin‎e VK_HE‎L P 0x2F Help键‎/* 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) */#defin‎e VK_LW‎I N 0x5B#defin‎e VK_RW‎I N 0x5C#defin‎e VK_AP‎P S 0x5D#defin‎e VK_NU‎M PAD0‎0x60 数字小键盘‎上的0#defin‎e VK_NU‎M PAD1‎0x61#defin‎e VK_NU‎M PAD2‎0x62#defin‎e VK_NU‎M PAD3‎0x63#defin‎e VK_NU‎M PAD4‎0x64#defin‎e VK_NU‎M PAD5‎0x65#defin‎e VK_NU‎M PAD6‎0x66#defin‎e VK_NU‎M PAD7‎0x67#defin‎e VK_NU‎M PAD8‎0x68#defin‎e VK_NU‎M PAD9‎0x69#defin‎e VK_MU‎L TIPL‎Y0x6A数字小键盘‎上的*#defin‎e VK_AD‎D0x6B 数字小键盘‎上的+#defin‎e VK_SE‎P ARAT‎O R 0x6C 分隔符键#defin‎e VK_SU‎B TRAC‎T0x6D 数字小键盘‎上的-#defin‎e VK_DE‎C IMAL‎0x6E 数字小键盘‎上的.#defin‎e VK_DI‎V IDE 0x6F 数字小键盘‎上的/#defin‎e VK_F1‎0x70#defin‎e VK_F2‎0x71#defin‎e VK_F3‎0x72#defin‎e VK_F4‎0x73#defin‎e VK_F5‎0x74#defin‎e VK_F6‎0x75#defin‎e VK_F7‎0x76#defin‎e VK_F8‎0x77#defin‎e VK_F9‎0x78#defin‎e VK_F1‎00x79#defin‎e VK_F1‎10x7A#defin‎e VK_F1‎20x7B#defin‎e VK_F1‎30x7C#defin‎e VK_F1‎40x7D#defin‎e VK_F1‎50x7E#defin‎e VK_F1‎60x7F#defin‎e VK_F1‎70x80#defin‎e VK_F1‎80x81#defin‎e VK_F1‎90x82#defin‎e VK_F2‎00x83#defin‎e VK_F2‎10x84#defin‎e VK_F2‎20x85#defin‎e VK_F2‎30x86#defin‎e VK_F2‎40x87#defin‎e VK_0 ... VK_9 0x30 - 0x39 0-9键#defin‎e VK_A ... VK_Z 0x41 - 0x5A A-Z键#defin‎e VK_NU‎M LOCK‎0x90#defin‎e VK_SC‎R OLL 0x91 Scrol‎l Lock/** VK_L* & VK_R* - left and right‎Alt, Ctrl and Shift‎virtu‎a l keys.* Used only as param‎e ters‎to GetAs‎y ncKe‎y Stat‎e() and GetKe‎y Stat‎e().* No other‎API or messa‎g e will disti‎n guis‎h left and right‎keys in this way.*/#defin‎e VK_LS‎H IFT 0xA0#defin‎e VK_RS‎H IFT 0xA1#defin‎e VK_LC‎O NTRO‎L0xA2#defin‎e VK_RC‎O NTRO‎L0xA3#defin‎e VK_LM‎E NU 0xA4 左Alt键‎#defin‎e VK_RM‎E NU 0xA5 右Alt键‎#if(WINVE‎R >= 0x040‎0)#defin‎e VK_PR‎O CESS‎K EY0xE5#endif‎/* WINVE‎R >= 0x040‎0 */#defin‎e VK_AT‎T N 0xF6#defin‎e VK_CR‎S EL 0xF7#defin‎e VK_EX‎S EL 0xF8#defin‎e VK_ER‎E OF 0xF9#defin‎e VK_PL‎A Y0xFA#defin‎e VK_ZO‎O M 0xFB#defin‎e VK_NO‎N AME 0xFC#defin‎e VK_PA‎10xFD#defin‎e VK_OE‎M_CLE‎A R 0xFEVK_OE‎M_1 BA Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd.Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the ';:' keyVK_OE‎M_PLU‎S BB Windo‎w s 2000/XP: For any count‎r y/regio‎n, the '=+' keyVK_OE‎M_COM‎M A BC Windo‎w s 2000/XP: For any count‎r y/regio‎n, the ',<' keyVK_OE‎M_MIN‎U S BD Windo‎w s 2000/XP: For any count‎r y/regio‎n, the '-_' keyVK_OE‎M_PER‎I OD BE Windo‎w s 2000/XP: For any count‎r y/regio‎n, the '>.' keyVK_OE‎M_2 BF Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd. Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the '/?' keyVK_OE‎M_3 C0 Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd. Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the '`~' key- C1-D7 Reser‎v ed- D8-DA Unass‎i gned‎VK_OE‎M_4 DB Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd. Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the '[{' keyVK_OE‎M_5 DC Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd. Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the '\|' keyVK_OE‎M_6 DD Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd. Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the ']}' keyVK_OE‎M_7 DE Used for misce‎l lane‎o us chara‎c ters‎; it can vary by keybo‎a rd. Windo‎w s 2000/XP: For the US stand‎a rd keybo‎a rd, the '' "' key。

C++模拟虚拟键盘按键表

C++模拟虚拟键盘按键表

C++模拟虚拟键盘按键表键盘VK键值列表/* Virtual Keys, Standard Set*/VK_LBUTTON 0x01VK_RBUTTON 0x02VK_CANCEL 0x03VK_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。

新机顶盒遥控器键值表

新机顶盒遥控器键值表

KEY_GO_BEGINNING 0x010B KEY_INFO 0x010C
43
KEY_INTERX
0x010D
KEY_INTERX,互动,在媒体 播放时按下进行互动操作
44 45
KEY_STOP KEY_POS
0x010E 0x010F
停止 定位,在媒体播放时按下进 行直接时间位置的定位
IPTV 业务导航功能按键(0x0110-0x0130) 46 47 KEY_PORTAL KEY_RED 0x0110 0x0113 首页,进入首页 快捷键(红色),频道
48 49 50 51 52 53 54 55 56
KEY_GREEN KEY_YELLOW KEY_BLUE KEY_GREY KEY_SWITCH KEY_FAVORITE KEY_BOOKMARK KEY_CHANNEL_POS KEY_HELP
0x0114 0x0115 0x0116 0x0116 0x0118 0x0119 0x011A 0x011B 0x011C
KEY_CHANNEL_DOWN 0x0102 KEY_VOL_UP KEY_VOL_DOWN KEY_MUTE KEY_TRACK KEY_PAUSE_PLAY 0x0103 0x0104 0x0105 0x0106 0x0107
KEY_FAST_FORWARD 0x0108 KEY_FAST_REWIND KEY_GO_END 0x0109 0x010A
IPTV 业务基本操作功能按键(0x0100-0x010F) 30 KEY_POWER 0x0100 电源
31 32 33 34 35 36 37 38 39 40 41 42
KEY_CHANNEL_UP
0x0101

键值表

键值表

HID键盘键值表const u_int8 media_key[47][4] = //多媒体键{{0x01,0x00,0x00,0x00}, //{0x24,0x02}, //WWW back 0{0x02,0x00,0x00,0x00}, //{0x25,0x02}, //WWW forward 1{0x04,0x00,0x00,0x00}, //{0x26,0x02}, //WWW Stop 2{0x08,0x00,0x00,0x00}, //{0x27,0x02}, //WWW Refresh 3{0x10,0x00,0x00,0x00}, //{0x21,0x02}, //WWW Search 4{0x20,0x00,0x00,0x00}, //{0x2A,0x02}, //WWW Favorites 5{0x40,0x00,0x00,0x00}, //{0x23,0x02}, //WWW Home 6{0x80,0x00,0x00,0x00}, //{0x8A,0x01}, //Mail 7{0x00,0x01,0x00,0x00}, //{0xE2,0x00}, //Mute 8{0x00,0x02,0x00,0x00}, //{0xEA,0x00}, //Volume- 9{0x00,0x04,0x00,0x00}, //{0xE9,0x00}, //Volume+ 10 0x04 {0x00,0x08,0x00,0x00}, //{0xCD,0x00}, //Play/Pause 11{0x00,0x10,0x00,0x00}, //{0xB7,0x00}, //Stop 12{0x00,0x20,0x00,0x00}, //{0xB6,0x00}, //Prev Track 13{0x00,0x40,0x00,0x00}, //{0xB5,0x00}, //Next Track 14{0x00,0x80,0x00,0x00}, //{0x83,0x01}, //Media Select 15{0x00,0x00,0x01,0x00}, //{0x94,0x01}, //My Computer 16{0x00,0x00,0x02,0x00}, //{0x92,0x01}, //Calculator 17{0x00,0x00,0x04,0x00}, //{0x09,0x02}, //More Info 18{0x00,0x00,0x08,0x00}, //{0xB2,0x00}, //Record 19{0x00,0x00,0x10,0x00}, //{0xB3,0x00}, //Forward 20{0x00,0x00,0x20,0x00}, //{0xB4,0x00}, //Rewind 21{0x00,0x00,0x40,0x00}, //{0x8D,0x00}, //Guide 22{0x00,0x00,0x80,0x00}, //{0x04,0x00}, //<Reserved> 23{0x00,0x00,0x00,0x01}, //{0x30,0x00}, //Eject(Mac,power) 24 {0x00,0x00,0x00,0x02}, //{0x07,0x03}, //H7 25{0x00,0x00,0x00,0x04}, //{0x0A,0x03}, //H10 26ightness+{0x00,0x00,0x00,0x08}, //{0x0B,0x03}, //H11 27lightness-{0x00,0x00,0x00,0x10}, //{0xb1,0x01}, //photo 28{0x00,0x00,0x00,0x20}, //{0xb8,0x00}, //touchkey29{0x40,0x00,0x00,0x01}, //截屏30{0x00,0x00,0x00,0x00}, //{0x01,0x03}, //H1 25{0x00,0x00,0x00,0x00}, //{0x02,0x03}, //H2 26{0x00,0x00,0x00,0x00}, //{0x03,0x03}, //H3 27{0x00,0x00,0x00,0x00}, //{0x04,0x03}, //H4 28{0x00,0x00,0x00,0x00}, //{0x05,0x03}, //H5 29{0x00,0x00,0x00,0x00}, //{0x06,0x03}, //H6 30{0x00,0x00,0x00,0x00}, //{0x08,0x03}, //H8 32{0x00,0x00,0x00,0x00}, //{0x09,0x03}, //H9 33{0x00,0x00,0x00,0x00}, //{0x0C,0x03}, //H12 36{0x00,0x00,0x00,0x00}, //{0x0D,0x03}, //H13 37 {0x00,0x00,0x00,0x00}, //{0x0E,0x03}, //H14 38 {0x00,0x00,0x00,0x00}, //{0x0F,0x03}, //H15 39 {0x00,0x00,0x00,0x00}, //{0x10,0x03}, //H16 40 {0x00,0x00,0x00,0x00}, //{0x11,0x03}, //H17 41 {0x00,0x00,0x00,0x00}, //{0x12,0x03}, //H18 42 {0x00,0x00,0x00,0x00}, //{0x13,0x03}, //H19 43 };//普通按键类#define KEY_NULL 0x00#define KEY_A 0x04 //A#define KEY_B 0x05 //B#define KEY_C 0x06 //C#define KEY_D 0x07 //D#define KEY_E 0x08 //E#define KEY_F 0x09 //F#define KEY_G 0x0A //G#define KEY_H 0x0B //H#define KEY_I 0x0C //I#define KEY_J 0x0D //J#define KEY_K 0x0E //K#define KEY_L 0x0F //L#define KEY_M 0x10 //M#define KEY_N 0x11 //N#define KEY_O 0x12 //O#define KEY_P 0x13 //P#define KEY_Q 0x14 //Q#define KEY_R 0x15 //R#define KEY_S 0x16 //S#define KEY_T 0x17 //T#define KEY_U 0x18 //U#define KEY_V 0x19 //V#define KEY_W 0x1A //W#define KEY_X 0x1B //X#define KEY_Y 0x1C //Y#define KEY_Z 0x1D //Z#define KEY_1 0x1E //1 !#define KEY_2 0x1F //2 @#define KEY_3 0x20 //3 ##define KEY_4 0x21 //4#define KEY_5 0x22 //5#define KEY_6 0x23 //6#define KEY_7 0x24 //7#define KEY_8 0x25 //8#define KEY_9 0x26 //9#define KEY_0 0x27 //0#define KEY_ENTER 0x28#define KEY_ESC 0x29#define KEY_BACKSPACE 0x2A#define KEY_TAB 0x2B#define KEY_SPACE 0x2C#define KEY_SUB 0x2D // - and _ #define KEY_EQUAL 0x2E // = and + #define KEY_LEFT_BRACKET 0x2F // [ and { #define KEY_RIGHT_BRACKET 0x30 // ] and } #define KEY_VERTICAL_LINE 0x31 // "\" and | #define KEY_WA VE 0x32 // ` and ~ #define KEY_SEMICOLON 0x33 // ; and :#define KEY_QUOTE 0x34 // ' and " #define KEY_THROW 0x35 // ~ and `#define KEY_COMMA 0x36 // , and <#define KEY_DOT 0x37 // . and >#define KEY_QUESTION 0x38 // / and ?#define KEY_CAPS_LOCK 0x39#define KEY_F1 0x3A#define KEY_F2 0x3B#define KEY_F3 0x3C#define KEY_F4 0x3D#define KEY_F5 0x3E#define KEY_F6 0x3F#define KEY_F7 0x40#define KEY_F8 0x41#define KEY_F9 0x42#define KEY_F10 0x43#define KEY_F11 0x44#define KEY_F12 0x45#define KEY_PRT_SCR 0x46#define KEY_SCOLL_LOCK 0x47#define KEY_PAUSE 0x48#define KEY_INS 0x49#define KEY_HOME 0x4A#define KEY_PAGEUP 0x4B#define KEY_DEL 0x4C#define KEY_END 0x4D#define KEY_PAGEDOWN 0x4E#define KEY_RIGHT_ARROW 0x4F#define KEY_LEFT_ARROW 0x50#define KEY_DOWN_ARROW 0x51#define KEY_UP_ARROW 0x52#define KEY_PAD_NUMLOCK 0x53#define KEY_PAD_DIV 0x54 // /#define KEY_PAD_MUL 0x55 // *#define KEY_PAD_SUB 0x56 // -#define KEY_PAD_ADD 0x57 // +#define KEY_PAD_ENTER 0x58#define KEY_PAD_1 0x59#define KEY_PAD_2 0x5A#define KEY_PAD_3 0x5B#define KEY_PAD_4 0x5C#define KEY_PAD_5 0x5D#define KEY_PAD_6 0x5E#define KEY_PAD_7 0x5F#define KEY_PAD_8 0x60#define KEY_PAD_9 0x61#define KEY_PAD_0 0x62#define KEY_PAD_DOT 0x63#define KEY_PRESSED 0x00#define KEY_RELEASED 0x01//控制#define KEY_LCTRL 0xE0 //左ctrl 0x01#define KEY_LALT 0xE2 //左Alt 0x04#define KEY_LSHFIT 0xE1 //左Shift 0x02#define KEY_LWIN 0xE3 //左windows 0x08#define KEY_RWIN 0xE7 //右windows 0x80#define KEY_RSHIFT 0xE5 //右Shift 0x20#define KEY_RALT 0xE6 //右Alt 0x40#define KEY_RCTRL 0xE4 //右Ctrl 0x10#define KEY_APP 0x65 //Application 0x65 #define KEY_K14 0x89 //international key #define KEY_KR_L 0x91 //#define KEY_K107 0x85 //#define KEY_K45 0x64 //#define KEY_K42 0x32 //#define KEY_K131 0x8b //#define KEY_K132 0x8a //#define KEY_K133 0x88 //#define KEY_K56 0x87 //#define KEY_KR_R 0x90 ////SELF DEFINE#define KEY_H7 0XB0//H7 R0_C15 #define KEY_MAIL 0XB1//mail R0_C16 #define KEY_H8 0XB2//H8 R0_C18 #define KEY_POWER 0XB3//POWER R1_C0 #define KEY_H2 0XB4//H2 R1_C9 #define KEY_WWW_FA VORITE 0XB5//www favorite R1_C17 #define KEY_H9 0XB6//H9 R1_C18 #define KEY_PAIR 0XB7//bind R2_C0#define KEY_FN 0XB8//FN R2_C9 #define KEY_WWW_FORWARD 0XB9//www forward R2_C16 #define KEY_H10 0XBA//H10 R2_C18 #define KEY_SLEEP 0XBB//SLEEP R3_C0 #define KEY_H1 0XBC//H1 R3_C7 #define KEY_VOLUME_SUB 0XBD//volume- R3_C15 #define KEY_WWW_STOP 0XBE//www stop R3_C16 #define KEY_MY_COMPUTER 0XBF//my computer R3_C17 #define KEY_H11 0XC0//H11 R3_C18 #define KEY_H3 0XC1//H3 R4_C9 #define KEY_PLAY_PAUSE 0XC2//play/pause R4_C14 #define KEY_VOLUME_ADD 0XC3//volume+ R4_C15 #define KEY_WWW_BACK 0XC4//www back R4_C16 #define KEY_STOP 0XC5//stop R4_C17 #define KEY_H12 0XC6//H12 R4_C18 #define KEY_WAKE_UP 0XC7//WAKE UP R5_C0#define KEY_NEXT_TRACK 0XC8//next track R5_C15 #define KEY_WWW_REFRESH 0XC9//www refresh R5_C16 #define KEY_CALCULATOR 0XCA//calculator R5_C17 #define KEY_H13 0XCB//H13 R5_C18 #define KEY_H4 0XCC//H4 R6_C9 #define KEY_PREV_TRACK 0XCD//prev track R6_C15 #define KEY_MUTE 0XCE//mute R6_C16 #define KEY_WEB_HOME 0XCF//web home R6_C17 #define KEY_H14 0XD0//H14 R6_C18 #define KEY_H5 0XD1//H5 R7_C11 #define KEY_H6 0XD2//H6 R7_C12 #define KEY_MEDIA 0XD3//media R7_C15 #define KEY_WWW_SEARCH 0XD4//www search R7_C16#define KEY_BACKLIGHT 0XD5//BACKLIGHT R7_C18 #define END_NULL 0x00#define KEY_STATUS_CHANGE 0X0001#define KEY_STATUS_ACTIVE 0X0002#define KEY_STATUS_ERROR 0X0004#define KEY_STATUS_GHOST 0X0008#define KEY_STATUS_FN 0X0010#define KEY_STATUS_NUMLOCK 0X0020#define KEY_STATUS_PAIR 0X0040#define KEY_STATUS_ENTER_PINCODE 0X0080#define KEY_STATUS_ENTER_SLEEP 0X0100#define KEY_STATUS_WAKE_UP 0X0200#define KEY_STATUS_RELEASE 0X0400#define KEY_STATUS_IN_SLEEP 0X0800#define KEY_STATUS_IN_WAKE_UP 0X1000#define KEY_STATUS_POWER_ON 0X2000#define MEDIA_KEY_UPLOAD 0X01#define POWER_KEY_UPLOAD 0X02#define STANDARD_KEY_UPLOAD 0X04#define MEDIA_KEY_SEND 0X10#define POWER_KEY_SEND 0X20#define STANDARD_KEY_SEND 0X40。

windows键盘对应的键值

windows键盘对应的键值

Windows 操作系统中的键盘键值是通过虚拟键码(Virtual Key Codes)来表示的,每个按键都有对应的唯一键值。

以下是一些常见键盘键值的列表:
1.字母和数字键:
–A-Z:0x41-0x5A
–0-9:0x30-0x39
2.功能键:
–F1-F24:0x70-0x87
3.控制键:
–Shift:0x10
–Ctrl:0x11
–Alt:0x12
4.特殊键:
–Backspace:0x08
–Tab:0x09
–Enter:0x0D
–Space:0x20
–Esc:0x1B
–Delete:0x2E
5.方向键和功能键:
–上箭头:0x26
–下箭头:0x28
–左箭头:0x25
–右箭头:0x27
–Page Up:0x21
–Page Down:0x22
–Home:0x24
–End:0x23
–Insert:0x2D
6.其他常见键:
–Caps Lock:0x14
–Scroll Lock:0x91
–Num Lock:0x90
–Print Screen:0x2C
–Pause/Break:0x13
–Windows键(左):0x5B
–Windows键(右):0x5C
此外,还有一些功能键的组合键,如 Ctrl、Alt 和 Shift 等键盘组合键,它们有各自的组合键值。

了解这些键值可以帮助开发者在编写 Windows 程序时对键盘输入进行更精确的控制和处理。

event.keyCode表

event.keyCode表

event.keyCode键值表分类:JavaScript 2009-05-12 21:18 8772人阅读评论(3) 收藏举报有时候需要获取页面的键盘值过滤,需要用到keycode如下keycode 0 =keycode 1 =keycode 2 =keycode 3 =keycode 4 =keycode 5 =keycode 6 =keycode 7 =keycode 8 = BackSpace BackSpacekeycode 9 = Tab Tabkeycode 10 =keycode 11 =keycode 12 = Clearkeycode 13 = Enterkeycode 14 =keycode 15 =keycode 16 = Shift_Lkeycode 17 = Control_Lkeycode 18 = Alt_Lkeycode 19 = Pausekeycode 20 = Caps_Lockkeycode 21 =keycode 22 =keycode 23 =keycode 24 =keycode 25 =keycode 26 =keycode 27 = Escape Escapekeycode 28 =keycode 29 =keycode 30 =keycode 31 =keycode 32 = space spacekeycode 33 = Priorkeycode 34 = Nextkeycode 35 = Endkeycode 36 = Homekeycode 37 = Leftkeycode 38 = Upkeycode 39 = Rightkeycode 40 = Downkeycode 41 = Selectkeycode 42 = Printkeycode 43 = Executekeycode 44 =keycode 45 = Insertkeycode 46 = Deletekeycode 47 = Helpkeycode 48 = 0 equal braceright keycode 49 = 1 exclam onesuperior keycode 50 = 2 quotedbl twosuperior keycode 51 = 3 section threesuperior keycode 52 = 4 dollarkeycode 53 = 5 percentkeycode 54 = 6 ampersandkeycode 55 = 7 slash braceleft keycode 56 = 8 parenleft bracketleft keycode 57 = 9 parenright bracketright keycode 58 =keycode 59 =keycode 60 =keycode 61 =keycode 62 =keycode 63 =keycode 64 =keycode 65 = a Akeycode 66 = b B keycode 67 = c C keycode 68 = d D keycode 69 = e E EuroSign keycode 70 = f Fkeycode 71 = g G keycode 72 = h H keycode 73 = i Ikeycode 74 = j Jkeycode 75 = k K keycode 76 = l Lkeycode 77 = m M mu keycode 78 = n N keycode 79 = o O keycode 80 = p P keycode 81 = q Q at keycode 82 = r Rkeycode 83 = s S keycode 84 = t Tkeycode 85 = u U keycode 86 = v V keycode 87 = w W keycode 88 = x X keycode 89 = y Y keycode 90 = z Z keycode 91 =keycode 92 =keycode 93 =keycode 94 =keycode 95 =keycode 96 = KP_0 KP_0 keycode 97 = KP_1 KP_1 keycode 98 = KP_2 KP_2 keycode 99 = KP_3 KP_3 keycode 100 = KP_4 KP_4keycode 102 = KP_6 KP_6keycode 103 = KP_7 KP_7keycode 104 = KP_8 KP_8keycode 105 = KP_9 KP_9keycode 106 = KP_Multiply KP_Multiply keycode 107 = KP_Add KP_Addkeycode 108 = KP_Separator KP_Separator keycode 109 = KP_Subtract KP_Subtract keycode 110 = KP_Decimal KP_Decimal keycode 111 = KP_Divide KP_Divide keycode 112 = F1keycode 113 = F2keycode 114 = F3keycode 115 = F4keycode 116 = F5keycode 117 = F6keycode 118 = F7keycode 119 = F8keycode 120 = F9keycode 121 = F10keycode 122 = F11keycode 123 = F12keycode 124 = F13keycode 125 = F14keycode 126 = F15keycode 127 = F16keycode 128 = F17keycode 129 = F18keycode 130 = F19keycode 131 = F20keycode 132 = F21keycode 133 = F22keycode 134 = F23keycode 135 = F24keycode 137 = Scroll_Lock keycode 138 =keycode 139 =keycode 140 =keycode 141 =keycode 142 =keycode 143 =keycode 144 =keycode 145 =keycode 146 =keycode 147 =keycode 148 =keycode 149 =keycode 150 =keycode 151 =keycode 152 =keycode 153 =keycode 154 =keycode 155 =keycode 156 =keycode 157 =keycode 158 =keycode 159 =keycode 160 =keycode 161 =keycode 162 =keycode 163 =keycode 164 =keycode 165 =keycode 166 =keycode 167 =keycode 168 =keycode 169 =keycode 170 =keycode 172 =keycode 173 =keycode 174 =keycode 175 =keycode 176 =keycode 177 =keycode 178 =keycode 179 =keycode 180 =keycode 181 =keycode 182 =keycode 183 =keycode 184 =keycode 185 =keycode 186 =keycode 187 = acute gravekeycode 188 = comma semicolon keycode 189 = minus underscore keycode 190 = period colonkeycode 191 =keycode 192 = numbersign apostrophe keycode 193 =keycode 194 =keycode 195 =keycode 196 =keycode 197 =keycode 198 =keycode 199 =keycode 200 =keycode 201 =keycode 202 =keycode 203 =keycode 204 =keycode 205 =keycode 207 =keycode 208 =keycode 209 =keycode 210 = plusminus hyphen macron keycode 211 =keycode 212 = copyright registeredkeycode 213 = guillemotleft guillemotright keycode 214 = masculine ordfemininekeycode 215 = ae AEkeycode 216 = cent yenkeycode 217 = questiondown exclamdown keycode 218 = onequarter onehalf threequarters keycode 219 =keycode 220 = less greater barkeycode 221 = plus asterisk asciitildekeycode 222 =keycode 223 =keycode 224 =keycode 225 =keycode 226 =keycode 227 = multiply divisionkeycode 228 = acircumflex Acircumflex keycode 229 = ecircumflex Ecircumflex keycode 230 = icircumflex Icircumflexkeycode 231 = ocircumflex Ocircumflex keycode 232 = ucircumflex Ucircumflex keycode 233 = ntilde Ntildekeycode 234 = yacute Yacutekeycode 235 = oslash Oobliquekeycode 236 = aring Aringkeycode 237 = ccedilla Ccedillakeycode 238 = thorn THORNkeycode 239 = eth ETHkeycode 240 = diaeresis cedilla currencykeycode 241 = agrave Agrave atilde Atilde keycode 242 = egrave Egravekeycode 243 = igrave Igravekeycode 244 = ograve Ograve otilde Otilde keycode 245 = ugrave Ugravekeycode 246 = adiaeresis Adiaeresis keycode 247 = ediaeresis Ediaeresis keycode 248 = idiaeresis Idiaeresis keycode 249 = odiaeresis Odiaeresis keycode 250 = udiaeresis Udiaeresis keycode 251 = ssharp question backslash keycode 252 = asciicircum degree keycode 253 = 3 sterlingkeycode 254 = Mode_switch。

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

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

虚拟键码适用于:桌面应用程序下表显示了符号常量的名称,十六进制值,鼠标或键盘等值的系统所使用的虚拟键码。

按数字顺序列出的代码。

恒/值描述VK_LBUTTON鼠标左键0X01VK_RBUTTON鼠标右键0X02VK_CANCEL控制中断处理0x03VK_MBUTTON鼠标中键(三键鼠标)0X04VK_XBUTTON1X1鼠标按钮0X05VK_XBUTTON2X2鼠标按钮0X06-未定义0X07VK_BACK退格键0X08VK_TAB TAB键0X09-保留的0X0A-0BVK_CLEAR CLEAR键0X0CVK_RETURN回车键0X0D-未定义0X0E-0FVK_SHIFT按住SHIFT键0x10VK_CONTROL CTRL键0x11VK_MENU ALT键0X12VK_PAUSE PAUSE键0x13VK_CAPITAL CAPS LOCK键VK_KANA IME假名模式0x15VK_HANGUEL IME Hanguel模式(保持兼容性;使用VK_HANGUL的)0x15VK_HANGUL IME韩文模式0x15-未定义0x16VK_JUNJA IME Junja模式0x17VK_FINAL IME的最终模式为0x18VK_HANJA IME汉字模式0×19VK_KANJI IME汉字模式0×19-未定义0x1A的VK_ESCAPE ESC键0x1BVK_CONVERT IME转换0x1CVK_NONCONVERT IME nonconvert0x1DVK_ACCEPT IME接受0X1EVK_MODECHANGE IME模式变更请求0x1FVK_SPACE空格键0X20VK_PRIOR PAGE UP键0×21VK_NEXT PAGE DOWN键0x22VK_END END键0X23VK_HOME HOME键0X24VK_LEFT左箭头键VK_UP向上箭头键0X26VK_RIGHT右箭头键0x27VK_DOWN向下箭头键0x28VK_SELECT SELECT键0x29VK_PRINT PRINT键0x2AVK_EXECUTE执行关键0x2BVK_SNAPSHOT Print Screen键0x2cVK_INSERT INS键0x2DVK_DELETE DEL键0x2EVK_HELP HELP键0x2F0X300键0X311键0x322键0x333个关键0x344个关键0x355个关键0x366个关键0x377个关键0x388键0x399键-未定义0x3A-40$41 一个关键0x42B键×43C键0×44D键0X45E键0x46F键0X47G键0X48H键0X49I键0x4A J键0x4B K键0x4C L键0x4D M键0x4E N键0x4F O键0x50P键0x51Q键0x52R键0x53S键0x54T键。

虚拟键值表

虚拟键值表

虛擬鍵盤鍵值表The complete virtual-key code set consists of 256 byte values in the range 0 to 255. Most, but not all, of the values used by standard drivers are in the range 0 to 127. There is a loose distinction between "standard" keys, which do not vary much, and "OEM" keys, which do vary from keyboard to keyboard.For full Windows functionality, a keyboard driver must provide the following virtual keys:Virtual-key code DescriptionVK_0 through VK_9 Number keys (not on numeric keypad): 0 through 9VK_A through VK_Z Letter keys: A through ZVK_BACK BACKSPACE keyVK_CONTROL CTRL keyVK_DELETE DELETE keyVK_DOWN Down direction keyVK_END END keyVK_ESCAPE ESC keyVK_F1 through VK_F10 F1 through F10 keysVK_HOME HOME keyVK_INSERT INSERT keyVK_LEFT Left direction keyVK_MENU ALT keyVK_NEXT PAGE DOWN keyVK_PRIOR PAGE UP keyVK_RIGHT Right direction keyVK_SHIFT Left and right SHIFT keysVK_SNAPSHOT PRINTSCREEN keyVK_SPACE SPACE keyVK_TAB TAB keyVK_UP Up direction keyShift keys must be available in the combinations unshifted, SHIFT, CTRL, and CTRL+ALT.Most keyboards, the virtual-key codes VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, and VK_NEXT are generated on the numeric keypad only if NUMLOCK is off.這些常量包含在windows.h頭文件中,使用的時候包含這個頭文件即可。

delphi 键盘键值对照表

delphi 键盘键值对照表

delphi 键盘键值对照表(2013-07-30 22:48:13)转载▼标签:delphi 键值it 分类:Delphi常数名称十六进制值十进制值对应按键VK_LBUTTON 01 1 鼠标的左键VK_RBUTTON 02 2 鼠标的右键VK-CANCEL 03 3 Ctrl+Break(通常不需要处理)VK_MBUTTON 04 4 鼠标的中键(三按键鼠标)VK_BACK 08 8 Backspace键VK_TAB 09 9 Tab键VK_CLEAR 0C 12 Clear键(Num Lock关闭时的数字键盘5)VK_RETURN 0D 13 Enter键VK_SHIFT 10 16 Shift键VK_CONTROL 11 17 Ctrl键VK_MENU 12 18 Alt键VK_PAUSE 13 19 Pause键VK_CAPITAL 14 20 Caps Lock键VK_ESCAPE 1B 27 Ese键VK_SPACE 20 32 Spacebar键VK_PRIOR 21 33 Page Up键VK_NEXT 22 34 Page Domw键VK_END 23 35 End键VK_HOME 24 36 Home键VK_LEFT 25 37 LEFT ARROW 键(←)VK_UP 26 38 UP ARROW键(↑)VK_RIGHT 27 39 RIGHT ARROW键(→)VK_DOWN 28 40 DOWN ARROW键(↓)VK_Select 29 41 Select键VK_PRINT 2A 42VK_EXECUTE 2B 43 EXECUTE键VK_SNAPSHOT 2C 44 Print Screen键(抓屏)VK_Insert 2D 45 Ins键(Num Lock关闭时的数字键盘0)VK_Delete 2E 46 Del键(Num Lock关闭时的数字键盘.)VK_HELP 2F 47 Help键VK_0 30 48 0键VK_1 31 49 1键VK_2 32 50 2键VK_3 33 51 3键VK_4 34 52 4键VK_5 35 53 5键VK_6 36 54 6键VK_7 37 55 7键VK_8 38 56 8键VK_9 39 57 9键VK_A 41 65 A键VK_C 43 67 C键VK_D 44 68 D键VK_E 45 69 E键VK_F 46 70 F键VK_G 47 71 G键VK_H 48 72 H键VK_I 49 73 I键VK_J 4A 74 J键VK_K 4B 75 K键VK_L 4C 76 L键VK_M 4D 77 M键VK_N 4E 78 N键VK_O 4F 79 O键VK_P 50 80 P键VK_Q 51 81 Q键VK_R 52 82 R键VK_S 53 83 S键VK_T 54 84 T键VK_U 55 85 U键VK_V 56 86 V键VK_W 57 87 W键VK_X 58 88 X键VK_Y 59 89 Y键VK_Z 5A 90 Z键VK_NUMPAD0 60 96 数字键0键VK_NUMPAD1 61 97 数字键1键VK_NUMPAD2 62 98 数字键2键VK_NUMPAD3 62 99 数字键3键VK_NUMPAD4 64 100 数字键4键VK_NUMPAD5 65 101 数字键5键VK_NUMPAD6 66 102 数字键6键VK_NUMPAD7 67 103 数字键7键VK_NUMPAD8 68 104 数字键8键VK_NUMPAD9 69 105 数字键9键VK_MULTIPLY 6A 106 数字键盘上的*键VK_ADD 6B 107 数字键盘上的+键VK_SEPARATOR 6C 108 Separator键VK_SUBTRACT 6D 109 数字键盘上的-键VK_DECIMAL 6E 110 数字键盘上的.键VK_DIVIDE 6F 111 数字键盘上的/键VK_F1 70 112 F1键VK_F2 71 113 F2键VK_F3 72 114 F3键VK_F5 74 116 F5键VK_F6 75 117 F6键VK_F7 76 118 F7键VK_F8 77 119 F8键VK_F9 78 120 F9键VK_F10 79 121 F10键VK_F11 7A 122 F11键VK_F12 7B 123 F12键VK_NUMLOCK 90 144 Num Lock 键VK_SCROLL 91 145 Scroll Lock键上面没有提到的:(都在大键盘)VK_LWIN 91 左win键VK_RWIN 92 右win键VK_APPS 93 右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和GetKeyState )VK_RMENU右Alt键(仅用于GetAsyncKeyState和GetKeyState )VK_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和GetKeyState )VK_RMENU右Alt键(仅用于GetAsyncKeyState和GetKeyState )VK_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
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
VK_MBUTTON 4 滑鼠中键
VK_BACK 8 退格
VK_TAB 9 TAB
VK_CLEAR 12 NUM LOCK关闭时的数字键盘5?
VK_RETURN 13 回车
VK_SHIFT 16 Shift
VK_CONTROL 17 Ctrl
VK_MENU 18 Alt
VK_DECIMAL 110 小键盘上的.
VK_DIVIDE 111 小键盘上的/
VK_NUMLOCK 144 Num Lock
VK_F1..VK_F24 112..135 F1..24
Unassigned 136..145 未定义
VK_SCROLL 145 Scroll Lock
Windows用VK_LWIN和VK_RWIN键打开「开始」功能表或者(在以前的版本中)启动「工作管理员程式」。这两个都可以用於登录或登出Windows(只在Microsoft Windows NT中有效),或者登录或登出网路(在Windows for Applications中)。应用程式能够通过显示辅助资讯或者当成捷径键看待来处理application键。
VK_MEDIA_PREV_TRACK B1 Previous Track key
VK_MEDIA_STOP B2 Stop Media key
VK_MEDIA_PLAY_PAUSE B3 Play/Pause Media key
ቤተ መጻሕፍቲ ባይዱ言
VK_LAUNCH_MAIL B4 Start Mail key
VK_LAUNCH_MEDIA_SELECT B5 Select Media key
VK_LAUNCH_APP1 B6 Start Application 1 key
VK_LAUNCH_APP2 B7 Start Application 2 key
标点
VK_OEM_1 186 分号
表6-4列出的前八个码可能是与VK_INSERT和VK_DELETE一起最常用的虚拟键码:
表6-4
十进位 十六进位 WINUSER.H识别字 必需? IBM相容键盘
33 21 VK_PRIOR ˇ Page Up
34 22 VK_NEXT ˇ Page Down
Reserved 94 保留
VK_SLEEP 95 Sleep???
数字键盘
VK_NUMPAD0..9 96..105 小键盘上的0到9
VK_MULTIPLY 106 小键盘上的*
VK_ADD 107 小键盘上的+
VK_SEPARATOR 108 分隔符
VK_SUBTRACT 109 小键盘上的-
VK_PAUSE 19 Pause Break
VK_CAPITAL 20 Caps Lock
VK_ESCAPE 27 ESC
VK_SPACE 32 空格键
VK_PRIOR 33 Page up
VK_NEXT 34 Page down
VK_END 35 End
音量
VK_VOLUME_MUTE AD Volume Mute key
VK_VOLUME_DOWN AE Volume Down key
VK_VOLUME_UP AF Volume Up key
媒体
VK_MEDIA_NEXT_TRACK B0 Next Track key
35 23 VK_END ˇ End
36 24 VK_HOME ˇ Home
37 25 VK_LEFT ˇ 左箭头
38 26 VK_UP ˇ 上箭头
39 27 VK_RIGHT ˇ 右箭头
40 28 VK_DOWN ˇ 下箭头
41 29 VK_SELECT
VK_OEM_4 219 [
VK_OEM_5 220 \
VK_OEM_6 221 ]
VK_OEM_7 222 引号
VK_RMENU 165 右Alt键
浏览器
VK_BROWSER_BACK A6(166) Browser Back key
VK_BROWSER_FORWARD A7(167) Browser Forward key
VK_BROWSER_REFRESH A8(168) Browser Refresh key
Windows也包括在主键盘上的字母和数位键的虚拟键码(数字键盘将单独处理)。
表6-5
十进位 十六进位 WINUSER.H识别字 必需? IBM相容键盘
48-57 30-39 无 ˇ 主键盘上的0到9
65-90 41-5A 无 ˇ A到Z
注意,数字和字母的虚拟键码是ASCII码。Windows程式几乎从不使用这些虚拟键码;实际上,程式使用的是ASCII码字元的字元讯息。
表6-6所示的代码是由Microsoft Natural Keyboard及其相容键盘产生的:
表6-6
十进位 十六进位 WINUSER.H识别字 必需? IBM相容键盘
91 5B VK_LWIN 左Windows键
92 5C VK_RWIN 右Windows键
93 5D VK_APPS Applications键
表6-3中的键--Backspace、Tab、Enter、Escape和Spacebar-通常用於Windows程式。不过,Windows一般用字元讯息(而不是键盘讯息)来处理这些键。
表6-3
十进位 十六进位 WINUSER.H识别字 必需? IBM相容键盘
8 08 VK_BACK ˇ Backspace
表6-7所示的代码用於数字键盘上的键(如果有的话):
表6-7
十进位 十六进位 WINUSER.H识别字 必需? IBM相容键盘
96-105 60-69 VK_NUMPAD0到VK_ NUMPAD9 NumLock打开时数字键盘上的0到9
106 6A VK_MULTIPLY 数字键盘上的*
表6-8
十进位 十六进位 WINUSER.H识别字 必需? IBM相容键盘
112-121 70-79 VK_F1到VK_F10 ˇ 功能键F1到F10
122-135 7A-87 VK_F11到VK_F24 功能键F11到F24
144 90 VK_NUMLOCK Num Lock
107 6B VK_ADD 数字键盘上的+
108 6C VK_SEPARATOR
109 6D VK_SUBTRACT 数字键盘上的-
110 6E VK_DECIMAL 数字键盘上的.
111 6F VK_DIVIDE 数字键盘上的/
最後,虽然多数的键盘都有12个功能键,但Windows只需要10个,而位元旗标却有24个。另外,程式通常用功能键作为键盘加速键,这样,它们通常不处理表6-8所示的按键:
VK_BROWSER_STOP A9(169) Browser Stop key
VK_BROWSER_SEARCH AA(170) Browser Search key
VK_BROWSER_FAVORITES AB(171) Browser Favorites key
VK_BROWSER_HOME AC(172) Browser Start and Home key
VK_HOME 36 Home
VK_LEFT 37 左箭头
VK_RIGHT 38 上箭头
VK_UP 39 右箭头
VK_DOWN 40 下箭头
VK_SELECT 41
VK_PRINT 42
VK_EXECUTE 43
VK_SNAPSHOT 44 Print Screen
虚拟键表
虚拟键与ASCII码对应的有: '1'-'9','A'-'Z'
vkkeyscan()函数可查看相应字符的实数值.参数为字符;
API常量型 实数值 解释
VK_LBUTTON 1 滑鼠左键
VK_RBUTTON 2 滑鼠右键
VK_CANCEL 3 Ctrl+Break
Specific 146..150 特殊用途
Unassigned 151..159 未定义
VK_LSHIFT 160 左Shift键
VK_RSHIFT 161 右Shift键
VK_LCONTROL 162 左Ctrl键
VK_RCONTROL 163 右Ctrl键
VK_LMENU 164 左Alt键
145 91 VK_SCROLL Scroll Lock
另外,还定义了一些其他虚拟键码,但它们只用於非标准键盘上的键,或者通常在大型主机终端机上使用的键。查看/ Platform SDK / User Interface Services / User Input / Virtual-Key Codes,可得到完整的列表。
1 01 VK_LBUTTON 滑鼠左键
2 02 VK_RBUTTON 滑鼠右键
3 03 VK_CANCEL ˇ Ctrl-Break
4 04 VK_MBUTTON 滑鼠中键
您永远都不会从键盘讯息中获得这些滑鼠键代码。在下一章可以看到,我们能够从滑鼠讯息中获得它们。VK_CANCEL代码是一个虚拟键码,它包括同时按下两个键(Ctrl-Break)。Windows应用程式通常不使用此键。
VK_OEM_PLUS 187 等号
VK_OEM_COMMA 188 逗号
VK_OEM_MINUS 189 减号
VK_OEM_PERIOD 190 句号
相关文档
最新文档