[SDL] KeyRepeat fix

David Olofson david at olofson.net
Sun Jan 2 11:01:27 PST 2005


On Sunday 02 January 2005 19.37, Jon Daniel wrote:
> On Sun, 2 Jan 2005 19:22:54 +0100, David Olofson wrote:
> > Actually, one might want to go one step further: If key 'A' is
> > repeating, one should be able to press 'B' until it starts
> > repeating, and when 'B' is released, 'A' should start repeating
> > again. That requires a great deal of extra logic, though, and if
> > you really need that kind of behavior, you should probably
> > implement your own repeat logic anyway. (I would like it if text
> > editors did that with the cursor keys, though...)
>
> I thought about a fully customizable KeyRepeat implementation too.
> You could turn on/off repeat for every single key and individually
> adjust delay and interval. You would be able to create an optional
> autofire button with adjustable fire rate easily.

Yeah, that would be nice, but since even basic keyboard repeat is out 
of scope of SDL (it's not wired to the keyboard repeat APIs on any 
OS, AFAIK), I think that would be better off as an add-on library 
than an API extension.

Then again, if it's simple and useful enough...


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---




More information about the SDL mailing list