From: Po Lu Date: Wed, 26 Jan 2022 12:35:04 +0000 (+0800) Subject: Add workaround for super modifier misconfiguration to non-XKB code X-Git-Tag: emacs-29.0.90~2736 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94216789872a24614ce85b6c0ea688eee1c9a540;p=emacs.git Add workaround for super modifier misconfiguration to non-XKB code * src/xterm.c (x_find_modifier_meanings): Don't let a modifier be both Hyper and Super. --- diff --git a/src/xterm.c b/src/xterm.c index b2cdbe6a0f0..1684048ea4c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5694,6 +5694,12 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo) dpyinfo->alt_mod_mask &= ~dpyinfo->meta_mod_mask; } + /* If some keys are both super and hyper, make them just super. + Many X servers are misconfigured so that super and hyper are both + Mod4, but most users have no hyper key. */ + if (dpyinfo->hyper_mod_mask & dpyinfo->super_mod_mask) + dpyinfo->hyper_mod_mask &= ~dpyinfo->super_mod_mask; + XFree (syms); XFreeModifiermap (mods); }