键盘按键对应的键码Ba la la la ~ 读者朋友,你们好啊,⼜到了冷锋时间,话不多说,发车!
本⽂讲述了js获取及判断键盘按键的⽅法。分享给⼤家供⼤家参考,具体如下:
js ⾥⾯的键盘事件经常⽤到,所以收集了键盘事件对应的键码来分享下:
keyCode 8 = BackSpace BackSpace
keyCode 9 = Tab Tab
keyCode 12 = Clear
keyCode 13 = Enter
keyCode 16 = Shift_L
keyCode 17 = Control_L
pollution作文keyCode 18 = Alt_L
keyCode 19 = Pau
keyCode 20 = Caps_Lock
we will rock you 歌词
keyCode 27 = Escape Escape
keyCode 32 = space
keyCode 33 = Prior
keyCode 34 = Next
keyCode 35 = End
keyCode 36 = Home
gollakeyCode 37 = Left
keyCode 38 = Up
keyCode 39 = Right
manually
keyCode 40 = Downtude
keyCode 41 = Select
keyCode 42 = Print曲轴材料
keyCode 43 = Execute
keyCode 45 = Inrt
keyCode 46 = Delete
keyCode 47 = Help
keyCode 48 = 0 equal braceright keyCode 49 = 1 exclam onesuperior浸涂
keyCode 50 = 2 quotedbl twosuperior keyCode 51 = 3 ction threesuperior keyCode 52 = 4 dollarconnect
keyCode 53 = 5 percent
keyCode 54 = 6 ampersandac是什么意思
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 Vhari
keyCode 87 = w W keyCode 88 = x X
keyCode 89 = y Y
keyCode 90 = z Z
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_4 keyCode 101 = KP_5 KP_5 keyCode 102 = KP_6 KP_6 keyCode 103 = KP_7 KP_7 keyCode 104 = KP_8 KP_8