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

Modify keymaps and pointer button mappings in X. Version 1.0.11 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:xmodmap
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install xmodmap
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xmodmap
```

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

### Linux

- apk (92%):

```sh
sudo apk add xmodmap
```

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

- dnf (92%):

```sh
sudo dnf install xmodmap
```

  Evidence: Fedora Rawhide package metadata: xmodmap 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#xmodmap
```

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

- zypper (92%):

```sh
sudo zypper install xmodmap
```

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

## Package facts

- **Package key:** brew:xmodmap
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/xmodmap>
- **Version:** 1.0.11
- **Source summary:** Modify keymaps and pointer button mappings in X
- **Homepage:** <https://gitlab.freedesktop.org/xorg/app/xmodmap>
- **Repository:** <https://gitlab.freedesktop.org/xorg/app/xmodmap>
- **Upstream docs:** <https://gitlab.freedesktop.org/xorg/app/xmodmap>
- **License:** MIT-open-group
- **Source archive:** <https://www.x.org/releases/individual/app/xmodmap-1.0.11.tar.xz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- xmodmap (cli)
- xmodmap (alias)

## Dependencies

- libx11

## Build dependencies

- pkgconf
- xorgproto

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## Freshness

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

xmodmap is one of the old X11 session-shaping utilities: it edits and prints the keyboard modifier map, the keymap table used to translate keycodes into keysyms, and pointer button mappings. Its package-manager role is narrow but durable: install it when an X session needs per-user key remapping without changing a system keyboard layout.

### Project history

The X11R6.8.2 manual credits Jim Fulton of the MIT X Consortium, rewritten from an earlier version by David Rosenthal of Sun Microsystems, which places xmodmap squarely in the classic vendor-and-consortium X Window System toolset. The X.Org GitLab repository is the modern maintenance home for that small utility, describing it as a tool for modifying keymaps and pointer button mappings in X.

xmodmap persisted because X11 exposed keycodes, keysyms, modifier maps, and MappingNotify events as user-visible machinery. The utility is intentionally close to those primitives: it reads expressions such as keycode, keysym, add, remove, clear, and pointer assignments, parses them first, then applies the resulting map changes to the running X server.

### Adoption history

Historically, xmodmap became part of the personal Unix desktop toolkit. Its own manual says it is usually run from a user's session startup script, and the examples document common workstation-era irritations: swapping Caps Lock and Control, making Alt act as Meta, fixing Backspace/Delete behavior, adding less-than and greater-than bindings, and reversing pointer buttons for left-handed use.

Its adoption later became more situational as XKB, desktop-environment keyboard panels, libinput, Wayland compositors, and per-application shortcuts took over many layout tasks. Even so, package collections still carry xmodmap because remote X sessions, minimal window managers, old documentation, and quick one-line remaps still need the original X11-level tool.

### How it is used

Typical usage is either ad hoc, such as xmodmap -e "pointer = 3 2 1", or startup-driven through a file such as ~/.xmodmaprc. Users inspect the current state with -pm, -pk, -pke, or -pp, then feed expressions back to the server to change modifier keys, keysyms, keycodes, or pointer buttons.

The main practical caveat is also in the old manual: mapping changes generate MappingNotify events, and clients that ignore those events may not notice changes. That is why xmodmap remains best suited to simple X11 session customization rather than full modern keyboard-layout management.

### Why package nerds care

xmodmap is package archaeology that is still runnable. It is tiny, scriptable, X11-specific, and exposes the desktop stack at a level that newer settings panels hide. For package nerds, it is the difference between shipping an entire input-configuration layer and shipping one classic command that can still fix a weird keyboard in a minimal X session.

It also marks a useful boundary in platform history: when a package depends on xmodmap, it is probably assuming X11 semantics, not Wayland compositor settings or cross-platform shortcut APIs.

### Timeline

- X11 consortium era: xmodmap is authored by Jim Fulton of the MIT X Consortium, based on an earlier Sun Microsystems version by David Rosenthal.
- 1990s: X11R6-era documentation records xmodmap as a standard X utility for user startup scripts and key/pointer remapping.
- 2018-07-29: The freedesktop.org GitLab project for xorg/app/xmodmap is created as part of the modern X.Org source hosting layout.
- 2020s: xmodmap remains packaged mainly for X11 sessions, minimal desktops, remote X usage, and compatibility with old remapping recipes.

### Related projects

- xev is commonly used with xmodmap to discover keycodes and keysyms.
- XKB and setxkbmap cover broader X keyboard layout configuration that often supersedes xmodmap for full layouts.
- xinput, libinput, and compositor-specific settings cover much of the modern pointer/input space outside xmodmap's narrow X11 map-editing role.

### Sources

- <https://gitlab.freedesktop.org/xorg/app/xmodmap>
- <https://www.x.org/X11R6/>
- <https://xorg.freedesktop.org/archive/X11R6.8.2/doc/xmodmap.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:** xmodmap
- **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 - xmodmap: normalized package name match | nixpkgs package indexes: pkgs/by-name/xm/xmodmap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - xmodmap - 1.0.11-r1: normalized package name match | Alpine Linux edge package indexes: xmodmap from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Utility for modifying keymaps and pointer button mappings in X | https://xorg.freedesktop.org/
- apk - xmodmap-doc - 1.0.11-r1: normalized package name match | Alpine Linux edge package indexes: xmodmap-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Utility for modifying keymaps and pointer button mappings in X (documentation) | https://xorg.freedesktop.org/
- dnf - xmodmap - 1.0.11-10.fc44: normalized package name match | Fedora Rawhide package metadata: xmodmap from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Edit and display the X11 core keyboard map | https://www.x.org
- zypper - xmodmap - 1.0.11-1.11: normalized package name match | openSUSE Tumbleweed package metadata: xmodmap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Utility to modify keymaps and pointer button mappings in X | https://xorg.freedesktop.org/
- MacPorts - xmodmap: normalized package name match | MacPorts ports tree: x11/xmodmap/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.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Matched curated package taxonomy and local package facts.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [xinit](https://www.automicvault.com/pkg/brew/xinit/) - Popular package that depends on this formula.
- [libxkbcommon](https://www.automicvault.com/pkg/brew/libxkbcommon/) - Shares av.db curated category or tags: cli, input, keyboard, system, x11.
- [xkbcomp](https://www.automicvault.com/pkg/brew/xkbcomp/) - Shares av.db curated category or tags: cli, keyboard, system, x11, xorg.
- [kanata](https://www.automicvault.com/pkg/brew/kanata/) - Shares av.db curated category or tags: cli, input, keyboard, system.
- [kanata-tray](https://www.automicvault.com/pkg/brew/kanata-tray/) - Shares av.db curated category or tags: cli, input, keyboard, system.
- [libxcvt](https://www.automicvault.com/pkg/brew/libxcvt/) - Shares av.db curated category or tags: cli, 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.
- [xinput](https://www.automicvault.com/pkg/brew/xinput/) - Local package facts share a topical domain. Shared terms: cli, input, libx11, system, x11.
- [xcursorgen](https://www.automicvault.com/pkg/brew/xcursorgen/) - Local package facts share a topical domain. Shared terms: cli, libx11, system, x11, xorg.

## Combined YAML source

View the package source record on GitHub. [combined/xmodmap.yml](https://github.com/automic-vault/db/blob/main/combined/xmodmap.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
