2019-02-21 18:21:48 +01:00
|
|
|
~~~
|
|
|
|
0x60 'keyboard:DATA const
|
|
|
|
0x64 'keyboard:STATUS const
|
|
|
|
|
|
|
|
:keyboard:wait
|
2019-02-21 20:54:06 +01:00
|
|
|
[ keyboard:STATUS pio:in-byte #1 and n:-zero? ] until ;
|
|
|
|
|
|
|
|
:keyboard:read
|
|
|
|
keyboard:DATA pio:in-byte ;
|
2019-02-21 18:21:48 +01:00
|
|
|
|
|
|
|
:uuu
|
2019-02-21 20:54:06 +01:00
|
|
|
keyboard:wait
|
|
|
|
#0 [ drop keyboard:read 0x7F and dup 0x39 gt? [ drop keyboard:wait #0 ] if dup #0 -eq? ] until ;
|
|
|
|
|
|
|
|
'keyboard:Dvorak d:create
|
|
|
|
#0 , #27 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $0 , $[ , $] , #8 ,
|
|
|
|
#9 , $' , $, , $. , $p , $y , $f , $g , $c , $r , $l , $/ , $= , #10 ,
|
2019-02-21 21:19:26 +01:00
|
|
|
#-1 , $a , $o , $e , $u , $i , $d , $h , $t , $n , $s , $- , $` ,
|
2019-02-21 20:54:06 +01:00
|
|
|
#-1 , $\ , $; , $q , $j , $k , $x , $b , $m , $w , $v , $z ,
|
|
|
|
#-1 , $* , #0 , #32 , #32 ,
|
|
|
|
|
|
|
|
'keyboard:Dvorak:Shifted d:create
|
|
|
|
#0 , #27 , $! , $@ , $# , $$ , $% , $^ , $& , $* , $( , $) , ${ , $} , #8 ,
|
|
|
|
#9 , $" , $< , $> , $P , $Y , $F , $G , $C , $R , $L , $? , $+ , #10 ,
|
2019-02-21 21:19:26 +01:00
|
|
|
#-1 , $A , $O , $E , $U , $I , $D , $H , $T , $N , $S , $_ , $~ ,
|
2019-02-21 20:54:06 +01:00
|
|
|
#-1 , $| , $: , $Q , $J , $K , $X , $B , $M , $W , $V , $Z ,
|
|
|
|
#-1 , $* , #0 , #32 , #32 ,
|
|
|
|
|
2019-02-21 22:25:43 +01:00
|
|
|
{{
|
2019-02-21 20:54:06 +01:00
|
|
|
:n &keyboard:Dvorak + fetch ;
|
|
|
|
:N &keyboard:Dvorak:Shifted + fetch ;
|
2019-02-21 22:25:43 +01:00
|
|
|
---reveal---
|
2019-02-21 20:54:06 +01:00
|
|
|
:getc uuu drop uuu n dup #-1 eq? [ drop uuu drop uuu N ] if dup c:put ;
|
2019-02-21 22:25:43 +01:00
|
|
|
}}
|
2019-02-21 18:21:48 +01:00
|
|
|
~~~
|
|
|
|
|