10-01-2022, 02:38 AM
To demo what Mark is gettting at...
I threw in the INKEY$ statement just to only clear the screen when a key is pressed, other than the combo you wanted, arrow up and left.
Now if you hold both down, the process will repeat. If you only want one event, then do this...
Hope that helps.
Pete
Code: (Select All)
DO
_LIMIT 30
IF _KEYDOWN(18432) THEN h = -1 ELSE h = 0
IF _KEYDOWN(19200) THEN i = -1 ELSE i = 0
IF h * i = 1 THEN PRINT "Both keys down." ELSE IF LEN(INKEY$) THEN CLS
_KEYCLEAR
LOOP
I threw in the INKEY$ statement just to only clear the screen when a key is pressed, other than the combo you wanted, arrow up and left.
Now if you hold both down, the process will repeat. If you only want one event, then do this...
Code: (Select All)
DO
_LIMIT 30
IF _KEYDOWN(18432) THEN h = -1 ELSE h = 0
IF _KEYDOWN(19200) THEN i = -1 ELSE i = 0
IF h * i = 1 AND flag = 0 THEN
PRINT "Both keys down."
flag = -1
ELSE
IF h * i = 0 THEN flag = 0: CLS
END IF
_KEYCLEAR
LOOP
Hope that helps.
Pete