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.

Alt-Tab normally lets you cycle through open windows and changes focus to the window that is active when you release Alt. This is all fine, but I want to use another key for Alt_L so I've specified keycode 102 = Alt_L Meta_L Alt_L Meta_L in my .xmodmap. This works in general, but it doesn't work as expected for switching windows. The difference from the normal Alt-Tab is that a window is that even if I release Alt (and Tab), a window is not chosen. If I press enter or the standard Alt at that stage, the window is chosen though.

The following is the xev output for the two different keys.

For old alt key:

KeyPress event, serial 41, synthetic NO, window 0x4a00001,
    root 0xd9, subw 0x0, time 9580170, (-380,284), root:(245,336),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x4a00001,
    root 0xd9, subw 0x0, time 9580241, (-380,284), root:(245,336),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

For new alt key:

KeyPress event, serial 41, synthetic NO, window 0x4a00001,
    root 0xd9, subw 0x0, time 9576192, (-380,284), root:(245,336),
    state 0x0, keycode 102 (keysym 0xffe9, Alt_L), same_screen YES,
    XKeysymToKeycode returns keycode: 64
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x4a00001,
    root 0xd9, subw 0x0, time 9576302, (-380,284), root:(245,336),
    state 0x8, keycode 102 (keysym 0xffe9, Alt_L), same_screen YES,
    XKeysymToKeycode returns keycode: 64
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

So how can this behaviour be changed so that I can use my new alt key in the exact same way as the old one when switching between windows with Alt-Tab?

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.