Skip to content

Rolling out of nested layer-while-helds in a different order? #1041

Closed Answered by gerhard-h
brandonbeaumia asked this question in Q&A
Discussion options

You must be logged in to vote

I consider a BASE layer with keys to layer A and layer B.
On layer A the layer B key is replaced with a layer C key ( and vice versa).

Add a virtual key release_layer_C (release-layer C)

Then we can change all the layer keys to always release C (multi (layer-while-held A) (on-release tap-vkey release_layer_C ))
On layer B the layer A key activates a layer stack (multi (layer-while-held A) (layer-while-held C) (on-release tap-vkey release_layer_C ))

(defsrc a b x)
(deflayer base @a  @b  x)
(deflayer A    @a  @bc a)
(deflayer B    @ac @b  b)
(deflayer C    @ac @bc c)
(defalias 
 a  (multi  (layer-while-held A) (on-release tap-vkey release_layer_C ))
 b  (multi  (layer-while-held B) (on-rele…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@brandonbeaumia
Comment options

Answer selected by brandonbeaumia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants