QB64 bug or exception?
#9
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...

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
Reply


Messages In This Thread
QB64 bug or exception? - by Pete - 10-03-2022, 07:30 AM
RE: QB64 bug or exception? - by RhoSigma - 10-03-2022, 07:49 AM
RE: QB64 bug or exception? - by Pete - 10-03-2022, 11:11 AM
RE: QB64 bug or exception? - by James D Jarvis - 10-03-2022, 11:11 AM
RE: QB64 bug or exception? - by Pete - 10-03-2022, 11:19 AM
RE: QB64 bug or exception? - by James D Jarvis - 10-03-2022, 11:25 AM
RE: QB64 bug or exception? - by bplus - 10-03-2022, 02:46 PM
RE: QB64 bug or exception? - by TerryRitchie - 10-03-2022, 03:35 PM
RE: QB64 bug or exception? - by Pete - 10-03-2022, 05:22 PM
RE: QB64 bug or exception? - by James D Jarvis - 10-03-2022, 11:44 PM
RE: QB64 bug or exception? - by Pete - 10-04-2022, 12:10 AM
RE: QB64 bug or exception? - by James D Jarvis - 10-04-2022, 12:35 AM
RE: QB64 bug or exception? - by Pete - 10-04-2022, 12:52 AM
RE: QB64 bug or exception? - by mnrvovrfc - 10-04-2022, 02:05 AM



Users browsing this thread: 2 Guest(s)