Directives/kbdmap

From Syslinux Wiki
Revision as of 23:12, 17 May 2019 by Ady (talk | contribs) (Add Category "Examples". Wiki formatting.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

KBDMAP is a global directive that allows to change the keyboard map for Syslinux.

Similarly, the kbdmap.c32 module selects a keyboard map to be used in Syslinux, with the difference that it is not a global directive, hence allowing alternative keyboard layouts to be specified in the same configuration file.

Selecting an adequate keyboard layout might help in typing or editing boot commands with special characters (e.g. "=").

The KBDMAP directive and the kbdmap.c32 module use a "Keyboard Table for LILO" file as argument. Such "ktl" files can be generated by the keytab-lilo.pl script, included in Syslinux.

keytab-lilo.pl is a Perl script invoking the "loadkeys" program. On some systems, only the "root" user can execute loadkeys; it is then necessary to run keytab-lilo.pl as root too.

A generic example of a keytab-lilo command:

 # keytab-lilo.pl /path/to/us.kmap.gz /path/to/dvorak.kmap.gz > /path/to/dvorak.ktl
  • Although "kmap" is being used in the above example, the keyboard mapping files in different OSes might have a different file name extension (e.g. "map").
  • The keyboard-mapping files can optionally be gzipped (as in the above example), or they can be found uncompressed; either format can be used by keytab-lilo.pl.
  • The "us" keyboard map file represents the default keyboard layout as recognized by the BIOS; this is independent of the keyboard layout being used by the OS.

The resulting "ktl" file can then be used as argument by either, the KBDMAP directive or the kbdmap.c32 module.

The selection (or rather, the loading) of a keyboard table for Syslinux is independent of the keyboard layout to be used once the kernel boots.

The keytab-lilo.pl script can alternatively generate additional keyboard-mapping files.

See also