-
Notifications
You must be signed in to change notification settings - Fork 111
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
Is it possible to re-bind Capslock to Hyper? #88
Comments
Just load your |
YMMV but a partial workaround that for me at least (in Gnome) was updating the code to add a new modifier associated with an unused uinput key, and mapping that to capslock in xkeysnail config. Then it should also be possible to map the same key to Hyper in xmodmap if you have existing shortcuts using Hyper in applications. e.g. pat-flew@663729c |
@pat-flew thanks for the info, this looks like it could be helpful! I'm one of those people that rebind capslock-tap to escape and capslock-hold to hyper; I've so far used xmodmap+xcape to accomplish that. It looks like with your branch, I could use xkeysnail instead of xcape to support distinguishing between tap and hold. I'll try out your branch when I have the time, thanks again! |
Hi @pat-flew - would you be happy to make a PR? It would be great to have this feature in the application. Alternatively, I would also be happy to test and make a PR if you prefer? I have some questions.
I would be super-happy to write out some code, but I'd probably need a bit of help when I get stuck... Would you be willing to help? |
Hi @bjohas. IIRC, I didn't have any luck using undefined codes so switched to using an existing key and didn't investigate further, since that was enough for my use-case at the time. Not sure about Hyper/Meta but I think that association has been around for the lifetime of this repo. As it is, I wouldn't want to redefine katakana in a PR since I assume it might used by some. If there's a way to use an undefined code, or to determine some other more appropriate mapping, I think it could work. Better, possibly, would be to allow additional modifiers, or simply a user-defined mapping for hyper in particular. I don't think it'd be too difficult; it'd mostly just need to touch on the parts that were modified in the fork. The only keys xkeysnail gives special treatment to are the modifiers hardcoded into Keys.py. I think those two keys you mention are generally associated with Key.RIGHT_ALT and treated as a standard modifier. |
Hi @pat-flew - sorry for the slow reply. Yeah, I agree, a user-defined map for super/hyper would be good. Let me make a new issue, and see whether that would be welcome. |
Here is my default xmodmap config... so Hyper is grouped in with Super... so even if you redirected a key (pick any key) with the keymapper to the Hyper (or figured out what X thinks that key is) you'll still have to move it to mod2/mod3 or something to get it out of the mud with Super... So at that point (since you're running xmodmap anyways) what key you use starts to not matter all that much... here is my setup using F24... (and my new fork which allows defining custom modifiers in the first place) |
Hello,
I've remapped my Capslock to Hyper with xmodmap. For reference, this is the relevant xmodmaprc part:
xkeysnail looks really cool and I'd like to use it. I tried to find a way to do the above with it, but it seems there isn't even a Hyper key. Is there any way to replicate that xmodmap config?
I tried to read the code and understand what would need to be fixed, but I didn't get very far. If it helps, it seems that uinput doesn't have a Hyper key variable either ( https://github.com/tuomasjjrasanen/python-uinput/blob/master/src/ev.py ).
The text was updated successfully, but these errors were encountered: