grub-kbdcomp
Compile GRUB keyboard maps
SYNOPSIS
grub-kbdcomp [OPTION...] [INPUT [OUTPUT]]
PARAMETERS
-h, --help
print this message and exit
-v, --version
print version information and exit
DESCRIPTION
grub-kbdcomp is a utility from the GRUB 2 bootloader package that compiles plain-text keyboard layout descriptions into compact binary files usable by GRUB's input subsystem. This enables custom key mappings during boot, supporting non-US layouts, dead keys, and modifiers for international users.
The tool processes files in the kbdmap(5) format, which define scancode-to-keycode translations under various shift states (normal, shift, alt, etc.). Output files, typically with .gkb extension, are loaded via GRUB commands like loadkeys in grub.cfg(5) or embedded in core images.
Commonly used during GRUB installation or updates to generate layouts from /usr/share/grub/keylayouts/, such as for QWERTZ or AZERTY. It reads from stdin or a file and writes to stdout or specified output, making it script-friendly for custom boot environments.
Without custom layouts, GRUB defaults to US QWERTY, limiting usability on diverse hardware.
DEFAULT BEHAVIOR
Reads layout from stdin and writes binary to stdout if no files specified.
Example: grub-kbdcomp < de.map > de.gkb
LAYOUT LOCATION
Source layouts in /usr/share/grub/keylayouts/i386/ or amd64/; compile for target architecture.
HISTORY
Introduced in GRUB 2.04 (2019) to modernize keyboard compilation, replacing legacy grub-mkkeymap. Enhanced in later versions for better Unicode and input support.
SEE ALSO
kbdmap(5), grub-mkimage(1), grub.cfg(5)


