Example: stock market

Appendix C: Keyboard Scan Codes - Yale University

Page 1351 Appendix C: Keyboard scan Codes Table 90: PC Keyboard scan Codes (in hex) KeyDownUpKeyDownUpKeyDownUpKeyDownUpEsc1 81[ {1A9A, <33B3 center 4 CCC1 !282] }1B9B. >34B4 right 4 DCD2 @383 Enter1C9C/ ?35B5 + 4 ECE3 #484 Ctrl1D9DR shift36B6 end 4 FCF4 $585A1E9E* PrtSc37B7 down 50D05 %686S1F9 Falt38B8 pgdn 51D16 ^787D20A0space39B9 ins 52D27 &888F21A1 CAPS3 ABA del 53D38 * 9 89 G 22A2F13 BBB / E0 35B59 (0A8AH23A3F23 CBC enter E0 1C9C0 )0B8BJ24A4F33 DBDF1157D7- _0C8CK25A5F43 EBEF1258D8= +0D8DL26A6F53 FBFinsE0 52D2 Bksp0E8E; :27A7F640C0delE0 53D3 Tab0F8F 28A8F741C1homeE0 47C7Q1090` ~29A9F842C2endE0 4 FCFW1191L shift2 AAAF943C3pgupE0 49C9E1292\ |2 BABF1044C4pgdnE0 51D1R1393Z2 CACNUM45C5leftE0 4 BCBT1494X2 DADSCRL46C6rightE0 4 DCDY1595C2 EAE home 47C7upE0 48C8U1696V2 FAF up 48C8downE0 50D0I 1797B30B0 pgup 49C9R altE0 38B8O1898N31B1 - 4 ACAR ctrlE0 1D9DP 1999M32B2 left 4 BCBP auseE1 1D 45 E1 9D C5- Thi dtt d ith FM

b. Pressing the PrtSc key does not produce a scan code. Instead, BIOS executes an int 5 instruction which should print the screen. c. This is the control-P character that will activate the printer under MS-DOS. d. This is the minus key on the keypad. e. This is the plus key on the keypad. N 31 6E4E0E3100 6E 4E 6E 4E M 32 6D4D0D3200 6D 4D 6D 4D

Tags:

  Code, Appendix, Scan, Keyboard, Appendix c, Keyboard scan codes

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Appendix C: Keyboard Scan Codes - Yale University

1 Page 1351 Appendix C: Keyboard scan Codes Table 90: PC Keyboard scan Codes (in hex) KeyDownUpKeyDownUpKeyDownUpKeyDownUpEsc1 81[ {1A9A, <33B3 center 4 CCC1 !282] }1B9B. >34B4 right 4 DCD2 @383 Enter1C9C/ ?35B5 + 4 ECE3 #484 Ctrl1D9DR shift36B6 end 4 FCF4 $585A1E9E* PrtSc37B7 down 50D05 %686S1F9 Falt38B8 pgdn 51D16 ^787D20A0space39B9 ins 52D27 &888F21A1 CAPS3 ABA del 53D38 * 9 89 G 22A2F13 BBB / E0 35B59 (0A8AH23A3F23 CBC enter E0 1C9C0 )0B8BJ24A4F33 DBDF1157D7- _0C8CK25A5F43 EBEF1258D8= +0D8DL26A6F53 FBFinsE0 52D2 Bksp0E8E; :27A7F640C0delE0 53D3 Tab0F8F 28A8F741C1homeE0 47C7Q1090` ~29A9F842C2endE0 4 FCFW1191L shift2 AAAF943C3pgupE0 49C9E1292\ |2 BABF1044C4pgdnE0 51D1R1393Z2 CACNUM45C5leftE0 4 BCBT1494X2 DADSCRL46C6rightE0 4 DCDY1595C2 EAE home 47C7upE0 48C8U1696V2 FAF up 48C8downE0 50D0I 1797B30B0 pgup 49C9R altE0 38B8O1898N31B1 - 4 ACAR ctrlE0 1D9DP 1999M32B2 left 4 BCBP auseE1 1D 45 E1 9D C5- Thi dtt d ith FM k4 0 2 Appendix CPage 1352 Table 91: Keyboard Codes (in hex) KeyScan CodeASCIIS hift a CtrlAltNumCapsShift Caps Shift NumEsc011B1B1B1B1B1B1B1 !

