SDL_Keys weird stuff

I am running XFree86 version 4.0 and SDL 1.1.2
I am trying to capture this sequence of keys SDLK_UP & SDLK_LEFT &
SDLK_SPACE.

I am using the function SDL_GetKeyState(NULL) to return a Uint8 *.
I am calling SDL_PumpEvents();
and all of the other key combinations I try to recognize work properly.

This is the only one giving me trouble.

My code checks for each possible key in a series of if statements. (No
else if’s)

Sometimes the X server complains about a weird keystroke being recieved
that it wasn’t ready for.

Is this an X configuration problem or is it SDL?

Dave

“Dave” == Dave writes:

I am running XFree86 version 4.0 and SDL 1.1.2 I am trying to
capture this sequence of keys SDLK_UP & SDLK_LEFT & SDLK_SPACE.

Just a thought… I seem to remember that there are certain
combinations of keys (keyboard manufacturer/model dependent, of
course) which the keyboard is simply unable to generate properly.

Don’t remember where I heard this or any other details, sorry.

You may want to try testing your code on MSWin with your keyboard;
if it works under Windows, the fault is probably the X server’s; if it
doesn’t work, try a different keyboard. 8^)

=wl
Hydraulic pizza oven!! Guided missile! Herring sandwich! Styrofoam!
Jayne Mansfield! Aluminum siding! Borax! Pedal pushers! Jukebox!–
Albert ``Willy’’ Lee, Emacs user, game programmer
"They call me CRAZY - just because I DARE to DREAM of a RACE of
SUPERHUMAN MONSTERS!"

Willy Lee wrote:

“Dave” == Dave writes:

Just a thought… I seem to remember that there are certain
combinations of keys (keyboard manufacturer/model dependent, of
course) which the keyboard is simply unable to generate properly.

Don’t remember where I heard this or any other details, sorry.

The way most keyboards work, holding down too many keys will cause
the generation of ‘ghost’ scancodes. The ‘gray’ keys (cursors,
shift, ctrl, alt etc…) are generally free from this annoying
effect.

<OldTimer_Mode>
I remember this used to be a really bad problem on the Amiga 1200,
as it would generate ghost scancodes at the slightest provocation.
It was a really pain trying to come up with good key controls for
games.
The (earlier) Amiga 500 was a lot better in this respect.
</OldTimer_Mode>

Ben.–
Ben Campbell (Antipodean Straggler)
Programmer, Creature Labs
ben.campbell at creaturelabs.com
www.creaturelabs.com

Yes, the keyboard on one of my boxes will not do UP LEFT and SPACE at
the same time (which is very annoying). This is why a lot of games
also allow the use of the keypad for directional control. I’ve never had
a problem with the keypad and SPACE not working together.

ttfn,
JohnOn Tue, May 09, 2000 at 09:59:17PM -0700, Willy Lee wrote:

“Dave” == Dave writes:

I am running XFree86 version 4.0 and SDL 1.1.2 I am trying to
capture this sequence of keys SDLK_UP & SDLK_LEFT & SDLK_SPACE.

Just a thought… I seem to remember that there are certain
combinations of keys (keyboard manufacturer/model dependent, of
course) which the keyboard is simply unable to generate properly.

Don’t remember where I heard this or any other details, sorry.

SOunds like I should use the keypad to make this work. Thanx

DaveOn Wed, 10 May 2000 johnm at victoriareal.co.uk wrote:

On Tue, May 09, 2000 at 09:59:17PM -0700, Willy Lee wrote:

“Dave” == Dave writes:

I am running XFree86 version 4.0 and SDL 1.1.2 I am trying to
capture this sequence of keys SDLK_UP & SDLK_LEFT & SDLK_SPACE.

Just a thought… I seem to remember that there are certain
combinations of keys (keyboard manufacturer/model dependent, of
course) which the keyboard is simply unable to generate properly.

Don’t remember where I heard this or any other details, sorry.

Yes, the keyboard on one of my boxes will not do UP LEFT and SPACE at
the same time (which is very annoying). This is why a lot of games
also allow the use of the keypad for directional control. I’ve never had
a problem with the keypad and SPACE not working together.

ttfn,
John