Friday, May 28, 2010

[QnA] Use xmodmap to set modifier keys

In the previous article, I described how to change the modifier key for wmii from Mod1(Alt) to Mod4(Windows key). That's no problem for my PCs, but not okay for my laptop, an IBM X31. The laptop has NO Windows key, so I cannot just modify the wmiirc file to make things run.

Fortunately, Google helped me to find the solution again. There is a command called xmodmap to modify keymaps.

The steps are:
  • Create a file, for example, ~/.Xmodmap
  • Paste the following lines in the created file

  • ! No Caps Lock
    clear lock
    ! Caps Lock as Win key
    add mod4 = Caps_Lock

  • Run xmodmap to enable the settings

  • $ xmodmap ~/.Xmodmap

---
Reference:
---
Edit (2010/06/01):

After changing Caps Lock key to Windows key, wmii cannot move windows to desktop#2.

No comments:

Post a Comment