-
Notifications
You must be signed in to change notification settings - Fork 262
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
LockLayer/UnlockLayer cancels the effect of a OneShot modifier #1346
Comments
The status of this as a bug is debatable. The documentation ought to say "layer shift keys", not simply "layer keys". Other types of layer keys could also be included, and perhaps they should be, since those keys don't normally cause any HID reports to be sent to the host. It should be a simple change to this line. |
Can I please ask what are the other types of "layer keys"? Does it mean that "layer lock" is another type of "layer key" different from "layer shift"? |
There are several different types of Layer keys. "Layer shift" keys (e.g. The layer keys that don't trigger the release of a one-shot key are the "momentary" ones: layer shift and mod-layer keys. The documentation ought to reflect that. But it would also be quite reasonable to change the behavior of the OneShot plugin to also ignore layer lock and move keys when considering whether or not to trigger release of keys in the one-shot state. |
Understood, thanks a lot for the precisions. I would personally argue that If you agree, should I try to come up with a PR? I am a newcomer to the codebase, so any clues about what to be done would be appreciated. I understand this |
I think you've got a good case. I don't think we even considered the use of Perhaps we should consider a broader redesign, rather than just exempting those non-momentary layer keys on the grounds that they don't cause HID reports to be sent to the host. Ideally, I think the fundamental question we'd want to ask when a non-OneShot, non-momentary key toggles on is "Was this key affected by the active one-shot key(s)?" In your example, for instance, it makes sense for a keyboard modifier in a one-shot state to not be affected by a layer lock key toggling on, but it does make sense for a layer shift key in a one-shot state to turn off in response to a layer lock key toggling on (or, even more convincingly, a It is far from clear to me what the best option is. |
Describe the bug
Here is what I read from the documentation for OneShots.
https://kaleidoscope.readthedocs.io/en/latest/plugins/Kaleidoscope-OneShot.html#oneshot
But it seems to me that for a OneShot modifier (let's say
Left_Ctrl
), using aLockLayer
/UnlockLayer
before the actual key on which the modifier should be applied cancels the effect of the OneShot (the key is output without its modifier applied).To Reproduce
On my Linux machine,
LeftGui+t
opens a new terminal window. I was expecting the following steps to trigger this shortcut, but it does not seem to work as documented.A
on which is myt
key.B
using a key that triggersLockLayer(B)
.LeftGui
key to enable it from this layerB
.A
using a key that triggersUnlockLayer(B)
.t
.But it seems only
t
is typed, and notLeftGui+t
.Expected behavior
I was expecting
LeftGui+t
to happen so that my terminal shortcut is triggered. This should work even if the key on which I want the modifier applied is on a different layer than the OneShot modifier.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: