Hyper modifier inaccessible under Wayland
User level issue:
Under Wayland using the Hyper key isn't recognized doesn't work in emacs (compiled with PGTK).
Developer details:
Under Wayland GDK uses the string "Hyper" to access the Hyper modifier.
Caps-lock can be set to the hyper key for example:
xkb_options = caps:hyper
Even though Hyper_L
and Hyper_R
events are properly detected, the "Modifier" is not detected as held.
From what I can see this doesn't map to a usable modifier which must be one of the following values from:
libxkbcommon/src/keymap-priv.c
/* Predefined (AKA real, core, X11) modifiers. The order is important! */
static const char *const builtin_mods[] = {
[0] = "Shift",
[1] = "Lock",
[2] = "Control",
[3] = "Mod1",
[4] = "Mod2",
[5] = "Mod3",
[6] = "Mod4",
[7] = "Mod5"
};
Suggest either:
- Ideally, detect the Hyper key by scanning the keymap for
Hyper_L
&Hyper_R
, detect the modifier assigned to the key. - Update the hard coded value, pick a modifier Mod3 or Mod5 and replace "Hyper" with this value (Mod4 is used by "Super").
EDIT, it seems it's possible for a keymap to define new modifiers (including a "Hyper" modifier), although having to create a new keymap seems a fairly high barrier of entry for using the Hyper key, this should really be supported by setting caps:hyper
option for e.g.