hyprwm / Hypr

Hypr is a tiling window manager written in modern C++.
BSD 3-Clause "New" or "Revised" License
1.1k stars 33 forks source link

Support for the Hyper modifier key #44

Closed kcrmson closed 2 years ago

kcrmson commented 2 years ago

Is your feature request related to a problem? Please describe.

This is feature request related for an additional modifier key to be available for Hypr.

Describe the solution you'd like

I have keycodes 66 amd 135 mapped to Hyper_L (a modifier key) for ease on my thumbs (vs. the standard Super key location). This is done via adding this to my .Xmodmap:

keycode 66 = Hyper_L NoSymbol Hyper_L keycode 135 = Hyper_L NoSymbol Hyper_L add mod3 = Hyper_L

I have found that trying to substitute it in the config didn't actually work. I did find that editing src/KeybindManager.cpp and adding this line after the nearly identical one for SUPER then changing all instances of SUPER in my config to HYPER did work after manually building:

if (CONTAINS(mod, "HYPER") || CONTAINS(mod, "MOD3")) sum |= XCB_MOD_MASK_3;

vaxerski commented 2 years ago

added in ddb933511156ffd807a1d97baf90519981910942

Since "HYPER" is nowhere near the standard name, as that one I think does not exist, I left them named as they were in XCB.

Use MOD3 MOD5 MOD2 etc.

Thanks!