hi all,
i hope someone can help me with a problem with SDL_GetKeyState.
I use a small routine like this:
…
keys = SDL_GetKeyState(NULL);
if(keys[SDLK_SPACE])
{
if(!jump)
{
jump=true;
jump_idx = 0;
}
}
if(keys[SDLK_UP])
{
map_yoff-=inc;
}
if(keys[SDLK_DOWN])
{
map_yoff+=inc;
}
if(keys[SDLK_RIGHT])
{
map_xoff+=inc;
}
if(keys[SDLK_LEFT])
{
map_xoff-=inc;
}
…
UP,DOWN,RIGHT,LEFT,SPACE and all Combinations are recognized - except
UP+LEFT+SPACE - it doesn’t seem to work. I can’t imagine what’s the different
with this combination - is this a sdl problem, or are there better
ways to check key-combinations ?
From: hendrik.huettemann@t-online.de (Hendrik)
To:
Sent: Wednesday, May 19, 2004 1:40 PM
Subject: [SDL] problems with SDL_GetKeyState
hi all,
i hope someone can help me with a problem with SDL_GetKeyState.
I use a small routine like this:
…
keys = SDL_GetKeyState(NULL);
if(keys[SDLK_SPACE])
{
if(!jump)
{
jump=true;
jump_idx = 0;
}
}
if(keys[SDLK_UP])
{
map_yoff-=inc;
}
if(keys[SDLK_DOWN])
{
map_yoff+=inc;
}
if(keys[SDLK_RIGHT])
{
map_xoff+=inc;
}
if(keys[SDLK_LEFT])
{
map_xoff-=inc;
}
…
UP,DOWN,RIGHT,LEFT,SPACE and all Combinations are recognized - except
UP+LEFT+SPACE - it doesn’t seem to work. I can’t imagine what’s the
different
with this combination - is this a sdl problem, or are there better
ways to check key-combinations ?