Atari XL Benutzerhandbuch

Seite von 77
The Last Word 3.0 Reference Manual 
 
8-57 
 
 
8.6  CUSTOMISING THE KEYBOARD 
 
LW allows you to customise the keyboard in two ways: by using macros, and by using 
a custom keyboard layout (in the LW.SYS file). Redefining the keyboard using the 
macro is the best way to reassign keystrokes, while a keyboard definition file allows 
you to totally remap the keyboard (to create a DVORAK layout, for example). 
 
8.6.1   THE KEYBOARD TABLE 
 
First, let’s look at the KEY statement, which should appear in the LW.SYS file. 
 
The keyboard customisation contains lines of the form: 
 
KEY n,n 
 
The KEY statement takes two numeric arguments. The first number is an index to the 
hardware scan code table. The scan code table is 256 bytes long, and is divided into 
four groups of 64 bytes. The first 64 bytes represent normal keys (without Shift or 
Control), the next 64 bytes are the Shifted characters, and the next 64 bytes are 
Control characters. The final 64 bytes represent keys pressed while both Shift and 
Control are held down together (<Shift+Ctrl> keys in this manual). LW
’s keyboard table 
is exactly like the table contained in the Atari’s operating system ROM, except for the 
Shift and Control block (the Atari OS’s keyboard table is only 192 bytes long). 
 
The table on the following page shows the entire default key mapping of LW. The keys 
are shown in the left column, and the grey columns represent the code offsets for the 
normal, shifted, control and Shift+Ctrl characters.