10-03-2022, 05:22 PM
I edited the above post to demonstrate a bit more of what I described. I included this snippet to show the keyboard output with the 5 keys in question, arrow key(s) and space bar...
Thanks for checking into this, guys. I think it should be reported as a bug and as Rho pointed out, there are apparently other issues that need to be addressed in the QB64 keyboard functions.
Pete
Code: (Select All)
' Hold down any two or three arrow keys at once then repeatedly press the space bar.
' You will see the arrow keys register as 1 for on or 2 for off.
' You will see the space bar output flicker 0 to 1 as your toggle the space bar,
' except when the arrow up and arrow keys are held down.
WIDTH 87, 25
DO
_LIMIT 30
IF _KEYDOWN(18432) THEN a = 1 ELSE a = 0 ' Up-arrow.
IF _KEYDOWN(19712) THEN b = 1 ELSE b = 0 ' Right-arrow.
IF _KEYDOWN(20480) THEN c = 1 ELSE c = 0 ' Down-arrow.
IF _KEYDOWN(19200) THEN d = 1 ELSE d = 0 ' Left-arrow.
IF INKEY$ = CHR$(32) THEN e = 1: SOUND 1000, .1 ELSE e = 0 ' Space bar.
LOCATE , 1: PRINT "Arrow up key ="; a;
LOCATE , 19: PRINT "Arrow rt key ="; b;
LOCATE , 37: PRINT "Arrow dn key ="; c;
LOCATE , 55: PRINT "Arrow lt key ="; d;
LOCATE , 73: PRINT "Space bar ="; e;
LOOP
Thanks for checking into this, guys. I think it should be reported as a bug and as Rho pointed out, there are apparently other issues that need to be addressed in the QB64 keyboard functions.
Pete