Command-line tool
xmodmap
brew/xmodmap
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Modify keymaps and pointer button mappings in X
At a glance
- Type
- Command-line tool
- Install on
- macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
macOS
brew install xmodmap
Linux
brew install xmodmap
Swap `<LeftClick>` and `<RightClick>` on the pointer
xmodmap -e 'pointer = 3 2 1'
Reassign a key on the keyboard to another key
xmodmap -e 'keycode keycode = keyname'
Disable a key on the keyboard
xmodmap -e 'keycode keycode ='
Related command-line tools
- libxkbcommon
Keyboard handling library - qemu
Generic machine emulator and virtualizer requirescmd emulator 仿真 virtual-machine 模拟器 vm virtualmachine virtualization… - tiny-remapper
Tiny, efficient tool for remapping JAR files using "Tiny"-format mappings - spotify_player
Command driven spotify player rust cli tui player music-player music spotify terminal-based vim spotify-tui - chezmoi_modify_manager
Chezmoi addon to patch ini files with mixed settings and state (experimental rust branch) - patchelf
Modify dynamic ELF executables - BetterZip
Utility to create and modify archives - msklc
Create or modify keyboard layouts
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents