quads$ = "12345EQRTW06789IOPUYBBBGHJKLMNAAACDFSVXZ"
PRINT "Type any key a-z (A-Z) or 0-9"
PRINT "ESC key to quit"
PRINT
WHILE k$ <> CHR$(27)
k$ = INKEY$
quadrant$ = MID$(STR$(9 + INSTR(quads$, UCASE$(k$))), 2, 1)
IF quadrant$ <= "4" AND LEN(k$) THEN
PRINT "Key "; k$; " is in quadrant "; quadrant$
END IF
WEND
I could have just divided by 10 the sum of the result of INSTR(...) and 9, but what fun would that be? :P |