Abstracted set-layer

This commit is contained in:
Devine Lu Linvega 2024-02-11 12:19:45 -08:00
parent c7482debc0
commit db4e0fbc4a
1 changed files with 7 additions and 5 deletions

View File

@ -51,8 +51,7 @@
@on-control ( -> )
( | release )
.Controller/button DEI2 ORA ?{
#00 .layer STZ
<draw-keyboard>
#00 <set-layer>
[ LIT2 00 -lock ] STZ
BRK }
( | toggle layer )
@ -99,8 +98,7 @@
DUP [ LIT 80 ] NEQ ?{
#0019 <set-press>
POP BRK }
#02 SFT #01 AND .layer STZ
<draw-keyboard>
#02 SFT #01 AND <set-layer>
BRK
(
@ -141,7 +139,11 @@
&bottom #0002 JMP2r
@<toggle-layer> ( -- )
.layer LDZ INC #03 DIVk MUL SUB .layer STZ
.layer LDZ INC #03 DIVk MUL SUB
( >> )
@<set-layer> ( layer -- )
.layer STZ
!<draw-keyboard>
@<set-hover> ( id* -- )