QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: luke on January 12, 2021, 10:55:12 pm
-
I'm planning to do a pass through the input handling code (mainly keyboard) soon and I'd like to kill a few birds with one stone. I'm vaguely aware there are several issues with input handling, but the only one I've got a definite record of is https://github.com/QB64Team/qb64/issues/101
If you could post any input bugs you've found below, I'll collate them and attempt to work through them together.
Please keep this to reproducible examples; code demonstrating a problem is much easier for me to deal with than paragraphs of prose.
-
I still use v1.3, but since then, did anyone remove the chr$(27) left arrow that appears if you press the Esc key while in a LINE INPUT statement?
Pete
-
Here's one that's currently affecting me:
ALT + Numpad keys
N = _NUMLOCK
DO
k = _KEYHIT
IF _NUMLOCK = 0 THEN _NUMLOCK ON
IF _KEYDOWN(100308) THEN
IF k <> 0 THEN
PRINT k,
IF ABS(k) < 255 THEN PRINT CHR$(ABS(k)) ELSE PRINT
END IF
END IF
_LIMIT 30
LOOP UNTIL k = 27
IF N = 0 THEN _NUMLOCK OFF
Run the test code and hold down the ALT key, while hitting the keys on the number pad.
The only values you'll get as a trigger is the key up values (the negative numbers), with NO key down values. Press and hold the key as long as you like -- there's no value for them until you let up on the key.
Which makes it kind of difficult to code Alt-### entry for ASCII codes for an input routine. (Alt-158 to insert CHR$(158) into an user input, for example.)
I run into these type issues all the time with QB64's current input handlers, and have to try and hack some sort of work-around to make my code work as intended. :P