键盘数字对应的ASCII码和keycode码

转载 http://hi.baidu.com/dongtianxiaozi/blog/item/f91d6c4e208c87ead62afc1a.html

键盘数字对应的ASCII码(keycode码)
keycode 1 = 鼠标左键
keycode 2 = 鼠标右键
keycode 3 = Cancel
keycode 4 = 鼠标中键
keycode 8 = BackSpace
keycode 9 = Tab
keycode 12 = Clear(未知)
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape
keycode 32 = space
keycode 33 = Prior(PageUp键)
keycode 34 = Next(PageDown键)
keycode 35 = End
keycode 36 = Home
keycode 37 = Left
keycode 38 = Up
keycode 39 = Right
keycode 40 = Down
keycode 41 = Select(未知)
keycode 42 = Print(PrintScreen键)
keycode 43 = Execute(未知)
keycode 45 = Insert
keycode 46 = Delete
keycode 47 = Help(未知)
keycode 48 = 0 equal braceright
keycode 49 = 1 exclam onesuperior
keycode 50 = 2 quotedbl twosuperior
keycode 51 = 3 section threesuperior
keycode 52 = 4 dollar
keycode 53 = 5 percent
keycode 54 = 6 ampersand
keycode 55 = 7 slash braceleft
keycode 56 = 8 parenleft bracketleft
keycode 57 = 9 parenright bracketright
keycode 65 = a A
keycode 66 = b B
keycode 67 = c C
keycode 68 = d D
keycode 69 = e E EuroSign
keycode 70 = f F
keycode 71 = g G
keycode 72 = h H
keycode 73 = i I
keycode 74 = j J
keycode 75 = k K
keycode 76 = l L
keycode 77 = m M mu
keycode 78 = n N
keycode 79 = o O
keycode 80 = p P
keycode 81 = q Q at
keycode 82 = r R
keycode 83 = s S
keycode 84 = t T
keycode 85 = u U
keycode 86 = v V
keycode 87 = w W
keycode 88 = x X
keycode 89 = y Y
keycode 90 = z Z
keycode 96 = KP_0 KP_0(小键盘数字0)
keycode 97 = KP_1 KP_1(小键盘数字1)
keycode 98 = KP_2 KP_2(小键盘数字2)
keycode 99 = KP_3 KP_3(小键盘数字3)
keycode 100 = KP_4 KP_4(小键盘数字4)
keycode 101 = KP_5 KP_5(小键盘数字5)
keycode 102 = KP_6 KP_6(小键盘数字6)
keycode 103 = KP_7 KP_7(小键盘数字7)
keycode 104 = KP_8 KP_8(小键盘数字8)
keycode 105 = KP_9 KP_9(小键盘数字9)
keycode 106 = KP_Multiply KP_Multiply(小键盘乘)
keycode 107 = KP_Add KP_Add(小键盘加)
keycode 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 = F1
keycode 113 = F2
keycode 114 = F3
keycode 115 = F4
keycode 116 = F5
keycode 117 = F6
keycode 118 = F7
keycode 119 = F8
keycode 120 = F9
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 129 = F18
keycode 130 = F19
keycode 131 = F20
keycode 132 = F21
keycode 133 = F22
keycode 134 = F23
keycode 135 = F24
keycode 136 = Num_Lock
keycode 137 = Scroll_Lock(未知)
keycode 187 = acute grave(未知)
keycode 188 = comma semicolon(未知)(逗号 分号)
keycode 189 = minus underscore (减号 下划线)
keycode 190 = period colon (未知 冒号)
keycode 192 = numbersign apostrophe(未知 单引号)
keycode 210 = plusminus hyphen macron (未知 & ^)
keycode 211 =
keycode 212 = copyright registered(未知)
keycode 213 = guillemotleft guillemotright(未知)
keycode 214 = masculine ordfeminine(未知)
keycode 215 = ae AE(未知)
keycode 216 = cent yen(未知)
keycode 217 = questiondown exclamdown(未知)
keycode 218 = onequarter onehalf threequarters(未知)
keycode 220 = less greater bar(小于号 大于号 未知)
keycode 221 = plus asterisk asciitilde(加号 星号 未知)
keycode 227 = multiply division(乘 除)
keycode 228 = acircumflex Acircumflex(未知)
keycode 229 = ecircumflex Ecircumflex(未知)
keycode 230 = icircumflex Icircumflex(未知)
keycode 231 = ocircumflex Ocircumflex(未知)
keycode 232 = ucircumflex Ucircumflex(未知)
keycode 233 = ntilde Ntilde(未知)
keycode 234 = yacute Yacute(未知)
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 241 = agrave Agrave atilde Atilde(未知)
keycode 242 = egrave Egrave(未知)
keycode 243 = igrave Igrave(未知)
keycode 244 = ograve Ograve otilde Otilde(未知)
keycode 245 = ugrave Ugrave(未知)
keycode 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 sterling(未知)
keycode 254 = Mode_switch(未知)
如果要使用组合键,则可以利用event.ctrlKey,event.shiftKey,event .altKey值为true或false,判断是否按下了ctrl键、shift键以及alt键。
例:event.ctrlKey=true && event.keycode=65


