Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
share|improve this question
1  
xmodmap should not be necessary here. What does xev report when you press Mod4? –  Marco Jan 8 '13 at 23:35
add comment

1 Answer

up vote 1 down vote accepted

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
share|improve this answer
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.