VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Change the Keyboard Speed and Delay

Joshua Moore  (1 Submission)   Games   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This code allows you to change the Keyboard speed (0 to 31) and delay (0 to 3).. useful in games or as an alternative to using the keyboard control panel.

Assumes
In your own code use SetFastKeyboard() to change to your new speed and RestoreKeyboard() to change back to thier previous defaults.

Side Effects
On my computer when my old settings are restored they are restored to speed 0 and delay 0.. after much research i determined that the value being read from the API is 0 and 0.. or my variables can't hold the values being returned.. Anyone with more info on the API or the syntax of SPI_GETKEYBOARDDELAY and SPI_GETKEYBOARDSPEED please email me.. :)

API Declarations
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Public Const SPI_GETKEYBOARDDELAY = 22
Public Const SPI_GETKEYBOARDSPEED = 10
Public Const SPI_SETKEYBOARDDELAY = 23
Public Const SPI_SETKEYBOARDSPEED = 11
Public Const SPIF_SENDCHANGE = 1
Public OldKeySpeed As Long
Public OldKeyDelay As Long

Rate Change the Keyboard Speed and Delay (38(38 Vote))
Change the Keyboard Speed and Delay.bas

Change the Keyboard Speed and Delay Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters