10
20
30 :
40
50 DATA 10,6, &20,"f0",&71,"f1",&72,"f2",&73,"f3",&14,"f4",&74,"f5",&75,"f6",&16,"f7",&76,"f8",&77,"f9"
60 DATA 16,1, &70,"es",&30,"1", &31,"2", &11,"3", &12,"4", &13,"5", &34,"6", &24,"7", &15,"8", &26,"9", &27,"0", &17,"-", &18,"^", &78,"\", &19,"<-", &79,"->"
70 DATA 15,5, &10,"Q", &21,"W", &22,"E", &33,"R", &23,"T", &44,"Y", &35,"U", &25,"I", &36,"O", &37,"P", &47,"@", &38,"[", &28,"_", &39,"^", &29,"v"
80 DATA 14,0, &40,"cl",&01,"ct",&41,"A", &51,"S", &32,"D", &43,"F", &53,"G", &54,"H", &45,"J", &46,"K", &56,"L", &57,";", &48,":", &58,"]"
90 DATA 10,7, &61,"Z", &42,"X", &52,"C", &63,"V", &64,"B", &55,"N", &65,"M", &66,"<", &67,">", &68,"/"
100 :
110 DATA 76, &60,"tab",1,2,4, &49,"ret",42,3,6, &50,"sl",0,4,3, &80,"shf",3,4,4, &00,"shf",37,4,5, &59,"dl",42,4,3, &69,"cp",45,4,3, &62,"space",10,5,24
120 DATA &02,"8",34,5,2, &03,"7",36,5,2, &04,"6",38,5,2, &05,"5",40,5,2, &06,"4",42,5,2, &07,"3",44,5,2, &08,"2",46,5,2, &09,"1",48,5,2
130 :
140
150 DATA &3A,"k+",37,7,3, &3B,"k-",40,7,3, &4A,"k/",43,7,3, &5B,"k*",46,7,3
160 DATA &1B,"k7",37,8,3, &2A,"k8",40,8,3, &2B,"k9",43,8,3, &5A,"k#",46,8,3
170 DATA &7A,"k4",37,9,3, &7B,"k5",40,9,3, &1A,"k6",43,9,3, &4B,"kD",46,9,3
180 DATA &6B,"k1",37,10,3,&7C,"k2",40,10,3,&6C,"k3",43,10,3,&5C,"k,",46,10,3
190 DATA &6A,"k0",37,11,3,&4C,"k.",40,11,3,&3C,"kRet",43,11,6
200 :
210
220 DATA &1E,"f10",14,7,4,&1C,"f11",18,7,4,&1D,"f12",22,7,4
230 DATA &1F,"Sc",27,7,3, &2C,"Bk",30,7,3, &4D,"Nm",33,7,3
240 DATA &2D,"'~",14,8,3, &5D,"=+",17,8,3, &2E,"`Y",20,8,3, &2F,"BS",23,8,3
250 DATA &3D,"In",27,8,3, &3E,"Ho",30,8,3
260 DATA &5E,"\|",17,9,3, &5F,"\_",20,9,3, &4F,"'""",23,9,3
270 DATA &3F,"Up",33,8,3, &4E,"Dn",33,9,3
280 DATA &6D,"nc",27,10,3,&6E,"cv",30,10,3,&6F,"ka",33,10,3
290 DATA &7D,"WL",17,10,3,&7E,"WR",20,10,3,&7F,"WM",23,10,3
300 DATA &0A,"",1,7,2, &0B,"",3,7,2, &0C,"",5,7,2
310 DATA &0D,"",7,7,2, &0E,"",9,7,2, &0F,"",11,7,2
320 :
330 DATA &80,"shf",3,4,4, &81,"",-5,-1,0, &82,"alt",6,5,4
340 DATA &83,"shL",1,8,4, &84,"ctL",5,8,4, &85,"alL",9,8,4
350 DATA &86,"shR",1,9,4, &87,"ctR",5,9,4, &88,"alR",9,9,4
360 DATA &89,"msL",1,10,4,&8A,"msM",5,10,4,&8B,"msR",9,10,4
370 :
380 MODE 4:
390 escOn$="ESC ON":escOff$="ESC OFF"
400 ON ERROR escOn$="FX229":escOff$="FX229,1"
410 OSCLI escOn$:ON ERROR OFF
420 :
430 DIM n$(&90), xs(&90), ys(&90), ws(&90), D% &90
440 :
450 FOR y = 0 TO 4
460 READ count, x
470 FOR k = 1 TO count
480 READ num, n$(num)
490 xs(num) = x : x = x + 3
500 ys(num) = y
510 ws(num) = 3
520 NEXT
530 NEXT
540 :
550 READ count
560 FOR k = 1 TO count
570 READ num, n$(num), xs(num), ys(num), ws(num)
580 IF n$(num)="`Y":IF HIMEM>&FFFF:n$(num)="ŁY"
590 NEXT
600 :
610 VDU 5 :
620 FOR W% = 0 TO &8B
630 PROCdrawKey(W%):D%?W%=0
640 NEXT
650 VDU 4 :
660 :
670 VDU 23,1;0;0;0;0
680 PRINT TAB(4,27);"Negative INKEY tester"
690 PRINT TAB(2,28);"Press SHIFT+ESCAPE to exit"
700 :
710 OSCLI escOff$
720 GCOL 4,1
730 REPEAT
740 FOR W%=0 TO &7F:S%=INKEY(-1-W%) AND 255
750 IF S%<>D%?W%:PROCtoggleKey(W%):D%?W%=S%
760 NEXT:*FX15
770 UNTIL INKEY(-1) AND INKEY(-113)
780 REPEAT UNTIL INKEY(-113)=0
790 VDU 23,1,1;0;0;0;
800 *FX15
810 OSCLI escOn$
820 END
830 :
840 DEFPROCdrawKey(w%)
850 x = xs(w%) * 24 + 40
860 y = 1024 - ys(w%) * 72 - 40
870 MOVE x, y
880 DRAW x+ws(w%)*24-2, y
890 DRAW x+ws(w%)*24-2, y-68
900 DRAW x, y-68
910 DRAW x, y
920 MOVE x+5, y-4
930 PRINT n$(w%);
940 MOVE x+5, y-34
950 PRINT ;~w% AND 127;
960 ENDPROC
970 :
980 DEFPROCtoggleKey(W%)
990 IF W%<16:PROCtoggleKey(128+W%)
1000 x = xs(W%) * 24 + 40
1010 y = 1024 - ys(W%) * 72 - 40
1020 MOVE x, y
1030 MOVE x+ws(W%)*24-4, y
1040 PLOT 85, x, y-68
1050 PLOT 85, x+ws(W%)*24-4, y-68
1060 IF PAGE<&FFFFF:MOVE x+ws(W%)*24-4,y:DRAW x,y-68
1070 ENDPROC