2 023121 7800 313131312 @033240 03007900 323232323 #043323 7A00 333333334 $053424 7B00 343434345 %063525 7C00 353535356 ^07365E1E 7D00 363636367 &083726 7E00 373737378 *09382A 7F00 383838389 (0A3928 8000 393939390 )0B3029 8100 30303030- _0C2D5F1F 8200 2D2D5F5F= +0D3D2B 8300 3D3D2B2 BBksp0E08087F08080808 Tab0F09 0F00 0909 0F000F00 Q 10715111 1000 71517151W11775717 1100 77577757E 12654505 1200 65456545R 13725212 1300 72527252T 14745414 1400 74547454Y 15795919 1500 79597959U 16755515 1600 75557555I 17694909 1700 69496949O 186F4F0F 1800 6F4F6F4FP 19705010 1900 70507050[ { 1A5B7B1B5B5B7B7B] } 1B5D7D1D5D5D7D7 Denter1C0D0D0A0D0D0A0 Actrl1DA 1E614101 1E00 61416141S 1F735313 1F00 73537353D 20644404 2000 64446444F 21664606 2100 66466646G 22674707 2200 67476747H 23684808 2300 68486848J 246A4A0A 2400 6A4A6A4AK 256B4B0B 2500 6B4B6B4BL 266C4C0C 2600 6C4C6C4C; : 273B3A3B3B3A3A 28272227272222` ~29607E60607E7 ELshift2A\ |2B5C7C1C5C5C7C7CZ 2C7A5A1A 2C00 7A5A7A5AX2D785818 2D00 78587858C 2E634303 2E00 63436343V 2F765616 2F00 76567656B 30624202 3000 62426242 KeyScan CodeASCIIS hiftCtrlAltNumCapsShift Caps Shift Num AppendicesPage 1353 a.

3 For the alphabetic characters, if capslock is active then see the shift-capslock Pressing the PrtSc key does not produce a scan code . Instead, BIOS executes an int 5 instruction whichshould print the This is the control-P character that will activate the printer under This is the minus key on the This is the plus key on the 316E4E0E 3100 6E4E6E4EM 32 6D4D0D 3200 6D4D6D4D, < 332C3C2C2C3C3C. >342E3E2E2E3E3E/ ?352F3F2F2F3F3 FRshift36* PrtSc372 AINT 5 b 10 c 2A2 AINT 5 INT 5alt38space3920202020202020caps3AF13B 3B0054005E0068003B003B0054005400 F23C 3C0055005F0069003C003C0055005500 F33D 3D00560060006A003D003D0056005600 F43E 3E00570061006B003E003E0057005700 F53F 3F00580062006C003F003F0058005800 F640 4000590063006D004000400059005900 F741 41005A0064006E00410041005A005A00 F842 42005B0065006F00420042005B005B00 F943 43005C0066007000430043005C005C00 F1044 44005D0067007100440044005D005D00 num45scrl46home47 4700 37 7700 374700374700up48 4800 38384800384800pgup49 4900 39 8400 394900394900- d 4A2D2D2D2D2D2 Dleft4B 4B00 34 7300

4 344B00344B00center4C 4C00 35354C00354C00right4D 4D00 36 7400 364D00364D00+ e 4E2B2B2B2B2B2 Bend4F 4F00 31 7500 314F00314F00down50 5000 32325000325000pgdn51 5100 33 7600 335100335100ins52 5200 30305200305200del53 5300 2E2E53002E5300 Table 91: Keyboard Codes (in hex) KeyScan CodeASCIIS hift a CtrlAltNumCapsShift Caps Shift NumKeyScan CodeASCIIS hiftCtrlAltNumCapsShift Caps Shift Num Appendix CPage 1354 a. Addresses are all given in hexadecimal Table 92: Keyboard Related BIOS Variables NameAddress a SizeDescriptionKbdFlags1 (modifier flags)40:17 ByteThis byte maintains the current status of the modifier keys on the Keyboard .

