# xmodmap を Homebrew, apk, dnf, MacPorts, Nix, zypper でインストール

xmodmap のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install xmodmap
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xmodmap
```

  証拠: 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
```

  証拠: 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
```

  証拠: Fedora Rawhide package metadata: xmodmap from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xmodmap
```

  証拠: 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
```

  証拠: openSUSE Tumbleweed package metadata: xmodmap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:xmodmap
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.0.12
- **ソース概要:** Modify keymaps and pointer button mappings in X
- **ホームページ:** <https://gitlab.freedesktop.org/xorg/app/xmodmap>
- **最終更新:** 2026-07-19T21:12:53Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- xmodmap (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.0.12
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

- 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.

### ソース

- <https://gitlab.freedesktop.org/xorg/app/xmodmap>
- <https://www.x.org/X11R6/>
- <https://xorg.freedesktop.org/archive/X11R6.8.2/doc/xmodmap.1.html>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- 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.12-4.fc45: normalized package name match | Fedora Rawhide package metadata: xmodmap from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Edit and display the X11 core keyboard map | https://www.x.org
- zypper - xmodmap - 1.0.12-1.2: normalized package name match | openSUSE Tumbleweed package metadata: xmodmap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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


## Combined YAML source

View the package source record on GitHub. [combined/xmodmap.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xmodmap.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
