4

I'm trying to set up awesome. When I start it the Mod4 (Windows) key is not working. So I tried to extent my .Xmodmap

clear Mod4
add Mod4 = Multi_key

When I run xmodmap .Xmodmap the Mod4 works, but there is "some" left. If there is an open terminal and I press Mod4+Ret to open a new terminal the computer either beeps or on the old terminal there is some dead key (pressing a results in å). I tried several clear rules in the .Xmodmap, but neither worked. How can I best enable the Mod4 in awesome?

xev reports:

KeyPress event, serial 33, synthetic NO, window 0x1200001,
    root 0x13c, subw 0x0, time 36080759, (-557,202), root:(187,223),
    state 0x0, keycode 133 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 33, synthetic NO, window 0x1200001,
    root 0x13c, subw 0x0, time 36080859, (-557,202), root:(187,223),
    state 0x0, keycode 133 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
1
  • 1
    xmodmap should not be necessary here. What does xev report when you press Mod4?
    – Marco
    Jan 8 '13 at 23:35
2

The awesome FAQ provides an answer:

Why does Mod4 "swallow" succeeding key presses?
On some systems xkb by default maps the left windows key to "Multi_key" (at least in us and de layouts). Multi_key is an xkb feature which may be used to access uncommon symbols by pressing Multi_key and then (consecutively) two "normal" keys. The solution is to remap your windows key to mod4 and remove the Multi_key mapping. This can be done by including "altwin(left_meta_win)" in the xkb keyboard description xkb_symbols line.

   #!/bin/bash
   xkbcomp - $DISPLAY<<EOF
   xkb_keymap {
   xkb_keycodes  { include "evdev+aliases(qwertz)"};
   xkb_types     { include "complete"};
   xkb_compat    { include "complete"};
   xkb_symbols   { include "pc+de(nodeadkeys)+inet(evdev)+group(alt_shift_toggle)+level3(ralt_switch)+altwin(left_meta_win)+capslock(escape)"    };
   xkb_geometry  { include "pc(pc104)"};
   };
   EOF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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