Advertisement
7_2009-2012 Games #217663

Change the Keyboard Speed and Delay

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.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Sub SetFastKeyboard()
 Dim Retcode As Long
 Dim FastKeySpeed As Long
 Dim FastKeyDelay As Long
 Dim dummy As Long
 FastKeySpeed = 31
 FastKeyDelay = 0
 dummy = 0
 
 Retcode = SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, OldKeySpeed, 0)
 Retcode = SystemParametersInfo(SPI_GETKEYBOARDDELAY, 0, OldKeyDelay, 0)
 Retcode = SystemParametersInfo(SPI_SETKEYBOARDSPEED, FastKeySpeed, dummy, SPIF_SENDCHANGE)
 Retcode = SystemParametersInfo(SPI_SETKEYBOARDDELAY, FastKeyDelay, dummy, SPIF_SENDCHANGE)
End Sub
Sub RestoreKeyboard()
 Dim Retcode As Long
 Dim dummy As Long
 dummy = 0
 Retcode = SystemParametersInfo(SPI_SETKEYBOARDSPEED, OldKeySpeed, dummy, SPIF_SENDCHANGE)
 Retcode = SystemParametersInfo(SPI_SETKEYBOARDDELAY, OldKeyDelay, dummy, SPIF_SENDCHANGE)
End Sub
Upload
Původní komentáře (3)
Obnoveno z Wayback Machine