Difference between revisions of "Directives/kbdmap"

From Syslinux Wiki
Jump to: navigation, search
(New wiki page for the KBDMAP directive, with comments about the kbdmap.c32 module and about the keytab-lilo Perl script.)
 
m (Add Category "Examples". Wiki formatting.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Directives]]
 
[[Category:Directives]]
 
+
[[Category:Examples]]
 
[[Config#KBDMAP|KBDMAP]] is a global directive that allows to change  
 
[[Config#KBDMAP|KBDMAP]] is a global directive that allows to change  
 
the keyboard map for Syslinux.
 
the keyboard map for Syslinux.
  
Similarly, the [[kbdmap.c32]] module selects a keyboard map to be used in 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  
 
with the difference that it is not a global directive, hence allowing  
 
alternative keyboard layouts to be specified in the same configuration file.
 
alternative keyboard layouts to be specified in the same configuration file.
Line 16: Line 17:
 
<tt>{{nowrap|keytab-lilo.pl}}</tt> script, included in Syslinux.
 
<tt>{{nowrap|keytab-lilo.pl}}</tt> script, included in Syslinux.
  
<tt>{{nowrap|keytab-lilo.pl}}</tt> is a Perl script invoking the "loadkeys" program.
+
<tt>{{nowrap|keytab-lilo.pl}}</tt> is a Perl script  
 +
invoking the "loadkeys" program.
 +
On some systems, only the "root" user can execute loadkeys;
 +
it is then necessary to run <tt>{{nowrap|keytab-lilo.pl}}</tt> as root too.
  
 
A generic example of a {{nowrap|keytab-lilo}} command:
 
A generic example of a {{nowrap|keytab-lilo}} command:
 
+
{|
 +
|
 
<pre>
 
<pre>
 
  # keytab-lilo.pl /path/to/us.kmap.gz /path/to/dvorak.kmap.gz > /path/to/dvorak.ktl
 
  # keytab-lilo.pl /path/to/us.kmap.gz /path/to/dvorak.kmap.gz > /path/to/dvorak.ktl
 
</pre>
 
</pre>
 +
|}
  
 
* Although "''kmap''" is being used in the above example,  <!--  
 
* Although "''kmap''" is being used in the above example,  <!--  
Line 49: Line 55:
 
* [[Config#KBDMAP]]
 
* [[Config#KBDMAP]]
 
* [[kbdmap.c32]]
 
* [[kbdmap.c32]]
* [[SYSLINUX#KBDMAP_keymap]]
+
<!-- * [[SYSLINUX#KBDMAP_keymap]] -->
* The KBDMAP entry in [[doc/syslinux]].txt.
+
<!-- * The KBDMAP entry in [[doc/syslinux]].txt. -->
 
* [[Doc/keytab-lilo]]
 
* [[Doc/keytab-lilo]]
 
* [[Cli]]
 
* [[Cli]]

Latest revision as of 23:12, 17 May 2019

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