Re: altwin:left_meta_win - super and meta on same key - how to fix
[email protected] Thu, 21 May 2026 13:14:29 -0400
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
Lionel Élie Mamane <[email protected]> writes: > 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? > There is a tool called Gnome Tweaks that you might find useful. https://packages.debian.org/bookworm/gnome-tweaks It does not provide the generality that ‘xmodmap’ does, but it can help with many common keyboard remappings and trades off the generality for more ease of use. (I used to use xmodmap to adjust my keyboard mappings. To say the least, it is in need of a graphical-user interface to make it usable by a wider audience.) -- The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.