Re: altwin:left_meta_win - super and meta on same key - how to fix

Lionel Élie Mamane <[email protected]> Thu, 21 May 2026 12:42:31 +0200
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
On Thu, May 21, 2026 at 12:38:39PM +0200, Lionel Élie Mamane wrote:
> On Thu, May 21, 2026 at 12:20:39PM +0200, Lionel Élie Mamane wrote:
> > 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.
> > 
> > 
> > "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.
> 
> But this worked:
> 
> $ xmodmap -e 'remove mod4 = Meta_L'
> $ xmodmap -e 'add mod1 = Meta_L'
> 
> Is this an xkb bug then? Should I file it there?

this gives

mod1        Alt_L (0x40),  Meta_L (0x85),  Alt_L (0xcc),  Meta_L (0xcd)
mod4        Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)

and emacs wrongly treats the Alt_L key as Meta; I tried
$ xmodmap -e 'remove mod1 = Alt_L'
which gives
mod1        Meta_L (0x85),  Meta_L (0xcd)
mod4        Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)

but emacs still wrongly treats the Alt_L key as Meta.