SFML community forums

General => Feature requests => Topic started by: MrDoomMaster on February 04, 2008, 07:57:03 pm

Title: Automatic key repeat
Post by: MrDoomMaster on February 04, 2008, 07:57:03 pm
Hi,

I would like to request a method off of sf::Window that provides the user the ability to enable or disable automatic key repeat. When a key is held down, the user constantly receives KeyPressed messages. I would like an option to disable the automatic generation of these messages.

For now I have to have an external array of booleans representing which key is already held down, and ignore the message if that key is held down. This isn't an ideal solution, as I believe SFML could (and should) handle this better.

From a design standpoint having such an option would be more efficient as well, since the messages wouldn't need to travel as far before being ignored.

Thanks!
Title: Automatic key repeat
Post by: Laurent on February 05, 2008, 02:21:30 am
Yep, it could be done. I'll check this ;)
Title: Automatic key repeat
Post by: prchakal on December 12, 2008, 04:42:30 am
Anyone have a solution for it?
Title: Automatic key repeat
Post by: Laurent on December 12, 2008, 07:57:18 am
This is already implemented.
Title: Automatic key repeat
Post by: Pol on August 13, 2009, 04:08:58 pm
What about setting up a delay and interval like at http://www.libsdl.org/cgi/docwiki.cgi/SDL_EnableKeyRepeat ?
Title: Automatic key repeat
Post by: Laurent on August 13, 2009, 05:17:53 pm
SFML lets the OS handle the delay and interval, so this is perfectly consistent with the user's configuration.