[Scummvm-devel] Simplifying keyboard repeat
eriktorbjorn at telia.com
Fri May 12 11:31:18 CEST 2006
One thing that has been bothering me is that currently, the ScummVM GUI
along with *some* of the engines have their own custom code for handling
keyboard repeat. It seems to me that this could be made much simpler by
declaring it the backend's responsibility. In the SDL backend, this is
trivial: simply call SDL_EnableKeyRepeat().
I submitted a patch earlier today to do that, and remove all the custom
keyboard repeat code I could find.
What I would like to know is how this would affect other backends. From
what I understand, most of them are for platforms that do not even have
a keyboard, so a virtual one is used instead. Does that one handle
keyboard repeat at all? There's the X11 backend, of course, but I don't
know how much work it would be to fix it. Probably not much.
The main use for keyboard repeat is, of course, when entering the name
of a savegame. In particular, it's nice if the backspace key repeats. If
it turns out that there are cases where keyboard repeating is not
desirable, it should be easy to make it a property that can be turned on
or off at will.
Does anyone have any strong feelings for or against this? I assume there
has to be *some* reason why we don't do this already.
More information about the Scummvm-devel