Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Key Repeat Rate
Message
From
12/12/2000 20:14:39
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00452592
Message ID:
00452654
Views:
23
>>>I've got a grid I need to slow down due to the key-repeat rate being too high. If anyone knows the API call to set the rate, let me know...
>>
>>There's no way to do it via Win32 that I know of. Like many other things in the control panel applets, this is generally something you don't want to mess with. I know if an app slowed down my keyboard without my permission, I'd be a little irked. :-)
>
>SystemParametersInfo() will do this - the repeat delay time is set with the SPI_SETKEYBOARDDELAY and the repeat rate is SPI_SETKEYBOARDSPEED; it's documented in the MSDN Platform SDK docs. The function is declared:
>

Correction:
DECLARE SHORT SystemParametersInfo IN WIN32API ;
   INTEGER uiAction, ;
   INTEGER uiParam, ;
   INTEGER @ pVoid, ;
   INTEGER fWinINI
#DEFINE SPI_SETKEYBOARDSPEED  11
#DEFINE SPI_GETKEYBOARDSPEED  10
#DEFINE TWOPOINTFIVEREPSSEC 0
* Save current rep rate and decrease to 2.5 reps/sec
nRepRate = 0
=SystemParametersInfo(SPI_GETKEYBOARDSPEED,0,@nRepRate,0)  && save rep rate
=SystemParametersInfo(SPI_SETKEYBOARDSPEED,TWOPOINTFIVEREPSSEC,0,0)  && repeat at 2.5 reps/sec
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform