Various coding comparison tables for keyboard buttons

xiaoxiao2021-03-06  50

The various tables in this appendix list the control relationship between the keyboard button scan code and its ASCII code, and the data in the table is the form of hexadecimal.

When using an interrupt 16H function, when any key or a combination key is pressed, the register AH and Al saves the scan code of the button and the ASCII code.

Table 1, the coding scheme of the ASCII code

MSB LSB 0000010100111001011101110000NULDELSP0 @ P`p0001SOHDC1 1AQaq0010STXDC2 "2BRbr0011ETXDC3 # 3CScs0100EOTDC4 $ 4DTdt0101ENQNAK% 5EUeu0110ACKSYN & 6FVfv0111BELETB'7GWgw1000BSCAN (8HXhx1001HTEM) 9IYiy1010LFSUB *: JZjz1011VTESC ; K [k {1100FFFS | N ^ n! ~ 1111sius /? O_odel

Table 2, coding tables for letters and spaces

Button button ShiftCtrlalt

Scan code ASCII scan code ASCII scan code ASCII code scan code ASCII code a and A1E611E411E011E00b and B3062304230023000c and C2E632E432E032E00d and D2064204420042000e and E1265124512051200f and F2166214621062100g and G2267224722072200h and H2368234823082300i and I1769174917091700j an1 J246A244A240A2400k and K256B254B250B2500l and L266C264C260C2600m and M326D324D320D3200n and N316E314E310E3100o and O186F184F180F1800p and P1970195019101900q and Q1071105110111000r and R1372135213121300s and S1F731F531F131F00t and T1474145414141400u and U1675165516151600v and V2F762F562F162F00w and W1177115711171100x and X2D782D582D182D00y and Y1579155915191500z and Z2C7A2C5A2C1A2C00SpaceBar3920392039203920

Table 3, function keys of coding table

Press the key scan code SHIFTCTRLALT single key scan code ASCII ASCII ASCII code scan codes in ASCII code scanning F13B0054005E006800 F23C0055005F006900 F33D00560060006A00 F43E00570061006B00 F53F00580062006C00 F64000590063006D00 F741005A0064006E00 F842005B0065006F00 F943005C0066007000 F1044005D0067007100 F118500870089008B00 F12860088008A008C00

Table 4, digital keyboard coding table

SHIFTCTRLALT touch key scan code scan code ASCII ASCII ASCII code scan code scan code ASCII code Ins & 0 52 00 52 30 92 00 End & 14F004F3175000001 ↓ & 25000503291000002PgDn & 35100513376000003 ← & 44B004B347300000454C004C358F000005 → & 64D004D3674000006Home & 74700473777000007 ↑ & 8480048388D000008PgUp & 94900493984000009 4E2B4E2B90004E00-4A2D4A2D8E004A00DEL & '.' 53 00 53 2E 93 00 * 372A372A96003700 Table 5, the coding table of the first row of digital keyboard

Key touch SHIFTCTRLALT scan code ASCII code scan code ASCII code scan code ASCII code scan code ASCII code `and ~ 2960297E 29001 and! 02310221 78002 and @ 03320340030079003 and # 04330423 7A004 and $ 05340524 7B005 and% 06350625 7C006 and ^ 0736075E071E7D007 and & 08370826 7E008 and * 0938092A 7F009 and (0A390A38 80000 and) 0B300B29 8100- and _0C2D0C5F0C1F8200 = AND 0D3D0D2B 8300

Table 6, the coding table of operating buttons

Buttons SHIFTCTRLALT Scan code ASCII code scanning code ASCII code scan code ASCII code scan code ASCII code ESC 01 1B 01 1B 01 1B 0100 backspace 0E 08 0E 08 0E 7F 0e00 Tab 0F 09 0F 00 94 00 A500 ENTER 1C 0D 1C 0D 1C 0A 1C00

Table 7, the coding table of the label button

SHIFTCTRLALT touch key scan code scan code ASCII ASCII ASCII code scan code scan code ASCII code [and {1A5B1A7B1A1B1A00] and} 1B5D1B7D1B1D1B00; and: 273B273A 27 'and "28272822 28 / and | 2b5C2b7C2B1C2b, and <332C333C 33 and.> 342E343E 34 / AND? 352F353F 35

Table 8, the coding table of additional buttons

Press the key scan code SHIFTCTRLALT single key scan code ASCII ASCII ASCII code scan code scan code ASCII code Slash (/) E02FE02F9500A400EnterE00DE00DE00AA600Home47E047E077E09700End4FE04FE075E09F00PageUp49E049E084E09900PageDown51E051E076E0A100DnArrow50E050E091E0A000LeftArrow4BE04BE073E09B00RightArrow4DE04DE074E09D00UpArrow48E048E08DE09800Ins52E052E092E0A200Del53E053E093E0A300

Table 9, other button scan code

When these keys are pressed, the BIOS does not enter the keyboard buffer in the keyboard buffer.

Button Scanning Code Capslock 3a Numlock 45 Scrollock 46 Shift (Left) 2A Shift (Right) 36 Alt 38 Ctrl 1D Prtscreen 37

转载请注明原文地址:https://www.9cbs.com/read-116662.html

New Post(0)