grub-kbdcomp
Compile GRUB keyboard maps
SYNOPSIS
grub-kbdcomp [OPTIONS] KEYMAP...
grub-kbdcomp --output=FILE KEYMAP...
PARAMETERS
-o, --output=FILE
Specifies the output FILE where the compiled keyboard layout will be written. If this option is not provided, grub-kbdcomp will write the output to standard output (stdout).
KEYMAP...
One or more input files containing the keyboard layout definition. These text files describe the key bindings and assignments for the desired keyboard layout. The format of these files must conform to GRUB's specifications.
DESCRIPTION
grub-kbdcomp is a utility program part of the GRUB (Grand Unified Bootloader) suite. Its primary function is to compile keyboard layout definition files into a format that GRUB can understand and utilize. This compiled layout is then used by GRUB's kbdcomp module, enabling proper keyboard functionality, especially for non-US keyboard layouts, within the GRUB environment before the operating system has loaded. This is crucial for interacting with the GRUB prompt, entering commands, or selecting boot options using a keyboard layout different from the standard QWERTY (US). The input to grub-kbdcomp is a text file describing the key bindings and assignments, and the output is a binary file representing the compiled keyboard map. This compiled file can then be included in a GRUB image or installed separately to provide the necessary keyboard support during the boot process.
CAVEATS
The keyboard layout definitions must be in a specific text format understood by GRUB, which may not be identical to keyboard layout formats used by the operating system (e.g., XKB).
The compiled keyboard layout is solely for the GRUB environment and does not affect the keyboard layout used by the operating system after it boots.
Familiarity with GRUB's architecture and keyboard layout file syntax is necessary for effective use of this command.
PURPOSE OF COMPILED LAYOUTS
The compiled keyboard layouts produced by grub-kbdcomp are crucial for providing input capabilities within the GRUB command-line interface or menu navigation. This is particularly vital for users whose physical keyboards do not conform to the standard US QWERTY layout. Without such a compiled layout, entering commands or navigating menus with certain characters (e.g., national characters, symbols specific to a locale) would be impossible or highly inconvenient in the pre-OS boot environment.
INPUT FILE FORMAT
The input KEYMAP files are plain text files that define the mapping between key codes and characters or actions. These files typically follow a specific syntax defined by GRUB, allowing for assignments of various keys, including modifiers (Shift, AltGr), and mapping them to Unicode characters or GRUB-specific actions. Users can create custom keymaps or adapt existing ones to suit their needs.
HISTORY
The grub-kbdcomp utility is an integral part of the GRUB project, specifically within the GRUB 2 series, which succeeded GRUB Legacy. GRUB 2 was developed with a more modular and flexible design, introducing the concept of loadable modules for various functionalities, including keyboard support (kbdcomp module). grub-kbdcomp was created to compile keyboard layouts specifically for this modular GRUB 2 environment. Its development paralleled the expansion of GRUB's capabilities to support a wider range of hardware and internationalization needs, ensuring that users with non-US keyboard layouts could interact effectively with the bootloader's command line and menus.
SEE ALSO
grub-mkfont(1), grub-mkimage(1), grub-mknetdir(1), grub-install(8)