[Scummvm-devel] Simplifying keyboard repeat
marcus at mc.pp.se
Tue May 16 12:10:49 CEST 2006
David Given <dg at cowlark.com> writes:
> Small point of information: some platforms are exceptionally unfriendly when
> it comes to key repeat. X, for example. When you hold down a key on X, what
> you get is DOWN (long pause), UP, DOWN (short pause), UP, DOWN (short
> pause)... which means that any code which *doesn't* want to be notified of key
> repeats is basically screwed. You end up having to do trickery with the event
> timestamps to try and remove the extraneous UP events. I don't know if any
> other platforms do this, but this one's bitten me in my real life job.
Well, you can get rid of that with XAutoRepeatOff(dpy), no?
(In the olden days of X, I don't think you got any extra UP events
due to key repeat, just extra DOWNs. Either my memory is bugged,
or they changed this, possibly when they introduced XKB...)
More information about the Scummvm-devel