No Key Repeat on cursor keys

BlitzMax Forums/BlitzMax Programming/No Key Repeat on cursor keys

Grey Alien(Posted 2008) [#1]
If you use GetChar(), and hold a key down it will repeat. This is fine for letters and numbers but it doesn't work for the arrow keys. I'll have to program my own key repeat code I guess. Now what would be handy is a way to get the Windows key repeat values (initial delay and then delay between each letter) so that they can be used seamlessly in the game (in case users have set theirs fast, like me, or slow due to old age/disability).


TartanTangerine (was Indiepath)(Posted 2008) [#2]
All in the registry my dear watson.

# Open up the "HKEY_CURRENT_USER\Control Panel\Keyboard" Section of the registry.
# Look at the KeyboardSpeed Value and KeyboardDelay values

:)


Grey Alien(Posted 2008) [#3]
Thanks Indiepath. Now all I need is some code to retrieve registry values. I wonder if it's built into BMax? ...


rs22(Posted 2008) [#4]
It's not built-in, but there's some handy code in the archives: http://www.blitzbasic.com/codearcs/codearcs.php?code=1991


Grey Alien(Posted 2008) [#5]
thanks Robbie.