Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  When the main byte is null (00H), it means that a special, non-ASCII key
  was pressed. The special keys include function keys, shifted function
  keys, cursor-control keys such as Home and End, and some of the Ctrl- and
  Alt-key combinations. When any of these keys are pressed by themselves or
  in combination with other keys, the auxiliary byte contains a single value
  that indicates which key was pressed. Figure 6-5 lists these values in a
  rough mixture of logical and numeric order. (For a complete breakdown of
  ROM BIOS key codes, see the IBM BIOS Interface Technical Reference
  Manual.)

  --------------------------------------------------------------------------
  NOTE:
    With the 101/102-key keyboard, the main byte value for the gray
    cursor-control keys is E0H. This value distinguishes these keys from
    their counterparts on the numeric keypad, which have a main byte value
    of 00H.
  --------------------------------------------------------------------------


           Value
  (hex)              (dec)             Keys Pressed
  --------------------------------------------------------------------------
  3BH                59                F1
  3CH                60                F2
  3DH                61                F3
  3EH                62                F4
  3FH                63                F5
  40H                64                F6
  41H                65                F7
  42H                66                F8
  43H                67                F9
  44H                68                F10
  85H                133               F11
  86H                134               F12

  54H                84                Shift-F1
  55H                85                Shift-F2
  56H                86                Shift-F3
  57H                87                Shift-F4
  58H                88                Shift-F5
  59H                89                Shift-F6
  5AH                90                Shift-F7
  5BH                91                Shift-F8
  5CH                92                Shift-F9
  5DH                93                Shift-F10
  87H                135               Shift-F11
  88H                136               Shift-F12

  5EH                94                Ctrl-F1
  5FH                95                Ctrl-F2
  60H                96                Ctrl-F3
  61H                97                Ctrl-F4
  62H                98                Ctrl-F5
  63H                99                Ctrl-F6
  64H                100               Ctrl-F7
  65H                101               Ctrl-F8
  66H                102               Ctrl-F9
  67H                103               Ctrl-F10
  89H                137               Ctrl-F11
  8AH                138               Ctrl-F12

  68H                104               Alt-F1
  69H                105               Alt-F2
  6AH                106               Alt-F3
  6BH                107               Alt-F4
  6CH                108               Alt-F5
  6DH                109               Alt-F6
  6EH                110               Alt-F7
  6FH                111               Alt-F8
  70H                112               Alt-F9
  71H                113               Alt-F10
  8BH                139               Alt-F11
  8CH                140               Alt-F12

  78H                120               Alt-1
  79H                121               Alt-2
  7AH                122               Alt-3
  7BH                123               Alt-4
  7CH                124               Alt-5
  7DH                125               Alt-6
  7EH                126               Alt-7
  7FH                127               Alt-8
  80H                128               Alt-9
  81H                129               Alt-0
  82H                130               Alt-Hyphen
  83H                131               Alt-=

  10H                16                Alt-Q
  11H                17                Alt-W
  12H                18                Alt-E
  13H                19                Alt-R
  14H                20                Alt-T
  15H                21                Alt-Y
  16H                22                Alt-U
  17H                23                Alt-I
  18H                24                Alt-O
  19H                25                Alt-P

  1EH                30                Alt-A
  1FH                31                Alt-S
  20H                32                Alt-D
  21H                33                Alt-F
  22H                34                Alt-G
  23H                35                Alt-H
  24H                36                Alt-J
  25H                37                Alt-K
  26H                38                Alt-L

  2CH                44                Alt-Z
  2DH                45                Alt-X
  2EH                46                Alt-C
  2FH                47                Alt-V
  30H                48                Alt-B
  31H                49                Alt-N
  32H                50                Alt-M

  0FH                15                Shift-Tab

  47H                71                Home
  48H                72                Up arrow
  49H                73                PgUp

  4BH                75                Left arrow

  4DH                77                Right arrow

  4FH                79                End

  50H                80                Down arrow
  51H                81                PgDn
  52H                82                Insert
  53H                83                Del

  72H                114               Ctrl-PrtSc
  73H                115               Ctrl-Left arrow
  74H                116               Ctrl-Right arrow
  75H                117               Ctrl-End
  76H                118               Ctrl-PgDn
  77H                119               Ctrl-Home

  84H                132               Ctrl-PgUp
  --------------------------------------------------------------------------


  Figure 6-5.  ROM BIOS auxiliary byte values for the special keys.

  Codes generated by the ROM BIOS for the complete set of characters and
  special keys are handled differently in different programming languages.
  BASIC, for example, takes a mixed approach to the special keys. When you
  use ordinary input statements, BASIC returns the ASCII characters and
  filters out any special keys. Some of these keys can be acted on with the
  ON KEY statement, but you can use the BASIC INKEY$ function to get
  directly to the ROM BIOS coding for keyboard characters and find out
  immediately what special key was pressed. If the INKEY$ function returns a
  1-byte string, it is reporting an ordinary or extended ASCII keyboard
  character. If INKEY$ returns a 2-byte string, the first byte in the string
  is the ROM BIOS's main byte and will always be 00H; the second byte is the
  auxiliary byte and will indicate which special key was pressed.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson