SDL 1.3 and key repeating

Hello guys,

I see that SDL_EnableKeyRepeat seems to be deprecated in SDL 1.3,
since I can find it only in compatibility layer in SDL_compat.h

Ok anyway it seems to work for TextInput events, but for some other
keys that won’t push TextInput event but rather KeyboardEvent are
ignoring the repeat settings. For example if I hold “A” on my keyboard
it starts repeating, but if I hold Left Arrow, it won’t.

Should I forget this function at all since it might get deleted from
SDL 2 and I need to implement it myself repeating events until key was
released?

thanks—
Pavel Kanzelsberger


E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633

Key repeat is still under evaluation, since it’s a case that sort of
breaks the abstraction between key presses and text input events.

Do people have an opinion on whether key repeat should repeat keys or
repeat text?On Wed, Apr 14, 2010 at 7:26 AM, Pavel Kanzelsberger wrote:

Hello guys,
I see that SDL_EnableKeyRepeat seems to be deprecated in SDL 1.3, since I
can find it only in compatibility layer in SDL_compat.h
Ok anyway it seems to work for TextInput events, but for some other keys
that won’t push TextInput event but rather KeyboardEvent are ignoring the
repeat settings. For example if I hold “A” on my keyboard it starts
repeating, but if I hold Left Arrow, it won’t.
Should I forget this function at all since it might get deleted from SDL 2
and I need to implement it myself repeating events until key was released?
thanks

Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org,?ICQ: 20990633


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

I think the important thing is that you can tell “real” key events from
repetitions. (So you don’t have to disable key repeat to track key state
properly…)

Does repeating keys mean the text is only available in the initial event? If
so, that would force text input code to cache text events to handle repeat,
which seems like complexity in the wrong place to me.On Friday 16 April 2010, at 07.34.53, Sam Lantinga wrote:

Key repeat is still under evaluation, since it’s a case that sort of
breaks the abstraction between key presses and text input events.

Do people have an opinion on whether key repeat should repeat keys or
repeat text?


//David Olofson - Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
’---------------------------------------------------------------------’

I guess the right thing to do is to have key repeat work the
traditional way, where it’s handled by the OS, and generates both key
events and possibly text events.On Thu, Apr 15, 2010 at 11:27 PM, David Olofson wrote:

On Friday 16 April 2010, at 07.34.53, Sam Lantinga <@slouken> wrote:

Key repeat is still under evaluation, since it’s a case that sort of
breaks the abstraction between key presses and text input events.

Do people have an opinion on whether key repeat should repeat keys or
repeat text?

I think the important thing is that you can tell “real” key events from
repetitions. (So you don’t have to disable key repeat to track key state
properly…)

Does repeating keys mean the text is only available in the initial event? If
so, that would force text input code to cache text events to handle repeat,
which seems like complexity in the wrong place to me.


//David Olofson - Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| ?http://olofson.net ? http://kobodeluxe.com ? http://audiality.org ?|
| ?http://eel.olofson.net ?http://zeespace.net ? http://reologica.se ?|
’---------------------------------------------------------------------’


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Hi,

that’s a good idea if you leave it for operating system, because they
usually have repeat settings defined by user and it should have same
behaviour as in other apps.

So should I wait for keyrepeat working soon or do I need to implement
it myself using timers?

PavelOn 16.4.2010, at 7:34, Sam Lantinga wrote:

Key repeat is still under evaluation, since it’s a case that sort of
breaks the abstraction between key presses and text input events.

Do people have an opinion on whether key repeat should repeat keys or
repeat text?

On Wed, Apr 14, 2010 at 7:26 AM, Pavel Kanzelsberger <@Pavel_Kanzelsberger wrote:

Hello guys,
I see that SDL_EnableKeyRepeat seems to be deprecated in SDL 1.3,
since I
can find it only in compatibility layer in SDL_compat.h
Ok anyway it seems to work for TextInput events, but for some other
keys
that won’t push TextInput event but rather KeyboardEvent are
ignoring the
repeat settings. For example if I hold “A” on my keyboard it starts
repeating, but if I hold Left Arrow, it won’t.
Should I forget this function at all since it might get deleted
from SDL 2
and I need to implement it myself repeating events until key was
released?
thanks

Pavel Kanzelsberger
http://www.kanzelsberger.com
E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pavel Kanzelsberger


E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633