XKBCOMP(1)
xkbcomp(1) ๐ โจ
okay so this is the xkbcomp(1) page from X Version 11, and it's literally the manual for the XKB keymap compiler. group-chat summary: it turns an XKB keymap description into one of several output formats, and it's highkey iconic for making compiled keymap files. bestie, let's get into it. ๐ซถ
๐ NAME ๐
xkbcomp โ compile XKB keyboard description. that's the name, that's the job, periodt. โจ
๐ฆ SYNOPSIS ๐ฆ
xkbcomp [option] source [destination]
๐ธ DESCRIPTION ๐ธ
The xkbcomp keymap compiler converts a description of an XKB keymap into one of several output formats. The most common use for xkbcomp is to create a compiled keymap file (.xkm extension) which can be read directly by XKB-capable X servers or utilities. The keymap compiler can also produce C header files or XKB source files. The C header files produced by xkbcomp can be included by X servers or utilities that need a built-in default keymap. The XKB source files produced by xkbcomp are fully resolved and can be used to verify that the files which typically make up an XKB keymap are merged correctly or to create a single file which contains a complete description of the keymap. ๐ฆ
The source may specify an X display, or an .xkb or .xkm file; unless explicitly specified, the format of destination depends on the format of the source. Compiling a .xkb (keymap source) file generates a .xkm (compiled keymap file) by default. If the source is a .xkm file or an X display, xkbcomp generates a keymap source file by default.
If the destination is an X display, the keymap for the display is updated with the compiled keymap.
The name of the destination is usually computed from the name of the source, with the extension replaced as appropriate. When compiling a single map from a file which contains several maps, xkbcomp constructs the destination file name by appending an appropriate extension to the name of the map to be used.
That's the whole lore. no cap. โจ
๐ฅ OPTIONS ๐ฅ
-aโ Show all keyboard information, reporting implicit or derived information as a comment. Only affects.xkbformat output.-Cโ Produce a C header file as output (.hextension).-dfltsโ Compute defaults for any missing components, such as key names.-em1msg โ Print msg before printing first error message.-empmsg โ Print msg at the start of each message line.-emlmsg โ If there were any errors, print msg before exiting.-help,-?โ Show available options.-Idirโ Specifies top-level directories to be searched for files included by the keymap description. After all directories specified by-Ioptions have been searched, the current directory and finally, the default xkb directory/usr/share/X11/xkbwill be searched. To prevent the current and default directories from being searched, use the-Ioption alone (i.e. without a directory), before any-Ioptions that specify the directories you do want searched.-ideviceid โ If source or destination is a valid X display, load the keymap from/into the device with the specified ID (not name).-lโ List maps that specify the map pattern in any files listed on the command line (not implemented yet).-mname โ Specifies a map to be compiled from an file with multiple entries.-mergeโ Merge the compiled information with the map from the server (not implemented yet).-oname โ Specifies a name for the generated output file. The default is the name of the source file with an appropriate extension for the output format.-optparts โ Specifies a list of optional parts. Compilation errors in any optional parts are not fatal. Parts may consist of any combination of the lettersc,g,k,s, andt, which specify the compatibility map, geometry, keycodes, symbols and types, respectively.-Rdirโ Specifies the root directory for relative path names.-synchโ Force synchronization for X requests.-versionโ Print version number.-wlvl โ Controls the reporting of warnings during compilation. A warning level of0disables all warnings; a warning level of10enables them all.-xkbโ Generate a source description of the keyboard as output (.xkbextension).-xkmโ Generate a compiled keymap file as output (.xkmextension).
tiny vibe check:-land-mergeare literally marked โnot implemented yetโ in the original, so don't come for me โ that's the lore. ๐
๐ SEE ALSO ๐
go check these besties too: setxkbmap(1), X(7), xkeyboard-config(7). ๐
๐ AUTHOR ๐
Erik Fortune, Silicon Graphics โ author credit, iconic, no notes. โจ
๐ cute sign-off: this page is from xkbcomp 1.5.0, dated 2025-03-31. bye bestie, go compile something slay! ๐๐
๐ฆ where this page comes from
- alpine 3.22: xkbcomp-doc 1.5.0-r0 ยท MIT
- alpine 3.23: xkbcomp-doc 1.5.0-r0 ยท MIT
- alpine 3.24: xkbcomp-doc 1.5.0-r0 ยท MIT
- arch rolling: xorg-xkbcomp 1.5.0-1 ยท LicenseRef-xkbcomp
- fedora 43: xkbcomp 1.5.0-1.fc43 ยท MIT-open-group AND HPND-DEC
- fedora 43: xkbcomp 1.5.0-1.fc43 ยท MIT-open-group AND HPND-DEC
- fedora 44: xkbcomp 1.5.0-2.fc44 ยท MIT-open-group AND HPND-DEC
- fedora 44: xkbcomp 1.5.0-2.fc44 ยท MIT-open-group AND HPND-DEC
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms