macOS
brew install xmodmaplocal Homebrew formula metadata
sudo port install xmodmapMacPorts ports tree · x11/xmodmap/Portfile · 来源: api.github.com
安装
brew install xmodmaplocal Homebrew formula metadata
sudo port install xmodmapMacPorts ports tree · x11/xmodmap/Portfile · 来源: api.github.com
sudo apk add xmodmapAlpine Linux edge package indexes · xmodmap · 来源: dl-cdn.alpinelinux.org
sudo dnf install xmodmapFedora Rawhide package metadata · xmodmap · 来源: dl.fedoraproject.org
nix profile install nixpkgs#xmodmapnixpkgs package indexes · pkgs/by-name/xm/xmodmap/package.nix · 来源: api.github.com
sudo zypper install xmodmapopenSUSE Tumbleweed package metadata · xmodmap · 来源: download.opensuse.org
概览
Modify keymaps and pointer button mappings in X
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
xmodmap | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://gitlab.freedesktop.org/xorg/app/xmodmap
安装元数据
| 软件包键 | brew:xmodmap |
|---|---|
| 版本 | 1.0.12 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/xmodmap |
| 主页 | https://gitlab.freedesktop.org/xorg/app/xmodmap |
| 仓库 | https://gitlab.freedesktop.org/xorg/app/xmodmap |
| 上游文档 | https://gitlab.freedesktop.org/xorg/app/xmodmap |
| 许可证 | MIT-open-group |
| 源码归档 | https://www.x.org/releases/individual/app/xmodmap-1.0.12.tar.xz |
| 最后更新 | 2026-07-19T21:12:53Z |
| Pulse | updated |
| 依赖 | libx11 |
| 构建依赖 | pkgconf, xorgproto |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
xmodmap
nix profile install nixpkgs#xmodmapxmodmap 1.0.11-r1
Utility for modifying keymaps and pointer button mappings in X
sudo apk add xmodmapxmodmap-doc 1.0.11-r1
Utility for modifying keymaps and pointer button mappings in X (documentation)
sudo apk add xmodmap-docxmodmap 1.0.11-10.fc44
Edit and display the X11 core keyboard map
sudo dnf install xmodmapxmodmap 1.0.11-1.11
Utility to modify keymaps and pointer button mappings in X
sudo zypper install xmodmapxmodmap
sudo port install xmodmap来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.