From: Yuuki Harano Date: Sat, 29 May 2021 14:56:04 +0000 (+0900) Subject: Disable hyper key when super and hyper conflict X-Git-Tag: emacs-29.0.90~3693 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7085fecf53d9506b1f626e3cab1dd90e33aa9ed0;p=emacs.git Disable hyper key when super and hyper conflict * src/pgtkterm.c (x_find_modifier_meanings): If super_mod_mask and hyper_mod_mask are equal, then disable hyper. --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index f79329f7ddf..e4bf7ba6bd4 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -5462,6 +5462,16 @@ x_find_modifier_meanings (struct pgtk_display_info *dpyinfo) { dpyinfo->hyper_mod_mask = GDK_MOD3_MASK; } + + /* If xmodmap says: + * $ xmodmap | grep mod4 + * mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) + * then, when mod4 is pressed, both of super and hyper are recognized ON. + * Maybe many people have such configuration, and they don't like such behavior, + * so I disable hyper if such configuration is detected. + */ + if (dpyinfo->hyper_mod_mask == dpyinfo->super_mod_mask) + dpyinfo->hyper_mod_mask = 0; } static void