HomeAppendixASCII tableDevelopment systems

16.2 The scancode

As not every key on the Atari keyboard is assigned an ASCII-code, it is necessary in a few cases to interrogate the relevant scancode directly. Normally however this should be necessary only for the 'special' non-print keys such as the cursor and function keys.

The following table gives an overview of the important scancodes for German, UK and North American keyboards as well as the standard VDI code. Keyboards for other countries/languages may differ for some keys (see NKCC below).

Where two characters are shown for a non-letter entry, the second is the upper character marked on the key - i.e. produced with one of the [Shift] keys pressed; the scancode remains the same.

Scancode Germany USA Standard VDI code
1 ESC    
2 1 1 1
3 2 2 2
4 3 3 3
5 4 4 4
6 5 5 5
7 6 6 6
8 7 7 7
9 8 8 8
10 9 9 9
11 0 0 0
12 - -
13 , = =
14 Backspace    
15 TAB    
16 Q Q Q
17 W W W
18 E E E
19 R R R
20 T T T
21 Z Y Y
22 U U U
23 I I I
24 O O O
25 P P P
26 [ [
27 + ] ]
28 Return    
29 Control    
30 A A A
31 S S S
32 D D D
33 F F F
34 G G G
35 H H H
36 J J J
37 K K K
38 L L L
39 ; ;
40 , ,
41 #    
42 Left Shift    
43   \ \
44 Y Z Z
45 X X X
46 C C C
47 V V V
48 B B B
49 N N N
50 M M M
51 , , ,
52 . . .
53 - / /
54 Right Shift PRINT SCREEN
55 Not present Not present  
56 Alternate    
57 Space    
58 CapsLock    
59 F1    
60 F2    
61 F3    
62 F4    
63 F5    
64 F6    
65 F7    
66 F8    
67 F9    
68 F10    
69      
70      
71 ClrHome    
72 Up-arrow    
73 Not present Not present PAGE UP
74 - (Num-pad)    
75 <–    
76 Alt Gr(Milan)    
77 –>    
78 + (Num-pad)    
79 Not present Not present END
80 Down-arrow    
81 Not present Not present PAGE DOWN
82 Insert    
83 Delete    
84 Shift-F1 Shift-F1 F11
85 Shift-F2 Shift-F2 F12
86 Shift-F3 Shift-F3 F13
87 Shift-F4 Shift-F4 F14
88 Shift-F5 Shift-F5 F15
89 Shift-F6 Shift-F6 F16
90 Shift-F7 Shift-F7 F17
91 Shift-F8 Shift-F8 F18
92 Shift-F9 Shift-F9 F19
93 Shift-F10 Shift-F10 F20
94 Not present Not present F21
95 Not present Not present F22
96 < Not present F23
97 Undo   F24
98 Help   F25
99 ( (Num-pad)   F26
100 ) (Num-pad)   F27
101 / (Num-pad)   F28
102 * (Num-pad)   F29
103 7 (Num-pad)   F30
104 8 (Num-pad)   F31
105 9 (Num-pad)   F32
106 4 (Num-pad)   F33
107 5 (Num-pad)   F34
108 6 (Num-pad)   F35
109 1 (Num-pad)   F36
110 2 (Num-pad)   F37
111 3 (Num-pad)   F38
112 0 (Num-pad)   F39
113 . (Num-pad)   F40
114 Enter   CTRL PRINT SCREEN
115 Not present Not present CTRL <–
116 Not present Not present CTRL –>
117 Not present Not present CTRL END
118 Not present Not present CTRL PAGE DOWN
119 Not present Not present CTRL HOME
120 ALT 1   ALT 1
121 ALT 2   ALT 2
122 ALT 3   ALT 3
123 ALT 4   ALT 4
124 ALT 5   ALT 5
125 ALT 6   ALT 6
126 ALT 7   ALT 7
127 ALT 8   ALT 8
128 ALT 9   ALT 9
129 ALT 0   ALT 0
130 ALT ALT- ALT -
131 ALT ' ALT= ALT =
132 Not present Not present CTRL PAGE UP

Note: A small problem is the contry/language-dependent evaluation of the scancodes, since after all programs ought to work correctly abroad as well. Here one can recommend the Normalized Key Code Converter (NKCC) by Harald Siegmund, which solves just this problem.

See also: ASCII table   Keytbl


HomeAppendixASCII tableDevelopment systems