Re: altwin:left_meta_win - super and meta on same key - how to fix
Lionel Élie Mamane <[email protected]> Thu, 21 May 2026 12:20:38 +0200
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
On Thu, May 21, 2026 at 12:08:13PM +0200, Lionel Ãlie Mamane wrote:
> My /etc/default/keyboard contains
> XKBMODEL="microsoft4000"
> XKBLAYOUT="us"
> XKBVARIANT="euro"
> XKBOPTIONS="altwin:left_meta_win,compose:menu"
> BACKSPACE="guess"
> Emacs has started to treat the left Microsoft Windows logo key
> as meta _and_ super at the same time, so that any binding in emacs
> that uses Meta is unusable, because emacs will say I pressed M-s-FOO
> when I pressed left Microsoft Windows logo key + FOO, which used to be
> just M-FOO.
Forgot to add:
When I press and depress the left Microsoft Windows logo key with xev
having focus, the events are:
KeyPress event, serial 37, synthetic NO, window 0x5c00001,
root 0x3cb, subw 0x0, time 60567700, (116,80), root:(1826,1536),
state 0x10, keycode 133 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x5c00001,
root 0x3cb, subw 0x0, time 60567892, (116,80), root:(1826,1536),
state 0x50, keycode 133 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
When I press left Microsoft Windows logo key + d with xev having
focus, the events are:
KeyPress event, serial 37, synthetic NO, window 0x5c00001,
root 0x3cb, subw 0x0, time 60643492, (89,77), root:(1786,1513),
state 0x10, keycode 133 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x5c00001,
root 0x3cb, subw 0x0, time 60645396, (89,77), root:(1786,1513),
state 0x50, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XmbLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x5c00001,
root 0x3cb, subw 0x0, time 60645580, (89,77), root:(1786,1513),
state 0x50, keycode 40 (keysym 0x64, d), same_screen YES,
XLookupString gives 1 bytes: (64) "d"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x5c00001,
root 0x3cb, subw 0x0, time 60645756, (89,77), root:(1786,1513),
state 0x50, keycode 133 (keysym 0xffe7, Meta_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
showing that state bit 0x40 gets set on the "d" press.
"xmodmodmap" output:
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_L (0xcc)
mod2 Num_Lock (0x4d)
mod3 ISO_Level5_Shift (0xcb)
mod4 Meta_L (0x85), Super_R (0x86), Meta_L (0xcd), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c)
I tried "xmodmap -e 'remove mod4 = Super_R Super_L Hyper_L'" to get
mod4 Meta_L (0x85), Meta_L (0xcd)
+ start a new emacs, but it did not change anything.