# Install xkbcomp with Homebrew, apk, dnf, MacPorts, Nix, zypper

XKB keyboard description compiler. Version 1.5.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:xkbcomp
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install xkbcomp
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xkbcomp
```

  Evidence: MacPorts ports tree: x11/xkbcomp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xkbcomp
```

  Evidence: Alpine Linux edge package indexes: xkbcomp from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install xkbcomp
```

  Evidence: Fedora Rawhide package metadata: xkbcomp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xkbcomp
```

  Evidence: nixpkgs package indexes: pkgs/by-name/xk/xkbcomp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install xkbcomp
```

  Evidence: openSUSE Tumbleweed package metadata: xkbcomp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:xkbcomp
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/xkbcomp>
- **Version:** 1.5.0
- **Source summary:** XKB keyboard description compiler
- **Homepage:** <https://www.x.org>
- **Repository:** <https://gitlab.freedesktop.org/xorg/app/xkbcomp>
- **Upstream docs:** <https://www.x.org/archive/X11R7.5/doc/man/man1/xkbcomp.1.html>
- **License:** HPND AND MIT-open-group
- **Source archive:** <https://www.x.org/releases/individual/app/xkbcomp-1.5.0.tar.xz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- xkbcomp (cli)
- xkbcomp (alias)

## Dependencies

- libx11
- libxkbfile

## Build dependencies

- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.5.0
- Local data: ok
- Upstream repository: https://www.x.org
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

xkbcomp is the X Keyboard Extension keymap compiler. It turns human-readable XKB keyboard descriptions into compiled keymaps for X servers and utilities, and can also reverse a running display or compiled map back into resolved XKB source.

### Project history

The manual page identifies xkbcomp as a compiler for XKB keyboard descriptions and carries 1994 copyright lines for Silicon Graphics Computer Systems and the X Consortium, with Erik Fortune of Silicon Graphics listed as author. That places the tool in the original XKB work that extended X11 keyboard handling beyond the older core protocol.

As X11 moved through XFree86 and X.Org, xkbcomp remained the low-level compiler behind keyboard layout composition. The X.Org XKB page now points users toward xkeyboard-config for the maintained data files, while the xkbcomp source is maintained as an X.Org application project on freedesktop.org.

### Adoption history

xkbcomp was adopted because XKB itself became the standard keyboard model for X11 systems. Desktop environments and users usually interact with higher-level tools such as setxkbmap or desktop settings, but xkbcomp sits underneath them as the program that verifies, resolves, compiles, dumps, or uploads the actual keymap.

The tool also became a favorite diagnostic and customization utility for keyboard-layout specialists. Documentation and community examples commonly use `xkbcomp :0 -` to inspect the active keymap or `xkbcomp file.xkb $DISPLAY` to load a custom map into a running X server.

### How it is used

Common package usage is compiling `.xkb` source into `.xkm` files, generating resolved XKB source from a display or compiled map, updating the keymap for a running X display, and producing C headers for servers or utilities that need built-in default keymaps.

For layout authors, xkbcomp is the last mile after editing keycodes, types, compat, symbols, and geometry files. It checks that those pieces merge into a complete keymap and reports warnings at selectable verbosity levels.

### Why package nerds care

xkbcomp is classic Unix desktop substrate: rarely glamorous, but essential when packaging X servers, keyboard data, desktop sessions, remote desktops, or custom layouts. It is also a good example of a compiler whose input language is configuration rather than application code.

For package maintainers, its significance comes from being split from the keyboard-layout data it consumes. xkeyboard-config supplies the evolving layout corpus; xkbcomp supplies the compiler that XKB-capable systems rely on to consume that corpus.

### Timeline

- 1994: The xkbcomp manual page records Silicon Graphics/X Consortium copyright and Erik Fortune as author.
- 1996: The original XKB protocol and library specifications were published for X11R6-era XKB.
- 2002: XKB enhancement documentation described xkbcomp as the ordinary compiler used to prepare compiled keyboard configuration for the X server.
- 2004: XFree86 4.3 and X11R6.7-era documentation described multi-layout XKB configuration handled through the same compiled keymap model.
- 2010s-2020s: X.Org keeps xkbcomp as a separate application while XKB data files are maintained by xkeyboard-config.

### Related projects

- xkeyboard-config supplies the keyboard models, layouts, variants, and options that xkbcomp compiles. setxkbmap selects XKB layouts at a higher level. libxkbcommon reuses XKB concepts outside the X server world, especially for Wayland compositors.

### Sources

- <https://cgit.freedesktop.org/xorg/app/xkbcomp/tree/README.enhancing?id=8eb2e1fcd08a05f296a31dbadde1ec3cc84d8e28>
- <https://www.x.org/XKB/>
- <https://xkbcommon.org/doc/current/introduction-to-xkb.html>
- <https://xkbcommon.org/doc/current/user-configuration.html>
- <https://xorg.freedesktop.org/archive/X11R7.5/doc/man/man1/xkbcomp.1.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xkbcomp
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - xkbcomp: normalized package name match | nixpkgs package indexes: pkgs/by-name/xk/xkbcomp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - xkbcomp - 1.5.0-r0: normalized package name match | Alpine Linux edge package indexes: xkbcomp from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | XKBD keymap compiler | https://xorg.freedesktop.org
- apk - xkbcomp-dev - 1.5.0-r0: normalized package name match | Alpine Linux edge package indexes: xkbcomp-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | XKBD keymap compiler (development files) | https://xorg.freedesktop.org
- apk - xkbcomp-doc - 1.5.0-r0: normalized package name match | Alpine Linux edge package indexes: xkbcomp-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | XKBD keymap compiler (documentation) | https://xorg.freedesktop.org
- dnf - xkbcomp - 1.5.0-2.fc44: normalized package name match | Fedora Rawhide package metadata: xkbcomp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | XKB keymap compiler | https://www.x.org
- dnf - xkbcomp-devel - 1.5.0-2.fc44: normalized package name match | Fedora Rawhide package metadata: xkbcomp-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | XKB keymap compiler development package | https://www.x.org
- zypper - xkbcomp - 1.5.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: xkbcomp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Utility to compile XKB keyboard description | https://xorg.freedesktop.org/
- zypper - xkbcomp-devel - 1.5.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: xkbcomp-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Utility to compile XKB keyboard description -- Development Files | https://xorg.freedesktop.org/
- MacPorts - xkbcomp: normalized package name match | MacPorts ports tree: x11/xkbcomp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [xorg-server](https://www.automicvault.com/pkg/brew/xorg-server/) - Popular package that depends on this formula.
- [libxcvt](https://www.automicvault.com/pkg/brew/libxcvt/) - Shares the same upstream homepage.
- [libxkbcommon](https://www.automicvault.com/pkg/brew/libxkbcommon/) - Shares av.db curated category or tags: cli, keyboard, system, x11, xkb.
- [xmodmap](https://www.automicvault.com/pkg/brew/xmodmap/) - Shares av.db curated category or tags: cli, keyboard, system, x11, xorg.
- [libxpm](https://www.automicvault.com/pkg/brew/libxpm/) - Shares av.db curated category or tags: cli, system, x11, xorg.
- [mkfontscale](https://www.automicvault.com/pkg/brew/mkfontscale/) - Shares av.db curated category or tags: cli, system, x11, xorg.
- [xauth](https://www.automicvault.com/pkg/brew/xauth/) - Shares av.db curated category or tags: cli, system, x11, xorg.
- [xcursorgen](https://www.automicvault.com/pkg/brew/xcursorgen/) - Shares av.db curated category or tags: cli, system, x11, xorg.
- [xdpyinfo](https://www.automicvault.com/pkg/brew/xdpyinfo/) - Shares av.db curated category or tags: cli, system, x11, xorg.

## Combined YAML source

View the package source record on GitHub. [combined/xkbcomp.yml](https://github.com/automic-vault/db/blob/main/combined/xkbcomp.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
