ASCII and key codes

This table provides information on the default keyboard layout of the
Atari ST.  All numbers in the table are hexadecimal.

The first column is an index, indicating both the key number or
keycode as recorded in the keyboard buffer, and an ASCII code.  The
key code is for columns two through nine and the last column; the
ASCII code is for the other two columns.  The next eight columns are
the ASCII codes associated with that keycode with the shift code found
at the top of the column.  A "--" indicates that that keycode/shift
code combination is never returned to the user by the operating
system.  The last column is the name of the key as used by TMCOMP.TTP.
A "--" indicates that the indicated keycode is never returned to the
user.

The remaining two columns are used to find the keycode/shift code
combination that generates a given ASCII code.  All 128 ASCII codes
0-127 are generated by some keycode/shift code combination on the
keyboard. The number in the "Code" column is the keycode of the key
pressed to generate that ASCII code, and the "Shift" column is the
appropriate shift code.  If a particular ASCII code can be generated
by more than one keycode/shift code combination, only one is
indicated.  A "--" indicates that ASCII code is never returned to the
user.

The shift codes are:

0    No shift-type keys pressed
1    Either shift key pressed
2    The control key pressed
4    The alternate key pressed

Combinations of shift-type keys are found by adding together the
appropriate codes.

Note that some keys have more than one keycode (e.g., the number keys
on the regular keyboard).  Notice, too, that the keys on the cursor
keypad are not accessible to the user when the alternate key is
active.  These keycode/shift code combinations are used by the
operating system to provide keyboard equivalents for mouse movements
and actions or are otherwise used by the operating system and are not
available to the user.

  Index      0    1    2    3    4    5    6    7    Code Shift  Name

    00  |   --   --   --   --   --   --   --   --  |  83   04  |  --
    01  |   1B   1B   1B   1B   1B   1B   1B   1B  |  1E   02  |  esc
    02  |   31   21   11   01   --   --   11   01  |  30   02  |  1
    03  |   32   40   00   00   --   --   00   00  |  2E   02  |  2
    04  |   33   23   13   03   --   --   13   03  |  20   02  |  3
    05  |   34   24   14   04   --   --   14   04  |  12   02  |  4
    06  |   35   25   15   05   --   --   15   05  |  21   02  |  5
    07  |   36   5E   1E   1E   --   --   1E   1E  |  28   02  |  6
    08  |   37   26   17   06   --   --   17   06  |  63   02  |  7
    09  |   38   2A   18   0A   --   --   18   0A  |  64   02  |  8
    0A  |   39   28   19   08   --   --   19   08  |  72   02  |  9
    0B  |   30   29   10   09   --   --   10   09  |  4E   02  |  0
    0C  |   2D   5F   1F   1F   --   --   1F   1F  |  33   02  |  -
    0D  |   3D   2B   1D   0B   --   --   1D   0B  |  72   00  |  =
    0E  |   08   08   08   08   08   08   08   08  |  71   02  |
backspace
    0F  |   09   09   09   09   09   09   09   09  |  65   02  |  tab
    10  |   71   51   11   11   00   00   11   11  |  70   02  |  q
    11  |   77   57   17   17   00   00   17   17  |  6D   02  |  w
    12  |   65   45   05   05   00   00   05   05  |  13   02  |  e
    13  |   72   52   12   12   00   00   12   12  |  6F   02  |  r
    14  |   74   54   14   14   00   00   14   14  |  6A   02  |  t
    15  |   79   59   19   19   00   00   19   19  |  6B   02  |  y
    16  |   75   55   15   15   00   00   15   15  |  2F   02  |  u
    17  |   69   49   09   09   00   00   09   09  |  67   02  |  i
    18  |   6F   4F   0F   0F   00   00   0F   0F  |  68   02  |  o
    19  |   70   50   10   10   00   00   10   10  |  69   02  |  p
    1A  |   5B   7B   1B   1B   5B   7B   1B   1B  |  2C   02  |  [
    1B  |   5D   7D   1D   1D   5D   7D   1D   1D  |  27   02  |  ]
    1C  |   0D   0D   0A   0A   0D   0D   0A   0A  |  33   03  |
