10-09-2011, 06:54 PM
It seems we crospost. Let me repeat here:
The snippet is not working, that's right, because I forgot you have to check simultaneously KEYS in the same semirow (look at the ZX Spectrum keyboard layout).
E.g. The following will work:
To check ANY key use MultiKeys(<key 1>) AND MultiKeys(<Key 2>) so you don't have to care about rows, positions, etc...
The snippet is not working, that's right, because I forgot you have to check simultaneously KEYS in the same semirow (look at the ZX Spectrum keyboard layout).
E.g. The following will work:
Code:
#include <keys.bas>
DO
IF MultiKeys(KEYA| KEYS) THEN : REM 'A' and 'S' are in the same semirow
PRINT AT 0, 0; "Letter A or letter S pressed (or both)"
ELSE
PRINT AT 0, 0,,
END IF
LOOP : REM Repeat forever since no condition specified