System Grab Bag

View all TLDR pages from Linux (or from all pages)

xmodmap

Utility for modifying keymaps and pointer button mappings in X. More information: https://manned.org/xmodmap.
  • Swap left-click and right-click 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}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.