create new tag
, view all tags
Making up my own definition, %SECTION{summary}%xmodmap seems to be two things:
  • the X map of keystrokes to keycodes
  • the X utility to inspect and modify that map


  • %DATE% —
This is a very preliminary page, created primarily to move stuff about xmodmap off the pages I'm now writing on creating Nedit key bindings via the Xresources translation table.



xmodmap commands

I suggest you play around with the display commands just to see some of what goes on. I haven't played with the -e (execute expression) option as I've had no need to, and I'm a little worried about messing up the existing assignments.

xmodmap -h:

Displays brief help

xmodmap or xmodmap -pm

Displays the modifier map (which, on my system, showed that Super_L and Super_R are mapped to mod4).

Aside: Somebody responded to my question (on a nedit mail list) about how mod4 gets converted to require Mod4 — apparently one application (maybe xmodmap) displays lowercase instead of the actual stored titlecase (Mod4). That does not totally resolve the problem in my mind, because to assign a <ctrl> key modifier, I need to use "Ctrl" in the translation table, yet xmodmap -pm displays "control"; similarly, "Alt" and "mod1" (on my Knoppix 3.2 system).

xmodmap -e expression

Execute an expression to do things like make key assignments — xmodmap -grammar displays help for (the syntax of) those expressions, here's one example:

xmodmap -e 'keycode 115 = Super_L'

which assigns Super_L to keycode 115 (or vice versa??)

xmodmap -pk

Display the keymap table (somewhat verbose in comparison to the -pke option)

xmodmap -pke

Display the keymap table as expressions (less verbose than the -pk option)

xmodmap -pp

Display the (mouse) pointer map


# Some xmodmap commands to make the Win key work as a modifier key in the Nedit X resources translation table

xmodmap -e 'keycode 115 = F13' xmodmap -e 'keycode 116 = F14'

xmodmap -e 'add Mod4 = F13' xmodmap -e 'add Mod4 = F14'


  • () RandyKramer - 17 Feb 2004
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Revision Comment

  • %DATE% —

Page Ratings

Topic revision: r1 - 2004-02-17 - RandyKramer
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look