diff --git a/gui/shaviankb/shaviankb.tal b/gui/shaviankb/shaviankb.tal index 9926593..1030c5d 100644 --- a/gui/shaviankb/shaviankb.tal +++ b/gui/shaviankb/shaviankb.tal @@ -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 } + DUP [ LIT 80 ] NEQ ?{ #0019 } + DUP [ LIT 04 ] NEQ ?{ #01 } + POP + ( | key ) + .Controller/key DEI tolowercase ( | top row ) DUP [ LIT "q ] NEQ ?{ #0000 } DUP [ LIT "w ] NEQ ?{ #0001 } @@ -91,15 +97,6 @@ DUP [ LIT ", ] NEQ ?{ #001c } DUP [ LIT ". ] NEQ ?{ #001e } POP BRK - &on-button ( button -> ) - DUP [ LIT 40 ] NEQ ?{ - #0018 - POP BRK } - DUP [ LIT 80 ] NEQ ?{ - #0019 - POP BRK } - #02 SFT #01 AND - 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 @ ( short* -- ) SWP /b @@ -293,6 +290,6 @@ &c ( -- ) #0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO JMP2r - + ~assets.tal