syslinux-3.08-2 sources from FC4
[bootcd.git] / syslinux / keytab-lilo.doc
1 This is the documentation for the keytab-lilo.pl program.  It was
2 taken verbatim from the LILO-20 README file; only this header was
3 added.
4
5 LILO program code, documentation and auxiliary programs are
6 Copyright 1992-1997 Werner Almesberger.
7 All rights reserved.
8
9 Redistribution and use in source and binary forms of parts of or the
10 whole original or derived work are permitted provided that the
11 original work is properly attributed to the author. The name of the
12 author may not be used to endorse or promote products derived from
13 this software without specific prior written permission. This work
14 is provided "as is" and without any express or implied warranties.
15
16 To use a LILO keyboard table with SYSLINUX, specify the KBDMAP command
17 in syslinux.cfg, for example:
18
19         kbdmap de.ktl
20
21 ============================================================================
22
23 Keyboard translation
24 --------------------
25
26 The PC keyboard emits so-called scan codes, which are basically key 
27 numbers. The BIOS then translates those scan codes to the character codes 
28 of the characters printed on the key-caps. By default, the BIOS normally 
29 assumes that the keyboard has a US layout. Once an operating system is 
30 loaded, this operating system can use a different mapping.
31
32 At boot time, LILO only has access to the basic services provided by the 
33 BIOS and therefore receives the character codes for an US keyboard. It 
34 provides a simple mechanism to re-map the character codes to what is 
35 appropriate 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
44 Compiling keyboard translation tables
45 - - - - - - - - - - - - - - - - - - -
46
47 LILO obtains layout information from the keyboard translation tables Linux 
48 uses for the text console. They are usually stored in 
49 /usr/lib/kbd/keytables. LILO comes with a program keytab-lilo.pl that reads 
50 those tables and generates a table suitable for use by the map installer. 
51 keytab-lilo.pl invokes the program loadkeys to print the tables in a format 
52 that 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
57 keytab-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
78 keytab-lilo.pl writes the resulting translation table as a binary string to 
79 standard output. Such tables can be stored anywhere with any name, but the 
80 suggested naming convention is /boot/<kbd>.ktl ("Keyboard Table for Lilo"), 
81 where <kbd> is the name of the keyboard layout.
82
83 Example:
84
85 keytab-lilo.pl de >/boot/de.ktl