~aleteoryx/pb1000

pb1000/keycodes.b -rw-r--r-- 317 bytes
718a70d5 — Aleteoryx init 11 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
10 PRINT"Keycodes..."

15 K$=INKEY$
16 K=ASC(K$)

20 N=K¥16
21 GOSUB 50
25 N2$=N$

30 N=K MOD 16
31 GOSUB 50

35 PRINT "Pressed 0x";N2$;N$;" (";K;")"
40 GOTO 15

49 'hex codes, didn't realize this was a builtin :P
50 RESTORE 100
55 FOR I=0 TO N
60 READ N$
65 NEXT
70 RETURN

100 DATA 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F