Hmm, complicated !
.....
See the output of the modified example program below when run on my Linux desktop machine. I believe it shows that the problem is that KeyInput.Up() is actually the equivalent to a KeyInput.Down(). Presumably because is_press = (boolean)True (key down) is interpreted as is_press = (boolean32)False (key up).
Hmm, I don't see that on my system. One triggers a stream of events, the other cancels that stream. They are not interchangeable.
3. Yes the repetition of the key down event is due to the autorepeat feature. But it should not occur in a KeyInput.Press() (as per your point 4) and it definitely should not occur in KeyInput.Up().
OK, thats interesting, I do not see it (the event stream) after a KeyInput.Press(), for me, it only happens when I do a KeyInput.DOWN, so not for a KeyInput.UP and not for a KeyInput.PRESS. Note that the original poster of this thread apparently did see the event stream after an ordinary KeyInput.PRESS, the last one in a sequence.
That just might be the core difference between what you see and what I see.
If setting the type of is_press to boolean32 solves the problem experienced in some circumstances without causing problems elsewhere, would it no be prudent to do that? Of course, I differ to your judgment if there is a reason to use type boolean.
OK, first, don't differ to my judgment, I have neither the knowledge nor the authority. Just another user like yourself. Just trying to help you refine the bug report so to increase it likelyhood of getting fixed.
Just fixing it by replacing the boolean ? The devs, quite rightly, like to understand the issue before acting. When playing with compilers and libraries, the side effect can be very off to one side and not show up until much later. But that said, I think you may well be right !
I suspect your report should not worry too much about KeyDown (although perhaps mention KeyUP in passing) the issue of PRESS is far clearer and easy to understand. The fact that it only shows up on some systems is a worry and must be mentioned because an exulted dev could test, not see it and dismiss your report.
I'll test on a few more platforms to help clarify that varying mileage issue .....
So, lets drill down on these results, here is what I see if I press the three buttons other than KeyDown(VK_Insert)
------ Press(VK_V)
KeyDown: 86, []
Keypress: 118
KeyUp: 86, []
------- Press(VK_INSERT)
KeyDown: 45, []
KeyUp: 45, []
------- Up(VK_INSERT)
(nothing)
(results for boolean32 removed)
When is_press type is boolean
$ ./showkeys
KeyUp: 13
KeyInput.Press(VK_B) -- This is as expected but where is "KeyPress: xx"
KeyDown: 66
KeyUp: 66
KeyInput.Press(VK_INSERT) -- this is an anomaly
KeyDown: 45
KeyDown: 45
KeyDown: 45
KeyDown: 45
...
KeyDown: 45
KeyDown: 85
KeyUp: 85
KeyInput.Up(VK_INSERT) -- this is an anomaly
KeyDown: 45
KeyDown: 45
KeyDown: 45
KeyDown: 45
...
KeyDown: 45
KeyDown: 85
KeyUp: 85
KeyInput.Down(VK_INSERT) -- This is as expected
KeyDown: 45
KeyDown: 45
KeyDown: 45
KeyDown: 45
...
KeyDown: 45
KeyDown: 85
KeyUp: 85