HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

xmodmap — Utility for modifying keymaps and pointer button mappings in X. More information: <https://manned.or

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandandclimodifyingxmodmapkeymapsforutility
linux

Problem

How to use the xmodmap command: Utility for modifying keymaps and pointer button mappings in X. More information: <https://manned.org/xmodmap>.

Solution

xmodmap — Utility for modifying keymaps and pointer button mappings in X. More information: <https://manned.org/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}} ='


Execute all xmodmap expressions in the specified file:
xmodmap {{path/to/file}}

Code Snippets

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}} ='

Execute all xmodmap expressions in the specified file

xmodmap {{path/to/file}}

Context

tldr-pages: linux/xmodmap

Revisions (0)

No revisions yet.