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