SDL_EnableKeyRepeat (X)

Under framebuffer and X …

SDL_EnableKeyRepeat( 200, 25 );

Repeated keys behave badly in this sequence…
key 1 down ( repeats )
key 2 down ( repeats )
key 1 up ( ends key 2’s repeat )

Any key up message should not cause a forgetting of the current (last) key pressed…

do it anywhere - press and hold right arrow, then without releasing press left arrow… then release the right arrow, the cursor continues to move to the left…

Jim

  • :slight_smile: Look a new thread without being a responce to previous message

Jim wrote:

Under framebuffer and X …
SDL_EnableKeyRepeat( 200, 25 );
Repeated keys behave badly in this sequence…
key 1 down ( repeats )
key 2 down ( repeats )
key 1 up ( ends key 2’s repeat )

This isn’t strictly an SDL issue. I see the same behavior with xev.
I’m not sure if that’s an X Server bug or just a limitation with
XAutoRepeat{On|Off}. Presumably if this is the desired behavior then
SDL will have to synthesize its own repeated events instead of
trusting the X11 implementation.

Probably the easiest thing to do is just handle it yourself.

Andy–
Andrew J. Ross Beyond the Ordinary Plausibility Productions
Sole Proprietor Beneath the Infinite Hillsboro, OR
Experience… the Plausible?

SDL generates its own repeats… it would have to - every other X program
behaves differently (correctly?) which would be X itself generateing the
events… but under frame buffer also - this is definatly SDL’s key
repeating - since the system would only generate keys as often as the
keyboard does. I’d handle it myself - but seeing as to how it was already
done… I have enough other things to do.> ----- Original Message -----

From: andy@plausible.org (Andy Ross)
To:
Sent: Thursday, March 27, 2003 10:20 AM
Subject: Re: [SDL] SDL_EnableKeyRepeat (X)

Jim wrote:

Under framebuffer and X …
SDL_EnableKeyRepeat( 200, 25 );
Repeated keys behave badly in this sequence…
key 1 down ( repeats )
key 2 down ( repeats )
key 1 up ( ends key 2’s repeat )

This isn’t strictly an SDL issue. I see the same behavior with xev.
I’m not sure if that’s an X Server bug or just a limitation with
XAutoRepeat{On|Off}. Presumably if this is the desired behavior then
SDL will have to synthesize its own repeated events instead of
trusting the X11 implementation.

Probably the easiest thing to do is just handle it yourself.

Andy


Andrew J. Ross Beyond the Ordinary Plausibility Productions
Sole Proprietor Beneath the Infinite Hillsboro, OR
Experience… the Plausible?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl