-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyper key not working #103
Comments
Hi, thank you for the verbose report. Would you mind expanding on what the hyper key is? I'm not particularly familiar with that. |
It is an additional modifier, so I now have Super, Alt, Control and Hyper. You can use xmodmap to do this on x11, but on wayland I used this: https://ibnishak.github.io/blog/post/caps-to-hyper/ So in sxhkd you can use:
Press and hold caps lock - press d. I can define hyper in my sway config and it works:
All of which function as expected. For a full history of additional modifiers, search for space-cadet keyboards on lisp machines (spot the emacs user 😄). :edit:
Press both shifts to toggle caps lock. |
OK I will get someone to look into this. I currently can't work on it due to my deteriorating health. |
No problems, I completely understand, I am an old crip, easier and quicker to list what isn't wrong with me 🤣 |
I was experimenting with migrating from
I get:
99% of what I use |
patches are always welcome |
What is the difference between
and
in your case? If I understand correctly, this is exactly what you want: map the caps lock physical key to a command (which is what it means for
I think you should even be able to keep your custom config in X or wayland and both |
@ajanon -- thank you for the suggestion. With just:
I just get:
This is similar to |
Yup, caps lock is not a "modifier" I get exactly the same. You can however use the hyper modifier in sway, so that is the route I took. |
@ajanon You are correct! |
does that mean that there's no way to get binds with the hyper mod key working in swhkd? |
I found the code to do with the "hyper" mod key, while trying to make the "alt graph" key work. It may be considered a breaking change. I've managed to get it working with the "alt gr" key so I'm assuming it would work with the "hyper" key, however I don't have a keyboard with the "hyper" key. Also by "hyper" key I'm assuming you mean the "right logo/windows" button found on larger keyboards. There are 2 main steps to get the hyper key working.
pub enum Modifier {
Super,
Hyper,
Alt,
Control,
Shift,
Any,
}
let modifiers_map: HashMap<Key, config::Modifier> = HashMap::from([
(Key::KEY_LEFTMETA, config::Modifier::Super),
(Key::KEY_RIGHTMETA, config::Modifier::Hyper),
(Key::KEY_LEFTALT, config::Modifier::Alt),
(Key::KEY_RIGHTALT, config::Modifier::Alt),
(Key::KEY_LEFTCTRL, config::Modifier::Control),
(Key::KEY_RIGHTCTRL, config::Modifier::Control),
(Key::KEY_LEFTSHIFT, config::Modifier::Shift),
(Key::KEY_RIGHTSHIFT, config::Modifier::Shift),
]); Again, I can't test whether this will work since I don't have that key available on my keyboard |
@samsonnagamani Thanks for the patch! If anyone can test it and get it working, I'd be more than happy to merge and support this usecase. |
Version Information:
Linux xircon-legion 5.17.1-zen1-1-zen #1 ZEN SMP PREEMPT Mon, 28 Mar 2022 21:56:46 +0000 x86_64 GNU/Linux
swhkd 1.1.7
Describe the bug:
Cannot set hyper as a modifier.
Expected behavior:
Have redefined caps to be a hyper modifier, works in sxhkd.
Actual behavior:
Causes swhkd to not load.
To Reproduce:
add a shorcut e.g. hyper+d
Additional information:
Anything else you'd like us to know ?
The text was updated successfully, but these errors were encountered: