xkbcommon 1.14.0-beta2
Reference library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
Loading...
Searching...
No Matches
Building

xkbcommon requires:

  • a C compiler supporting C11
  • XKB registry (optional): libxml2
  • X11 features (optional): libxcb and libxcb-xkb
  • Wayland features (optional): wayland-client, wayland-protocols, wayland-scanner

xkbcommon is built with Meson:

meson setup build
meson compile -C build
meson test -C build # Run the tests.

To build for use with Wayland, you can disable X11 support while still using the X11 keyboard configuration resource files thusly:

meson setup build \
-Denable-x11=false \
-Dxkb-config-root=/usr/share/X11/xkb \
-Dx-locale-root=/usr/share/X11/locale
meson compile -C build
Complete list of user options
option(
'xkb-config-root',
type: 'string',
description: 'The XKB config root [default=xkeyboard-config install path]',
)
option(
'xkb-config-versioned-extensions-path',
type: 'string',
description: 'Lookup path for system-wide XKB versioned data extensions [default=xkeyboard-config install path + .d]',
)
option(
'xkb-config-unversioned-extensions-path',
type: 'string',
description: 'Lookup path for system-wide XKB unversioned data extensions [default=xkeyboard-config install path - version + .d]',
)
option(
'xkb-config-extra-path',
type: 'string',
description: 'Extra lookup path for system-wide XKB data [default=$sysconfdir/xkb]',
)
option(
'x-locale-root',
type: 'string',
description: 'The X locale root [default=$datadir/X11/locale]',
)
option(
'bash-completion-path',
type: 'string',
description: 'Directory for bash completion scripts',
)
option(
'zsh-completion-path',
type: 'string',
description: 'Directory for zsh completion scripts',
)
option(
'default-rules',
type: 'string',
value: 'evdev',
description: 'Default XKB ruleset',
)
option(
'default-model',
type: 'string',
value: 'pc105',
description: 'Default XKB model',
)
option(
'default-layout',
type: 'string',
value: 'us',
description: 'Default XKB layout',
)
option(
'default-variant',
type: 'string',
value: '',
description: 'Default XKB variant',
)
option(
'default-options',
type: 'string',
value: '',
description: 'Default XKB options',
)
option(
'enable-parser-auto-generation',
type: 'boolean',
value: true,
description:
'Generate parser files from `.y` grammar files (requires bison); ' +
'if false, use pregenerated files shipped in the source tree',
)
option(
'enable-tools',
type: 'boolean',
value: true,
description: 'Enable building tools',
)
option(
'enable-x11',
type: 'boolean',
value: true,
description: 'Enable building the xkbcommon-x11 library',
)
option(
'enable-docs',
type: 'boolean',
value: false,
description: 'Enable building the documentation',
)
option(
'enable-cool-uris',
type: 'boolean',
value: false,
description: 'Enable creating redirections to maintain stable documentation pages',
)
option(
'enable-wayland',
type: 'boolean',
value: true,
description: 'Enable support for Wayland utility programs (requires enable-tools)',
)
option(
'enable-xkbregistry',
type: 'boolean',
value: true,
description: 'Enable building libxkbregistry',
)
option(
'enable-bash-completion',
type: 'boolean',
value: true,
description: 'Enable installing bash completion scripts',
)
option(
'enable-zsh-completion',
type: 'boolean',
value: true,
description: 'Enable installing zsh completion scripts',
)