Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reading simultaneous keys pressed
#4
You have to execute zxb.py --version in the same directory zxb.py is installed, and must have write permissions on such directory.

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
    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
To check ANY key use
MultiKeys(<key 1>) AND MultiKeys(<Key 2>)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)