keycode的ASCII值大全

vbKeyLButton 0x1 鼠标左键
      vbKeyRButton 0x2 鼠标右键
      vbKeyCancel 0x3 CANCEL 键
      vbKeyMButton 0x4 鼠标中键
      vbKeyBack 0x8 BACKSPACE 键
      vbKeyTab 0x9 TAB 键
      vbKeyClear 0xC CLEAR 键
      vbKeyReturn 0xD ENTER 键
      vbKeyShift 0x10 SHIFT 键
      vbKeyControl 0x11 CTRL 键
      vbKeyMenu 0x12 MENU 键
      vbKeyPause 0x13 PAUSE 键
      vbKeyCapital 0x14 CAPS LOCK 键
      vbKeyEscape 0x1B ESC 键
      vbKeySpace 0x20 SPACEBAR 键
      vbKeyPageUp 0x21 PAGE UP 键
      vbKeyPageDown 0x22 PAGE DOWN 键
      vbKeyEnd 0x23 END 键
      vbKeyHome 0x24 HOME 键
      vbKeyLeft 0x25 LEFT ARROW 键
      vbKeyUp 0x26 UP ARROW 键
      vbKeyRight 0x27 RIGHT ARROW 键
      vbKeyDown 0x28 DOWN ARROW 键
      vbKeySelect 0x29 SELECT 键
      vbKeyPrint 0x2A PRINT SCREEN 键
      vbKeyExecute 0x2B EXECUTE 键
      vbKeySnapshot 0x2C SNAPSHOT 键
      vbKeyInsert 0x2D INSERT 键
      vbKeyDelete 0x2E DELETE 键
      vbKeyHelp 0x2F HELP 键
      vbKeyNumlock 0x90 NUM LOCK 键
      A 至 Z 键与 A 杴 Z 字母的 ASCII 码相同:
      常数      值 描述
      vbKeyA 65 A 键
      vbKeyB 66 B 键
      vbKeyC 67 C 键
      vbKeyD 68 D 键
      vbKeyE 69 E 键
      vbKeyF 70 F 键
      vbKeyG 71 G 键
      vbKeyH 72 H 键
      vbKeyI 73 I 键
      vbKeyJ 74 J 键
      vbKeyK 75 K 键
      vbKeyL 76 L 键
      vbKeyM 77 M 键
      vbKeyN 78 N 键
      vbKeyO 79 O 键
      vbKeyP 80 P 键
      vbKeyQ 81 Q 键
      vbKeyR 82 R 键
      vbKeyS 83 S 键
      vbKeyT 84 T 键
      vbKeyU 85 U 键
      vbKeyV 86 V 键
      vbKeyW 87 W 键
      vbKeyX 88 X 键
      vbKeyY 89 Y 键
      vbKeyZ 90 Z 键
      0 至 9 键与数字 0 杴 9 的 ASCII 码相同:
      常数       值 描述
      vbKey0 48 0 键
      vbKey1 49 1 键
      vbKey2 50 2 键
      vbKey3 51 3 键
      vbKey4 52 4 键
      vbKey5 53 5 键
      vbKey6 54 6 键
      vbKey7 55 7 键
      vbKey8 56 8 键
      vbKey9 57 9 键
      下列常数代表数字键盘上的键:
      常数                        值 描述
      vbKeyNumpad0 0x60 0 键
      vbKeyNumpad1 0x61 1 键
      vbKeyNumpad2 0x62 2 键
      vbKeyNumpad3 0x63 3 键
      vbKeyNumpad4 0x64 4 键
      vbKeyNumpad5 0x65 5 键
      vbKeyNumpad6 0x66 6 键
      vbKeyNumpad7 0x67 7 键
      vbKeyNumpad8 0x68 8 键
      vbKeyNumpad9 0x69 9 键
      vbKeyMultiply 0x6A MULTIPLICATION SIGN (*) 键
      vbKeyAdd 0x6B PLUS SIGN (+) 键
      vbKeySeparator 0x6C ENTER 键
      vbKeySubtract 0x6D MINUS SIGN (杴) 键
      vbKeyDecimal 0x6E DECIMAL POINT (.) 键
      vbKeyDivide 0x6F DIVISION SIGN (/) 键
      下列常数代表功能键:
      常数    值 描述
      vbKeyF1 0x70 F1 键
      vbKeyF2 0x71 F2 键
      vbKeyF3 0x72 F3 键
      vbKeyF4 0x73 F4 键
      vbKeyF5 0x74 F5 键
      vbKeyF6 0x75 F6 键
      vbKeyF7 0x76 F7 键
      vbKeyF8 0x77 F8 键
      vbKeyF9 0x78 F9 键
      vbKeyF10 0x79 F10 键
      vbKeyF11 0x7A F11 键
      vbKeyF12 0x7B F12 键
      vbKeyF13 0x7C F13 键
      vbKeyF14 0x7D F14 键
      vbKeyF15 0x7E F15 键
      vbKeyF16 0x7F F16 键

你可能感兴趣的:(keycode)