Toggle button on press
This commit is contained in:
parent
a82d393406
commit
c13389a1e1
|
@ -49,9 +49,15 @@
|
|||
BRK
|
||||
|
||||
@on-control ( -> )
|
||||
( | release )
|
||||
.Controller/button DEI2 ORA ?{
|
||||
#00 .layer STZ
|
||||
<draw-keyboard>
|
||||
[ LIT2 00 -lock ] STZ
|
||||
BRK }
|
||||
( | toggle layer )
|
||||
.Controller/button DEI DUP ?&on-button
|
||||
POP <draw-keyboard>
|
||||
.Controller/key DEI tolowercase
|
||||
POP .Controller/key DEI tolowercase
|
||||
( | top row )
|
||||
DUP [ LIT "q ] NEQ ?{ #0000 <set-press> }
|
||||
DUP [ LIT "w ] NEQ ?{ #0001 <set-press> }
|
||||
|
@ -82,8 +88,9 @@
|
|||
POP BRK
|
||||
&on-button ( button -> )
|
||||
#02 SFT #01 AND .layer STZ
|
||||
<draw-keyboard>
|
||||
BRK
|
||||
|
||||
|
||||
(
|
||||
@|core )
|
||||
|
||||
|
@ -98,6 +105,7 @@
|
|||
DUP #1b NEQ ?{ POP2 !<toggle-layer> }
|
||||
.hover LDZ2 ;btn-chr <draw-key-id>
|
||||
DUP2 ;btn-press-chr <draw-key-id>
|
||||
DUP2 .hover STZ2
|
||||
( | event )
|
||||
( key ) #0006 MUL2 ;layout ADD2
|
||||
( layer ) get-layer #10 SFT2 ADD2 LDA2
|
||||
|
@ -271,6 +279,6 @@
|
|||
&c ( -- )
|
||||
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO
|
||||
JMP2r
|
||||
|
||||
|
||||
~assets.tal
|
||||
|
||||
|
|
Loading…
Reference in New Issue