Here's the IRC transcript from around the time this bug was added:

<SiegeLord> Hmm... keyboard events are messed up in A4.9 for me... instead of it going _KEY_DOWN -> _KEY_REPEAT -> _KEY_UP it just alternates down/up when the key is pressed
<Tomasu>  SiegeLord: something else is doing key repeating then?
<SiegeLord>       What else could it be?
<Tomasu>  win32 doing repeating?
<SiegeLord>       Oh, forgot to specify... this is under Linux
<Tomasu>  oh, so X then
<SiegeLord>       Huh
<SiegeLord>       So... what would I fix for that?
<SiegeLord> XkbSetDetectableAutoRepeat doesn't fail... I thought it was mean to prevent this
*       Sevalecan is fat
<SiegeLord>       Oh, it seems that it's a bug in X.org
<allefant>        SiegeLord: check what xev reports
<SiegeLord>       Alternating key pressed/released events
<allefant>        if that has no repeats we can't really get them either
<allefant>        unless we re-add the A4 hack to detect them
<allefant> which considers a release/press as repeat if it is in very short time, i think 4ms
<SiegeLord>       Irrlicht had a similar problem
<SiegeLord> The worked around it by peeking the next event, and seeing if it was a release event with the same keycode

I think it's probably safe to remove this. I was using Ubuntu back then, and it's been 6 years since that time. I'm sure this X11 bug is fixed now.

-SL

On 08/16/2015 12:02 AM, Trent Gamblin wrote:
Is there any downside of calling XkbSetDetectableAutoRepeat? It's
commented out. What happens on those X servers where it's broken? I've
attached a patch. It uncomments that, and also does a slightly better
job in cases where detectable auto-repeat isn't enabled.

Trent

On 15-08-15 11:57 PM, Trent Gamblin wrote:
Appears to be this 4ms value in xkeyboard.c... I will play around with
this.

-----Original Message-----
From: Allegro-developers [mailto:[email protected]]
On Behalf Of Trent Gamblin
Sent: August 15, 2015 11:49 PM
To: [email protected]
Subject: [AD] Possibly major bug on Linux

Got a bug report about some weird behaviour of my game, got to
investigating...

Running ex_keyboard_events, if I hold down a key, I get random KEY_UP
followed by KEY_DOWN events admidst the stream of KEY_CHAR events. In
my case, this is very bad... This happens between somewhat frequently
to somewhat infrequently. In some cases it takes a minute between
these errors and sometimes it's every few seconds. It seems to happen
with different keys, I tested LEFT, RIGHT and SPACE. Can anyone
confirm this or give a reason for it?

_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers


_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers



_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers


_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers

Reply via email to