5 The bits have the following mean-ings:bit 7: Insert mode togglebit 6: Capslock toggle (1=capslock on)bit 5: Numlock toggle (1=numlock on)bit 4: Scroll lock toggle (1=scroll lock on)bit 3: Alt key (1=alt is down)bit 2: Ctrl key (1=ctrl is down)bit 1: Left shift key (1=left shift is down)bit 0: Right shift key (1=right shift is down)KbdFlags2(Toggle keys down)40:18 ByteSpecifies if a toggle key is currently 7: Insert key (currently down if 1)bit 6: Capslock key (currently down if 1)bit 5: Numlock key (currently down if 1)bit 4: Scroll lock key (currently down if 1)bit 3: Pause state locked (ctrl-Numlock) if onebit 2: SysReq key (currently down if 1)bit 1: Left alt key (currently down if 1)bit 0: Left ctrl key (currently down if 1)AltKpd40:19 ByteBIOS uses this to compute the ASCII code for an alt-Key-pad :80 WordOffset of start of Keyboard buffer (1Eh).

6 Note: this vari-able is not supported on many systems, be careful if you use :82 WordOffset of end of Keyboard buffer (3Eh). See the note :96 ByteMiscellaneous Keyboard 7: Read of Keyboard ID in progressbit 6: Last char is first kbd ID characterbit 5: Force numlock on resetbit 4: 1 if 101-key kbd, 0 if 83/84 key 3: Right alt key pressed if 1bit 2: Right ctrl key pressed if 1bit 1: Last scan code was E0hbit 0: Last scan code was E1hKbdFlags440:97 ByteMore miscellaneous Keyboard 7: Keyboard transmit errorbit 6: Mode indicator updatebit 5: Resend receive flagbit 4: Acknowledge receivedbit 3: Must always be zerobit 2: Capslock LED (1=on)bit 1: Numlock LED (1=on)bit 0: Scroll lock LED (1=on) AppendicesPage 1355 Table 93.

7 On-Board Keyboard Controller Commands (Port 64h) Value (hex) Description20 Transmit Keyboard controller s command byte to system as a scan code at port next byte written to port 60h will be stored in the Keyboard controller s command if a password is installed (PS/2 only). Result comes back in port 60h. 0 FAh means a password is installed, 0F1h means no password (PS/2 only). Starts receipt of password. The next sequence of scan Codes written to port 60h, ending with a zero byte, are the new match. Characters from the Keyboard are compared to password until a match mouse device (PS/2 only). Identical to setting bit five of the command byte.

8 A8 Enable mouse device (PS/2 only). Identical to clearing bit five of the command mouse device. Returns 0 if okay, 1 or 2 if there is a stuck clock, 3 or 4 if there is a stuck data line. Results come back in port self-test. Returns 55h in port 60h if interface test. Tests the Keyboard interface. Returns 0 if okay, 1 or 2 if there is a stuck clock, 3 or 4 if there is a stuck data line. Results come back in port Returns 16 bytes from the Keyboard s microcontroller chip. Not available on PS/2 Keyboard . Same operation as setting bit four of the command Keyboard . Same operation as clearing bit four of the command Keyboard input port to port 60h.

9 This input port contains the following values:bit 7: Keyboard inhibit keyswitch (0 = inhibit, 1 = enabled).bit 6: Display switch (0=color, 1=mono).bit 5: Manufacturing 4: System board RAM (always 1).bits 0-3: input port (above) bits 0-3 to status bits 4-7. (PS/2 only)C2 Copy input pot (above) bits 4-7 to status port bits 4-7. (PS/2 only).D0 Copy microcontroller output port value to port 60h (see definition below).D1 Write the next data byte written to port 60h to the microcontroller output port. This port has the following definition:bit 7: Keyboard 6: Keyboard 5: Input buffer empty 4: Output buffer full 3: 2: 1: Gate A20 0: System reset (if zero).

10 Note: writing a zero to bit zero will reset the a one to bit one combines address lines 19 and 20 on the PC s address bus. Appendix CPage 1356 D2 Write Keyboard buffer. The Keyboard controller returns the next value sent to port 60h as though a keypress produced that value. (PS/2 only).D3 Write mouse buffer. The Keyboard controller returns the next value sent to port 60h as though a mouse operation produced that value. (PS/2 only).D4 Writes the next data byte (60h) to the mouse (auxiliary) device. (PS/2 only).E0 Read test inputs. Returns in port 60h the status of the Keyboard serial lines. Bit zero con-tains the Keyboard clock input, bit one contains the Keyboard data x Pulse output port (see definition for D1).


Related search queries