I’ve found it useful to fetch the key repeat state so that various
libraries for GUI elements can cooperate with the application utilizing
them (that is to say, restore the host application’s key repeat state
once GUI elements no longer possess “keyboard focus.”) This patch is
based on the source code release of SDL 1.2.8, but I doubt this code
has changed much.
SDL-1.2.8$ diff src/events/SDL_keyboard.c.original
src/events/SDL_keyboard.c
571a572,578
void SDL_GetKeyRepeat(int *delay, int *interval)
{
*delay = SDL_KeyRepeat.delay;
*interval = SDL_KeyRepeat.interval;
return;
}
SDL-1.2.8$ diff include/SDL_keyboard.h include/SDL_keyboard.h.original
91d90
< extern DECLSPEC void SDL_CALL SDL_GetKeyRepeat(int *delay, int
*interval);