Mode modifyiers

This commit is contained in:
Devine Lu Linvega 2024-02-11 12:40:35 -08:00
parent db4e0fbc4a
commit f6e5ec52fe
1 changed files with 13 additions and 16 deletions

View File

@ -55,8 +55,14 @@
[ LIT2 00 -lock ] STZ
BRK }
( | toggle layer )
.Controller/button DEI DUP ?&on-button
POP .Controller/key DEI tolowercase
.Controller/button DEI
( | buttons )
DUP [ LIT 40 ] NEQ ?{ #0018 <set-press> }
DUP [ LIT 80 ] NEQ ?{ #0019 <set-press> }
DUP [ LIT 04 ] NEQ ?{ #01 <set-layer> }
POP
( | key )
.Controller/key DEI tolowercase
( | top row )
DUP [ LIT "q ] NEQ ?{ #0000 <set-press> }
DUP [ LIT "w ] NEQ ?{ #0001 <set-press> }
@ -91,15 +97,6 @@
DUP [ LIT ", ] NEQ ?{ #001c <set-press> }
DUP [ LIT ". ] NEQ ?{ #001e <set-press> }
POP BRK
&on-button ( button -> )
DUP [ LIT 40 ] NEQ ?{
#0018 <set-press>
POP BRK }
DUP [ LIT 80 ] NEQ ?{
#0019 <set-press>
POP BRK }
#02 SFT #01 AND <set-layer>
BRK
(
@|core )
@ -129,8 +126,6 @@
.Mouse/state DEI
( ) DUP #02 AND ?&top
( ) #04 AND ?&bottom
.Controller/button DEI
( ) #04 AND ?&top
.layer LDZ
( ) DUP #00 EQU ?&top
( ) #02 EQU ?&bottom
@ -283,8 +278,10 @@
(
@|stdlib )
@tolowercase ( char -- )
JMP2r
@tolowercase ( char -- char )
DUP [ LIT "A ] GTH ?{ JMP2r }
DUP [ LIT "Z ] LTH ?{ JMP2r }
#20 ADD JMP2r
@<phex> ( short* -- )
SWP <phex>/b