扫描码及键盘码Word文档下载推荐.docx
《扫描码及键盘码Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《扫描码及键盘码Word文档下载推荐.docx(12页珍藏版)》请在冰豆网上搜索。
F4
0x3f00
F5
0x4000
F6
0x4100
F7
0x4200
F8
0x4300
F9
0x4400
F10
主键盘区:
0x2960
~
0x0231
1
0x0332
2
0x0433
3
0x0534
4
0x0635
5
0x0736
6
0x0837
7
0x0938
8
0x0a39
9
0x0b30
0
0x0c2d
-
0x0d3d
=
0x2b5c
\
0x0e08
退格键
0x0f09
Tab
0x1071
q
0x1177
w
0x1265
e
0x1372
r
0x1474
t
0x1579
y
0x1675
u
0x1769
i
0x186f
o
0x1970
p
0x1a5b
[
0x1b5d
]
0x1e61
a
0x1f73
s
0x2064
d
0x2166
f
0x2267
g
0x2368
h
0x246a
j
0x256b
k
0x266c
l
0x273b
;
0x2827
'
0x1c0d
回车
0x2c7a
z
0x2d78
x
0x2e63
c
0x2f76
v
0x3062
b
0x316e
n
0x326d
m
0x332c
0x342e
.
0x352f
/
0x3920
空格键
右边数字键盘:
0x5200
Insert
0x4700
Home
0x4900
PageUP
0x5300
Delete
0x4f00
End
0x5100
PageDown
0x4800
上箭头
0x4b00
左箭头
0x5000
下箭头
0x4d00
右箭头
0x372a
*
0x4a2d
-(注意,这是数字键盘的)
0x4737
0x4838
0x4939
0x4b34
0x4c35
0x4d36
0x4e2b
+
0x4f31
0x5032
0x5133
0x5230
0x532e
Del
Ctrl+字母:
在字母扫描码的基础上减去0x0060
alt+字母:
在字母的基础上,把最后两位变成00
shift+字母:
在字母的基础上减去0x0020
比如:
a----0x1e61
Ctrl+a----0x1e01
Alt+a-----0x1e00
b----0x3062
Ctrl+b----0x3002
Alt+b-----0x3000
另加:
Ctrl+Enter:
0x1c0a
可以直接用一个程序查看的很简单的
#include<
stdio.h>
bios.h>
voidmain(void)
{
intkey,modifiers;
while((key=bioskey(0))!
=0&
&
key!
=0x11b){
printf("
0x%x\n"
key);
}
*********************************************************************************************
上面列出的编码中,前面两位是“扫描码”,后面两位是ASCII码,合起来是所谓的“键盘码”
比如,小键盘的数字键扫描码和大键盘的数字键是不同的,而后两位是一样的,因为那个是它们共用的ASCII码
下面就是扫描码的列表
KeyboardScanCodes(NumericalOrder)
---------------+---------------+---------------+---------------+---------------
HEXDECkeys|HEXDECkeys|HEXDECkeys|HEXDECkeys|HEXDECkeys
|1016Q|2032D|3048B|4064F6
011ESC|1117W|2133F|3149N|4165F7
0221|1218E|2234G|3250M|4266F8
0332|1319R|2335H|3351,|4367F9
0443|1420T|2436J|3452.|4468F10
0554|1521Y|2537K|3553/|4569Num
0665|1622U|2638L|3654RShift|4670Scroll
0776|1723I|2739;
|3755PrtSc|4771Home
0887|1824O|2840'
|3856Alt|4872Up
0998|1925P|2941`|3957Space|4973PgUp
0A109|1A26[|2A42LShift|3A58Caps|4A74-
0B110|1B27]|2B43\|3B59F1|4B75Left
0C12-|1C28|2C44Z|3C60F2|4C76Center
0D13=|1D29CTRL|2D45X|3D61F3|4D77Right
0E14bs|1E30A|2E46C|3E62F4|4E78+
0F15Tab|1F31S|2F47V|3F63F5|4F79End
5080Down||||
5181PgDn||||
5282Ins||||
5383Del||||
KeyboardScanCodes(ReadfromPortHEX60=DEC96)(KeyboardLayout)
Topnumber...DEC
Bottomnumber...HEX
+--+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+-------+
|F1|F2|ESC|1|2|3|4|5|6|7|8|9|0|-|=|BkS|NumLok|ScrLok|
|||||||||||||||||||
|59|60|1|2|3|4|5|6|7|8|9|10|11|12|13|14|69|70|
|3B|3C|01|02|03|04|05|06|07|08|09|0A|0B|0C|0D|0E|45|46|
|F3|F4|TAB|Q|W|E|R|T|Y|U|I|O|P|[|]||738|93-|
|||||||||||||||||3|3|
|61|62|15|16|17|18|19|20|21|22|23|24|25|26|27||71372|73374|
|3D|3E|0F|10|11|12|13|14|15|16|17|18|19|1A|1B||47348|4934A|
|F5|F6|CTR|A|S|D|F|G|H|J|K|L|;
|'
|`|28|435|63|
|63|64|29|30|31|32|33|34|35|36|37|38|39|40|41||75376|773|
|3F|40|1D|1E|1F|20|21|22|23|24|25|26|27|28|29||4B34C|4D3|
|F7|F8|Shf|\|Z|X|C|V|B|N|M|,|.|/|Shf|Prt|132|33+|
|65|66|42|43|44|45|46|47|48|49|50|51|52|53|54|55|78380|81378|
|41|42|2A|2B|2C|2D|2E|2F|30|31|32|33|34|35|36|37|4F350|5134E|
|F9|F0|A|t|||||pac|||||Cap|Lok|I|s3D|l3|
|67|68|5||||||57|||||5||8|38|3|
|43|44|3||||||39|||||3||5|35|3|
ExtendedASCIISpecialKeyCodes(NumericalOrder)
...composedof2bytes,the2ndbytebeing00(00signifiesthatthespecialcodesaretobeapplied.)
HEXDECkeys
-------------------------------
033CTRL-2;
sameasCHR$(0)
0F15Shift-tab
1016Alt-Q
1117Alt-W
1218Alt-E
1319Alt-R
1420Alt-T
1521Alt-Y
1622Alt-U
1723Alt-I
1824Alt-O
1925Alt-P
1E30Alt-A
1F31Alt-S
2032Alt-D
2133Alt-F
2234Alt-G
2335Alt-H
2436Alt-J
2537Alt-K
2638Alt-L
2C44Alt-Z
2D45Alt-X
2E46Alt-C
2F47Alt-V
3048Alt-B
3149Alt-N
3250Alt-M
3B59F1
3C60F2
3D61F3
3E62F4
3F63F5
4064F6
4165F7
4266F8
4367F9
4468F10
4771Home
4872Up
4973PgUp
4B75Left
4D77Right
4F79End
5080Down
5181PgDn
5282Ins
5383Del
5484Shift-F1
5585Shift-F2
5686Shift-F3
5787Shift-F4
5888Shift-F5
5989Shift-F6
5A90Shift-F7
5B91Shift-F8
5C92Shift-F9
5D93Shift-F10
5E94Ctrl-F1
5F95Ctrl-F2
6096Ctrl-F3
6197Ctrl-F4
6298Ctrl-F5
6399Ctrl-F6
64100Ctrl-F7
65101Ctrl-F8
66102Ctrl-F9
67103Ctrl-F10
68104Alt-F1
69105Alt-F2
6A106Alt-F3
6B107Alt-F4
6C108Alt-F5
6D109Alt-F6
6E110Alt-F7
6F111Alt-F8
70112Alt-F9
71113Alt-F10
72114Ctrl-PrtSc
73115Ctrl-Left
74116Ctrl-Right
75117Ctrl-End
76118Ctrl-PgDn
77119Ctrl-Home
78120Alt-1
79121Alt-2
7A122Alt-3
7B123Alt-4
7C124Alt-5
7D125Alt-6
7E126Alt-7
7F127Alt-8
80128Alt-9
81129Alt-0
82130Alt--
83131Alt-=
84132Ctrl-PgUp
85133Ctrl-Up
86134Ctrl--(num)
87135Ctrl-Center
88136Ctrl-+(num)
89137Ctrl-Down
8A138Ctrl-Ins
8B139Ctrl-Del
8C140Alt-Home
8D141Alt-Up
8E142Alt-PgUp
8F143Alt--(num)
90144Alt-Left
91145Alt-Center
92146Alt-Right
93147Alt-+(num)
94148Alt-End
95149Alt-Down
96150Alt-PgDn
97151Alt-Ins
98152Alt-Del
ExtendedASCIISpecialKeyCodes(KeyboardLayout)
------------------+-------------------+-------------------+--------------------
HEXDECkeys|HEXDECkeys|HEXDECkeys|HEXDECkeys
033nul|0F15Shift-tab|72114Ctrl-PrtSc|
4771Home||77119Ctrl-Home|8C140Alt-Home
4872Up||85133Ctrl-Up|8D141Alt-Up
4973PgUp||84132Ctrl-PgUp|8E142Alt-PgUp
4A74-(num)||86134Ctrl--(nu)|8F143Alt--(num)
4B75Left||73115Ctrl-Left|90144Alt-Left
4C76Center||87135Ctrl-Centr|91145Alt-Center
4D77Right||74116Ctrl-Right|92146Alt-Right
4E78+(num)||88136Ctrl-+(nu)|93147Alt-+(num)
4F79End||75117Ctrl-End|94148Alt-End
5080Down||89137Ctrl-Down|95149Alt-Down
5181PgDn||76118Ctrl-PgDn|96150Alt-PgDn
5282Ins||8A138Ctrl-Ins|97151Alt-Ins
5383Del||8B139Ctrl-Del|98152Alt-Del
3B59F1|5484Shift-F1|5E94Ctrl-F1|68104Alt-F1
3C60F2|5585Shift-F2|5F95Ctrl-F2|69105Alt-F2
3D61F3|5686Shift-F3|6096Ctrl-F3|6A106Alt-F3
3E62F4|5787Shift-F4|6197Ctrl-F4|6B107Alt-F4
3F63F5|5888Shift-F5|6298Ctrl-F5|6C108Alt-F5
4064F6|5989Shift-F6|6399Ctrl-F6|6D109Alt-F6
4165F7|5A90Shift-F7|64100Ctrl-F7|6E110Alt-F7
4266F8|5B91Shift-F8|65101Ctrl-F8|6F111Alt-F8
4367F9|5C92Shift-F9|66102Ctrl-F9|70112Alt-F9
4468F10|5D93Shift-F10|67103Ctrl-F10|71113Alt-F10
1E30Alt-A|3149Alt-N|78120Alt-1|
3048Alt-B|1824Alt-O|79121Alt-2|
2E46Alt-C|1925Alt-P|7A122Alt-3|
2032Alt-D|1016Alt-Q|7B123Alt-4|
1218Alt-E|1319Alt-R|7C124Alt-5|
2133Alt-