Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After an hour or two of manpage and Google searching and finding no solution or good resources, I've come for help!

I have set my Caps Lock key to Ctrl using setxkbmap -option ctrl:nocaps - this works perfectly fine.

However, since I use [awesome][1], and an IBM model M which lacks the meta key, I need my left alt key to replace the windows key. Using xkeycaps I was able to get this to work, except it killed my arrow keys and End. Problematic.

Unfortunately, documentation on setxkbmap options are sparse. and I can't find the proper option to use.

Thanks for any links/solutions.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

The list of predefined remapping options is in /usr/share/X11/xkb/rules/evdev.lst. In this case, you probably want one of

jinx:792 Z$ grep alt /usr/share/X11/xkb/rules/evdev.lst | grep win
  altwin               Alt/Win key behavior
  altwin:menu          Add the standard behavior to Menu key
  altwin:meta_alt      Alt and Meta are on Alt keys
  altwin:ctrl_win      Control is mapped to Win keys (and the usual Ctrl keys)
  altwin:ctrl_alt_win  Control is mapped to Alt keys, Alt is mapped to Win keys
  altwin:meta_win      Meta is mapped to Win keys
  altwin:left_meta_win Meta is mapped to Left Win
  altwin:hyper_win     Hyper is mapped to Win-keys
  altwin:alt_super_win Alt is mapped to Right Win, Super to Menu
  altwin:swap_lalt_lwin Left Alt is swapped with Left Win

The Windows key is generally mapped to X11's Super modifier, and the Menu key is sometimes mapped to its Hyper modifier.

share|improve this answer
    
perfect! setxkbmap -option altwin:swap_lalt_lwin was exactly what I was looking for! Thanks! –  Wayne Werner Mar 10 '11 at 1:24
1  
Is there a way to swap the right alt and win instead of the left? –  Kerrick Dec 14 '11 at 21:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.