1This is the documentation for the keytab-lilo.pl program. It was 2taken verbatim from the LILO-20 README file; only this header was 3added. 4 5LILO program code, documentation and auxiliary programs are 6Copyright 1992-1997 Werner Almesberger. 7All rights reserved. 8 9Redistribution and use in source and binary forms of parts of or the 10whole original or derived work are permitted provided that the 11original work is properly attributed to the author. The name of the 12author may not be used to endorse or promote products derived from 13this software without specific prior written permission. This work 14is provided "as is" and without any express or implied warranties. 15 16To use a LILO keyboard table with Syslinux, specify the KBDMAP command 17in syslinux.cfg, for example: 18 19 kbdmap de.ktl 20 21============================================================================ 22 23Keyboard translation 24-------------------- 25 26The PC keyboard emits so-called scan codes, which are basically key 27numbers. The BIOS then translates those scan codes to the character codes 28of the characters printed on the key-caps. By default, the BIOS normally 29assumes that the keyboard has a US layout. Once an operating system is 30loaded, this operating system can use a different mapping. 31 32At boot time, LILO only has access to the basic services provided by the 33BIOS and therefore receives the character codes for an US keyboard. It 34provides a simple mechanism to re-map the character codes to what is 35appropriate for the actual layout.* 36 37 * The current mechanism isn't perfect, because it sits on top of the 38 scan code to character code translation performed by the BIOS. This 39 means that key combinations that don't produce any useful character on 40 the US keyboard will be ignored by LILO. The advantage of this approach 41 is its simplicity. 42 43 44Compiling keyboard translation tables 45- - - - - - - - - - - - - - - - - - - 46 47LILO obtains layout information from the keyboard translation tables Linux 48uses for the text console. They are usually stored in 49/usr/lib/kbd/keytables. LILO comes with a program keytab-lilo.pl that reads 50those tables and generates a table suitable for use by the map installer. 51keytab-lilo.pl invokes the program loadkeys to print the tables in a format 52that is easy to parse.* 53 54 * On some systems, only root can execute loadkeys. It is then necessary 55 to run keytab-lilo.pl as root too. 56 57keytab-lilo.pl is used as follows: 58 59 keytab-lilo.pl [ -p <old_code>=<new_code> ] ... 60 [<path>]<default_layout>[.<extension>] ] 61 [<path>]<kbd_layout>[.<extension>] ] 62 63 -p <old_code>=<new_code> 64 Specifies corrections ("patches") to the mapping obtained from the 65 translation table files. E.g. if pressing the upper case "A" should 66 yield an at sign, -p 65=64 would be used. The -p option can be 67 repeated any number of times. The codes can also be given as 68 hexadecimal or as octal numbers if they are prefixed with 0x or 0, 69 respectively. 70 <path> The directory in which the file resides. The default path is 71 /usr/lib/kbd/keytables. 72 <extension> Usually the trailing .map, which is automatically added if 73 the file name doesn't contain dots. 74 <default_layout> Is the layout which specifies the translation by the 75 BIOS. If none is specified, us is assumed. 76 <kbd_layout> Is the actual layout of the keyboard. 77 78keytab-lilo.pl writes the resulting translation table as a binary string to 79standard output. Such tables can be stored anywhere with any name, but the 80suggested naming convention is /boot/<kbd>.ktl ("Keyboard Table for Lilo"), 81where <kbd> is the name of the keyboard layout. 82 83Example: 84 85keytab-lilo.pl de >/boot/de.ktl 86