Possible buggy Keyboard on Linux

Every key press is triggered twice and then repeatedly release and press occurs after attaching event listeners for KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP.

This occurs on neko and linux targets (and including “HandlingKeyboardEvents” example).
On HTML target all is working correctly (“down” occurs while key is pressed, and then “up” once on release).

haxelib: [3.3.0]
hxcpp: [3.3.49]
lime-samples: [3.4.0]
lime: [3.4.1]
openfl-samples: [4.4.0]
openfl: [4.4.1]

We’ll look into it, we recently upgraded SDL, maybe there’s a regression, thank you

Depending on your OS’s keyboard settings, you can get repeating KEY_DOWN events for as long as you hold the key. However, this would apply to all targets, not just two, and it wouldn’t generate KEY_UP events.

(This almost certainly doesn’t apply to you, but I’m leaving it here in case someone else finds it.)

The events appear to be coming through correctly on Windows, but Linux is behaving strangely. Down triggers twice, then holding repeatedly triggers down and up events. Strange!

This might be the fix?

It mentions “if built without IBus or FCITX”, perhaps we should change our build script instead of moving to a newer version? How well supported are IBus and/or FCITX? Using one (I think) might improve support for complex text input, so its worth considering an extra dependency here.

Let me know if you have any idea if we want to require one of these, thanks :slight_smile:

Okay! Updated SDL, and this is fixed now

I decided not to include ibus for now, it requires dbus, which requires pkg-config to get proper include paths. This complicates the build, but maybe we still want to look at this in the future

Thank you, I can confirm the fix :slight_smile: