Error binding Super as Escape Key
akamofu opened this issue · 2 comments
Am i doing something wrong or it is not possible to choose Super (which in xev is identified as Super_L) as your Escape/Leader/Prefix key?
If i put
escape Super
in the config, the compositor doesn't start, as it is not a valid key name (that's expected behavior). Instead, if i put
escape Super_L
it does start well, but then if i press Super_L nothing happens, and all the bound commands that depend on it don't work either (of course).
In Sway, Super works normally to me. What could it be that makes it behave this way here?
Thanks for your work, by the way. I really wish i could migrate to Cagebreak as it is similar to Ratpoison and also has a cool name :)
Hi Sad Paradise
Thanks for pointing this out.
It seems that the Super_L key is called the Logo modifier in cagebreak.
For instance, you can use it with L-otherkey in your config as per:
https://github.com/project-repo/cagebreak/blob/master/man/cagebreak-config.5.md#key-definitions
Modifiers unfortunately can't be used alone due to the details of how we
have things implemented, so binding Super_L to escape won't work. I used to
think that this is the way things are supposed to work, but if you say
it works on Sway then maybe we'd want to change that for Cagebreak too.
Do you have to do anything special in Sway to get this to work?
A possible workaround is also to remap the Logo key to some other symbol
at the xkb level and then use the new symbol as an escape key (this is
what we are using to be able to define the caps lock key as the escape
key), although it's a bit hacky.
In any case, thank you for the kind words and for letting us know about
this issue!
cheers
project-repo
Oh, you're right. I've got confused as the way the two compositors work with the mod/prefix key are different. In Sway you don't have a root mode, so all key definitions are made simply by adding a variable $mod to the beginning of each keybinding declaration including it. In order to make the same in Cagebreak, i can easily use definekey instead of bind, which is no big deal.
I must point, tho, that in Ratpoison you are able to map Super_L as your prefix key normally. This got me even more confused...Maybe you should get explicit in the manual that modifiers can't have this function.
Anyway, thank you once more. Now i can map things the way i wanted.