keybinds: add support for Meta and Hyper modifiers

The modifiers can be used in keybinds via M-key and H-key

Additionally adds support for:
- Mod1 (same as A)
- Mod3 (same as H)
- Mod4 (same as W)
- Mod5 (same as M)

This is compatible with the format used by Openbox.
(http://openbox.org/wiki/Help:Bindings#Syntax)

Mod2 (NumLock) and Caps are still not supported due to
their locking behavior but could theoretically be added.

Fixes: #1061
This commit is contained in:
Consolatis 2023-10-08 19:24:35 +02:00
parent 47a80fc4f2
commit 65bd32d625
2 changed files with 11 additions and 3 deletions

View file

@ -130,7 +130,10 @@ static bool is_modifier_key(xkb_keysym_t sym)
|| sym == XKB_KEY_Control_L
|| sym == XKB_KEY_Control_R
|| sym == XKB_KEY_Super_L
|| sym == XKB_KEY_Super_R;
|| sym == XKB_KEY_Super_R
/* Right hand Alt key for Mod5 */
|| sym == XKB_KEY_Mode_switch
|| sym == XKB_KEY_ISO_Level3_Shift;
}
struct keysyms {