You are not logged in.

#1 2016-11-19 18:44:26

ghast
Member
Registered: 2016-11-12
Posts: 2

[SOLVED] SDL2 gets wonky keypress events

A few weeks ago I realized that SDL2 apps behave weirdly on keypresses. Specifically, what happens is that each time I press a key, that genererates *two* KEYDOWN events instead of just one. Even weirder, if I hold a key down, then spurious KEYUP events appear alternating with the KEYDOWN events (down,up,down,up,etc)! What is going on? Does this happen to anybody else? It doesn't happen to me with SDL1 apps (or even non-SDL apps), just SDL2. I tried this on other PCs (all archlinux) at home and it doesn't happen, so there is something with this one archlinux box and SDL2.

I don't remember exactly when this started to happen, I think it was a few weeks ago, I discovered it while playing brutal-doom-64 (from AUR), while pressing ESC to activate the game menu I realized that the menu appeared and then immediately disappeared (due to the "double keypress"), very annoying.

Any ideas?

Last edited by ghast (2016-11-20 02:26:43)

Offline

#2 2016-11-19 22:17:14

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] SDL2 gets wonky keypress events

Offline

#3 2016-11-20 02:24:27

ghast
Member
Registered: 2016-11-12
Posts: 2

Re: [SOLVED] SDL2 gets wonky keypress events

spot on! after browsing the code of that bugfix I tried closing the FCITX input method (which I usually use on this box), and the bug disappeared. Will have to wait until an update of SDL2 I guess to get that fix. Meanwhile I will just do with closing FCITX.

thanks a lot!

btw, how did you know about that bugfix?

Offline

#4 2017-02-07 16:45:29

wheatdog
Member
Registered: 2016-08-31
Posts: 2

Re: [SOLVED] SDL2 gets wonky keypress events

I have the same problem! Closing fcitx did fix it. Is it a sdl2 bug or a fcitx bug?

Offline

Board footer

Powered by FluxBB