-
Notifications
You must be signed in to change notification settings - Fork 112
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
Proposed PR: Super + Hyper #118
Comments
How is Super not supported I swap Ctrl & Super just fine? |
Hi @rbreaves - could you given an example? Super/Hyper aren't listed in the key definitions for |
Meta is Super.. https://github.com/rbreaves/kinto/blob/master/linux/kinto.py |
@bjohas - Super is defined in Keys.py, mapped to Meta as you previously noted. Treating super and meta interchangeably is probably one of several conventions arising out of the fact there are no standard super / meta keys on keyboards, and the Win key is often treated as both. I assume you're looking at the option treating them separately? Regarding Hyper, for my own purposes, I added a hardcoded modifier that used katakana as a kludgey convenience. After mapping the same in xmodmap, I was able to refer to this 'hyper' both in xkeysnail's config.py and my WM (Gnome) shortcuts. This allows me to use caps as a new modifier. The important part is that whatever key is used is treated as a modifier; calling it 'super' (rather than katakana, in my case) is only a convenience I noticed that there is a 'fake' hyper code defined in evdev although in this moment I'm not sure how to take advantage of it. |
@pat-flew I've come round to exploring this again. I do like the Hyper modification, but I'm concerned that it's baked into the code, i.e., one would have to recompile xkeysnail over and over. Is there a way the hyper modification could be introduced into the code in a user-configurable way? Many thanks! |
Okay, I'm still failing to remap LAlt <-> LSuper... Let's say I have the following in my config:
And while the first two mappings work just fine, the last two remaps (Left Alt to Super and vice versa) don't work at all. |
You're mixing remapping hotkey combos and remapping just modifier keys, you can't do that like that. Modifiers belong in a different function - conditional modmap.
|
Thanks, Ben! |
Hello @rbreaves and @pat-flew - I'd like to come back to this. Can you help me understand the issue of hardcoding the keys? I can see that if I change Is it that
which leads to emitting Hyper_L/Hyper_R, which I can check with The example code has
I suppose that are all keys that are defined in So is maybe the real issue that there's no provision for Hyper (I'm not quite sure what I mean by that 😀)?
|
To add to this. So seems that Anyway - looking at xkb, the key number for Hyper is not consistent:
I've added Hyper here: https://github.com/bjohas/xkeysnail/blob/master/xkeysnail/key.py, line 271, to 249/250 (left/right hyper). I then do a config like this:
I can run |
I don't really have an issue with you wanting to hardcode anything & adding in Hyper. I just have no real use for an additional Hyper key I don't guess, so Meta being the Super/Win key for me fully satisfies what I personally need or want. I have no real idea what I would use Hyper for. I only commented on this thread again because there was a misunderstanding on where to remap some modifiers by another user. |
Hi @rbreaves - thank you. Would you want to integrate Hyper into your fork? I guess not, but just double-checking. I'd obv love to have it and would be happy to put out a bounty for it or contract you. I do use Hyper for my OS X-type layout, which is a different approach to using LCTRL and RCTRL (as kinto does). Hyper means that there's a spare mod key (obviously), which means that all Desktop apps have ctrl/alt/super as expected, while Hyper plays the OS X-CTRL role (on the Desktop, i.e. beginning / end of line). Similarly, Ubuntu-ctrl and alt/super work in Terminal, with Hyper (swapped with ctrl) will mean everything works in Terminal. It's just a different strategy from Kinto LCTRL/RCTRL. But that's why I'd like it. :) |
Maybe some time next week or so, I will be busy all this week though. |
That would be amazing, thank you!! |
Help me understand here... I understand how we can add random keys on the OUTPUT... but what does your mapping look like on the input side? How does one trigger this extra Hyper key if it's not using alt, ctrl, super or meta? |
Hi @joshgoebel - I use capslock, as I rarely ever need capslock. However, I think it can be any key you like (assuming you don't need that key). Is that what you meant? |
https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h We're using the LInux source for key names as canonical...
According to Linux 207 is PLAY and 128 is STOP. And there is no hyper... |
Technically long-term one should be able to use any keys as modifiers (that's the promise of modmap) but right now that's not possible because of how we treat modifiers as "special" keys... if that ever changed I think you could just use whatever keys you wanted for "Hyper", you wouldn't need to create new non-existing keys. |
Perhaps because you've mapped it to keys that don't actually exist on any keyboards anywhere? 😺 Try using some of the high F keys instead, F23, F24 and see if you have better luck... If that works that might be a direction to go here instead. |
Ok, here is what I did to get it working on my fork: In my xkeysnail/keyszer config: # create a new modifier, and use the keyboard key F24
Modifier("L_HYPER", aliases = ["LHyper"], key = Key.F24)
LHyper = Key.F24
The Modifier line only works on my fork, but you could get by without it but then you might run into the fact that xkeysnail treats regular keys differently than modifiers in many ways. (combos) If all you want to do is pass it thru to the OS without binding it to hotkeys it might work just fine with 0.4.0 though. In my Awesome config:
Modkey is the variable I use in all my keybindings. In my .Xmodmap
I had to redefine mod4 because Hyper was already there for some reason. Then I add Hyper_L to The part that confuses me most is F24 (the key I'm reusing) is 194 to the kernel BUT After loading the node Xmodmap now my Hyper key works for all my Awesome WM shortcuts. I added a note on my wiki: https://github.com/joshgoebel/xkeysnail/wiki/Hyper |
I suppose perhaps now that I'm thinking about it I could have just assigned capslock to L_Hyper directly, LOL. I thikn this is slightly more flexible though because techncially now I could use it in a conditional modmap and have my cake and eat it to - caps lock is both a modifier AND a caps lock key - but I never use caps lock so I don't mind losing it. |
Hi @mooz ,
xkeysnail
doesn't handle Super/Hyper at the moment. Would you welcome a PR that added these two keys as modifiers?(CC @pat-flew, #88)
The text was updated successfully, but these errors were encountered: