You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defalias
nsh (layer-next sft)) ;; layer with all alpha keys capitalised
Expected behaviour
I expect to see the layer used for only one keypress.
T@nsh Ta Tb ==> Ab
T@nsh Pa Pb Ra Rb ==> Ab
Actual/current behaviour
But if many keys are pressed together they are all made in the layer
T@nsh Ta Tb ==> Ab
T@nsh Pa Pb Ra Rb ==> AB
Attempt to create a button
David Janssen created an "around-next-single" button (discussed in this comment) to solve the around-next issue. I attempted to use that logic but the behaviour was no different to layer-next.
layerNextSingle :: LayerTag -> Button
layerNextSingle t = onPress $ await isPress $ \_ -> do
layerOp (PushLayer t)
await (pure True) $ \_ -> do
layerOp (PopLayer t)
pure NoCatch
pure NoCatch
Other ways of doing this
This can be done by creating layers full of aliases whose only function is to perform one key or button and return but it uses a lot of config space if you use a lot of these type of layers.
Maybe I'm using this incorrectly or missing a better way?
The text was updated successfully, but these errors were encountered:
I want to switch into another layer for one keypress only, similar to how layers work in vim.
Layer-next seems to be suited for this, as defined in the tutorial:
However, it really handles multiple next presses if they are pressed together.
This issue applies to around-next also, and closely resembles #166 and #167.
Steps to reproduce the issue
To borrow the examples from #167, suppose I have
Expected behaviour
I expect to see the layer used for only one keypress.
Actual/current behaviour
But if many keys are pressed together they are all made in the layer
Attempt to create a button
David Janssen created an "around-next-single" button (discussed in this comment) to solve the around-next issue. I attempted to use that logic but the behaviour was no different to layer-next.
Other ways of doing this
This can be done by creating layers full of aliases whose only function is to perform one key or button and return but it uses a lot of config space if you use a lot of these type of layers.
Maybe I'm using this incorrectly or missing a better way?
The text was updated successfully, but these errors were encountered: