appendixc (keyboard codes and ascii chart)

Upload: naeemsiddiqui

Post on 07-Jul-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    1/14

    Keyboard Codesand ASCII Chart

    Asmall microprocessor chip inside the keyboard con-trols the PC keyboard. Power and clock signals are pro-vided from the system board, and data is returned in codesfrom the keyboard.

     There are unique codes for each key pressed and specialcodes when certain keys are released. This is why there aresome keys with no printable or transmittable code or charac-ters, but the PC “knows” a key has been pressed. The key-board also provides the status of the CapsLock, NumLock,and ScrollLock keys.

     These codes are provided to the system board for interpreta-tion and conversion into standard ASCII codes for the 128characters of the ASCII character set.

    IBM enhances the ASCII character set with some foreign

    language symbols and a set of line and block charactersfor graphics use, completing a 256-character code set.

     The F1–F10 keys, as well as the Alt, SysReq, PrtSc, and Lockkeys, have no ASCII equivalents. The PC and programs thatknow how to interpret the keyboard data use these internally.

     Table C-1 provides the key name or character, the code sentto the PC system board (shown in both hex and decimal), andthe key number—which is used by the PC to know which keyis pressed. Note that some key operations produce two codes.

     This allows for Shift, Ctrl, and Alt extensions of key presses.

    It is important to have all three codes available because differ-ent programs look for different representations of the keys.Also, the key number assignments differ between the PC andXT systems, the AT, and a variety of enhanced keyboards.

    CCA P P E N D I✦ ✦ ✦

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    2/14

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    3/14

    Appendix C   ✦ Keyboard Codes and ASCII Chart

    Key Label Key Label Scan Code Scan Code

    Key Number Low er Case Upper Case Hex Decima l  

    30 Caps Lock Caps Lock 3A 5831 a A 1E 30

    32 s S 1F 31

    33 d D 20 32

    34 f F 21 33

    35 g G 22 34

    36 h H 23 35

    37 j J 24 36

    38 k K 25 37

    39 l L 26 38

    40 ; : 27 39

    41 ‘ “ 28 40

    44 Left Shift Left Shift 2A 42

    46 z Z 2C 44

    47 x X 2D 45

    48 c C 2E 46

    49 v V 2F 47

    50 b B 30 48

    51 n N 31 49

    52 m M 32 50

    53 , < 33 51

    54 . > 34 52

    55 / ? 35 53

    57 Right Shift Right Shift 36 54

    58 Left Ctrl Left Ctrl 1D 55

    60 Left Alt Left Alt 38 5661 Space Bar Space Bar 39 57

    62 Right Alt Right Alt E0,38

    64 Right Ctrl Right Ctrl E0,1D

    75 Insert Insert E0,52

    Continued 

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    4/14

    712 Appendixes

    Table C-1   (continued) 

    Key Label Key Label Scan Code Scan Code

    Key Number Low er Case Upper Case Hex Decima l  

    76 Delete Delete E0,53

    79 Left Arrow Left Arrow E0,4B

    80 Home Home E0,47

    81 End End E0,4F

    83 Up Arrow Up Arrow E0,48

    84 Down Arrow Down Arrow E0,50

    85 Page Up Page Up E0,49

    86 Page Down Page Down E0,5189 Right Arrow Right Arrow E0,4D

    90 Num Lock Num Lock 45,C5

    91 Keypad 7 Home 47 71

    92 Keypad 4 Left Arrow 4B 75

    93 Keypad 1 End 4F 79

    95 Keypad / Keypad / E0,35

    96 Keypad 8 Up Arrow 48 72

    97 Keypad 5 4C 76

    98 Keypad 2 Down Arrow 50 80

    99 Keypad 0 Insert 52 82

    100 Keypad * Keypad * E0,37

    101 Keypad 9 Page Up 49 73

    102 Keypad 6 Right Arrow 4D 77

    103 Keypad 3 Page Down 51 81

    104 Keypad . Keypad . 53 83

    105 Keypad - Keypad - 4A 74

    106 Keypad + Keypad + 4E 78

    108 Keypad Enter Keypad Enter E0,1C

    110 Esc Esc 01 1

    112 F1 F1 3B 59

    113 F2 F2 3C 60

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    5/14

    Appendix C   ✦ Keyboard Codes and ASCII Chart

    Key Label Key Label Scan Code Scan Code

    Key Number Low er Case Upper Case Hex Decima l  

    114 F3 F3 3D 61115 F4 F4 3E 62

    116 F5 F5 3F 63

    117 F6 F6 40 64

    118 F7 F7 41 65

    119 F8 F8 42 66

    120 F9 F9 43 67

    121 F10 F10 44 68

    122 F11 F11 D9 217

    123 F12 F12 DA 218

    124 PrtSc/ SysRq PrtSc/ SysRq 2A,37

    125 Scroll Lock Scroll Lock 46 70

    126 Pause Break Pause Break 1D,E0,45,

    E0,C5,9D

    Complete ASCII Chart The following 8-part table, in Figures C-1 through C-8, shows the most common(and one very uncommon) characters, codes, and symbols of the 256 possiblevalues that an 8-bit character may represent. The first 128 (0 to 127) are the ASCII(American Standard Code for Information Interchange) codes and characters. Thesecond 128 characters (128 to 255) are defined quite differently from one majorplatform to another. IBM first used them in the PC for foreign language charactersand line drawing characters. With all of the fonts available today, one of these val-ues could be a traffic sign or a weird looking symbol from the ZapfDingbats font’scharacter set.

    No ASCII chart would be considered complete without the PC version of the ASCIIcharacters and the corresponding HEX values from 00 to FF. Few include the Octal

    numbers from 000 to 377. Sometimes you’ll find an ASCII chart with the binarysequence from 00000000 to 11111111. Seldom do you find one with the EBCDICcharacters, codes, and symbols (from IBM mainframes). The kicker in this chart arethe EBCDIC card codes. Remember punch cards? Did you ever think about readingthe information in those holes? Now, you too can be one of those “strange” people.

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    6/14

    714 Appendixes

    Figure C-1: ASCII chart, Part 1

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    7/14

    Appendix C   ✦ Keyboard Codes and ASCII Chart

    Figure C-2: ASCII chart, Part 2

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    8/14

    716 Appendixes

    Figure C-3: ASCII chart, Part 3

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    9/14

    Appendix C   ✦ Keyboard Codes and ASCII Chart

    Figure C-4: ASCII chart, Part 4

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    10/14

    718 Appendixes

    Figure C-5: ASCII Chart, Part 5

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    11/14

    Appendix C   ✦ Keyboard Codes and ASCII Chart

    Figure C-6: ASCII chart, Part 6

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    12/14

    720 Appendixes

    Figure C-7: ASCII chart, Part 7

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    13/14

    Appendix C   ✦ Keyboard Codes and ASCII Chart

    Figure C-8: ASCII chart, Part 8

    ✦ ✦ ✦

  • 8/18/2019 Appendixc (Keyboard Codes and Ascii Chart)

    14/14