Introduction to libxkbcommon

libxkbcommon is a keymap compiler and support library which processes a reduced subset of keymaps as defined by the XKB specification.

This package is known to build and work properly using an LFS 12.1 platform.

Package Information

libxkbcommon Dependencies


xkeyboard-config-2.41 (runtime)




Installation of libxkbcommon

Install libxkbcommon by running the following commands:

mkdir build &&
cd    build &&

meson setup ..            \
      --prefix=/usr       \
      --buildtype=release \
      -Denable-docs=false &&

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Denable-docs=false: This switch disables documentation generation. Remove it if Doxygen-1.10.0 is installed.

mv -v /usr/share/doc/libxkbcommon{,-1.6.0}: If you removed -Denable-docs=false, use this command to install the documentation in a versioned directory.


Installed Programs: xkbcli
Installed Libraries:,, and
Installed Directories: /usr/include/xkbcommon, /usr/libexec/xkbcommon, and /usr/share/doc/libxkbcommon-1.6.0

Short Descriptions


provides a debugger and compiler for XKB keymaps

contains the libxkbcommon API functions

contains the libxkbcommon X11 specific API functions

contains a list of available XKB models, layouts, and variants for a given ruleset