return
    1D  |   --   --   --   --   --   --   --   --  |  1B   02  |  --
    1E  |   61   41   01   01   00   00   01   01  |  6C   02  |  a
    1F  |   73   53   13   13   00   00   13   13  |  53   02  |  s
    20  |   64   44   04   04   00   00   04   04  |  39   00  |  d
    21  |   66   46   06   06   00   00   06   06  |  02   01  |  f
    22  |   67   47   07   07   00   00   07   07  |  28   01  |  g
    23  |   68   48   08   08   00   00   08   08  |  04   01  |  h
    24  |   6A   4A   0A   0A   00   00   0A   0A  |  05   01  |  j
    25  |   6B   4B   0B   0B   00   00   0B   0B  |  06   01  |  k
    26  |   6C   4C   0C   0C   00   00   0C   0C  |  08   01  |  l
    27  |   3B   3A   1B   1A   3B   3A   1B   1A  |  28   00  |  ;
    28  |   27   22   07   02   27   22   07   02  |  63   00  |  '
    29  |   60   7E   00   1E   60   7E   00   1E  |  64   00  |  `
    2A  |   --   --   --   --   --   --   --   --  |  66   00  |  --
    2B  |   5C   7C   1C   1C   5C   7C   1C   1C  |  4E   00  |  \
    2C  |   7A   5A   1A   1A   00   00   1A   1A  |  33   00  |  z
    2D  |   78   58   18   18   00   00   18   18  |  4A   00  |  x
    2E  |   63   43   03   03   00   00   03   03  |  71   00  |  c
    2F  |   76   56   16   16   00   00   16   16  |  65   00  |  v
    30  |   62   42   02   02   00   00   02   02  |  70   00  |  b
    31  |   6E   4E   0E   0E   00   00   0E   0E  |  6D   00  |  n
    32  |   6D   4D   0D   0D   00   00   0D   0D  |  6E   00  |  m
    33  |   2C   3C   0C   1C   2C   3C   0C   1C  |  6F   00  |  ,
    34  |   2E   3E   0E   1E   2E   3E   0E   1E  |  6A   00  |  .
    35  |   2F   3F   0F   1F   2F   3F   0F   1F  |  6B   00  |  /
    36  |   --   --   --   --   --   --   --   --  |  6C   00  |  --
    37  |   --   --   --   --   --   --   --   --  |  77   03  |  --
    38  |   --   --   --   --   --   --   --   --  |  68   00  |  --
    39  |   20   20   00   00   20   20   00   00  |  69   00  |
space
    3A  |   --   --   --   --   --   --   --   --  |  27   01  |  --
    3B  |   00   --   00   --   00   --   00   --  |  27   00  |  f1
    3C  |   00   --   00   --   00   --   00   --  |  33   01  |  f2
    3D  |   00   --   00   --   00   --   00   --  |  0D   00  |  f3
    3E  |   00   --   00   --   00   --   00   --  |  34   01  |  f4
    3F  |   00   --   00   --   00   --   00   --  |  35   01  |  f5
    40  |   00   --   00   --   00   --   00   --  |  03   01  |  f6
    41  |   00   --   00   --   00   --   00   --  |  1E   01  |  f7
    42  |   00   --   00   --   00   --   00   --  |  30   01  |  f8
    43  |   00   --   00   --   00   --   00   --  |  2E   01  |  f9
    44  |   00   --   00   --   00   --   00   --  |  20   01  |  f10
    45  |   --   --   --   --   --   --   --   --  |  12   01  |  --
    46  |   --   --   --   --   --   --   --   --  |  21   01  |  --
    47  |   00   37   --   --   --   --   --   --  |  22   01  |
home
    48  |   00   38   00   18   --   --   --   --  |  23   01  |  up
    49  |   --   --   --   --   --   --   --   --  |  17   01  |  --
    4A  |   2D   2D   1F   1F   2D   2D   1F   1F  |  24   01  |  n-
    4B  |   00   34   --   --   --   --   --   --  |  25   01  |
left
    4C  |   --   --   --   --   --   --   --   --  |  26   01  |  --
    4D  |   00   36   --   --   --   --   --   --  |  32   01  |
right
    4E  |   2B   2B   0B   0B   2B   2B   0B   0B  |  31   01  |  n+
    4F  |   --   --   --   --   --   --   --   --  |  18   01  |  --
    50  |   00   32   00   00   --   --   --   --  |  19   01  |
down
    51  |   --   --   --   --   --   --   --   --  |  10   01  |  --
    52  |   00   30   00   10   --   --   --   --  |  13   01  |
insert
    53  |   7F   7F   1F   1F   7F   7F   1F   1F  |  1F   01  |
delete
    54  |   --   00   --   00   --   00   --   00  |  14   01  |  f1
    55  |   --   00   --   00   --   00   --   00  |  16   01  |  f2
    56  |   --   00   --   00   --   00   --   00  |  2F   01  |  f3
    57  |   --   00   --   00   --   00   --   00  |  11   01  |  f4
    58  |   --   00   --   00   --   00   --   00  |  2D   01  |  f5
    59  |   --   00   --   00   --   00   --   00  |  15   01  |  f6
    5A  |   --   00   --   00   --   00   --   00  |  2C   01  |  f7
    5B  |   --   00   --   00   --   00   --   00  |  1A   00  |  f8
    5C  |   --   00   --   00   --   00   --   00  |  2B   00  |  f9
    5D  |   --   00   --   00   --   00   --   00  |  1B   00  |  f10
    5E  |   --   --   --   --   --   --   --   --  |  07   01  |  --
    5F  |   --   --   --   --   --   --   --   --  |  0C   01  |  --
    60  |   --   --   --   --   --   --   --   --  |  29   00  |  --
    61  |   00   00   00   00   00   00   00   00  |  1E   00  |
undo
    62  |   00   00   00   00   --   --   --   --  |  30   00  |
help
    63  |   28   28   08   08   28   28   08   08  |  2E   00  |  n(
    64  |   29   29   09   09   29   29   09   09  |  20   00  |  n)
    65  |   2F   2F   0F   0F   2F   2F   0F   0F  |  12   00  |  n/
    66  |   2A   2A   0A   0A   2A   2A   0A   0A  |  21   00  |  n*
    67  |   37   37   17   17   37   37   17   17  |  22   00  |  n7
    68  |   38   38   18   18   38   38   18   18  |  23   00  |  n8
    69  |   39   39   19   19   39   39   19   19  |  17   00  |  n9
    6A  |   34   34   14   14   34   34   14   14  |  24   00  |  n4
    6B  |   35   35   15   15   35   35   15   15  |  25   00  |  n5
    6C  |   36   36   1E   1E   36   36   1E   1E  |  26   00  |  n6
    6D  |   31   31   11   11   31   31   11   11  |  32   00  |  n1
    6E  |   32   32   00   00   32   32   00   00  |  31   00  |  n2
    6F  |   33   33   13   13   33   33   13   13  |  18   00  |  n3
    70  |   30   30   10   10   30   30   10   10  |  19   00  |  n0
    71  |   2E   2E   0E   0E   2E   2E   0E   0E  |  10   00  |  n.
    72  |   0D   0D   0A   0A   0D   0D   0A   0A  |  13   00  |
enter
    73  |   --   --   00   00   --   --   --   --  |  1F   00  |
left
    74  |   --   --   00   00   --   --   --   --  |  14   00  |
right
    75  |   --   --   --   --   --   --   --   --  |  16   00  |  --
    76  |   --   --   --   --   --   --   --   --  |  2F   00  |  --
    77  |   --   --   00   37   --   --   --   --  |  11   00  |
home
    78  |   --   --   --   --   00   00   --   --  |  2D   00  |  1
    79  |   --   --   --   --   00   00   --   --  |  15   00  |  2
    7A  |   --   --   --   --   00   00   --   --  |  2C   00  |  3
    7B  |   --   --   --   --   00   00   --   --  |  1A   01  |  4
    7C  |   --   --   --   --   00   00   --   --  |  2B   01  |  5
    7D  |   --   --   --   --   00   00   --   --  |  1B   01  |  6
    7E  |   --   --   --   --   00   00   --   --  |  29   01  |  7
    7F  |   --   --   --   --   00   00   --   --  |  53   00  |  8
    80  |   --   --   --   --   00   00   --   --  |  --   --  |  9
    81  |   --   --   --   --   00   00   --   --  |  --   --  |  0
    82  |   --   --   --   --   00   00   --   --  |  --   --  |  -
    83  |   --   --   --   --   00   00   --   --  |  --   --  |  =
