Posts: 1,006
	Threads: 330
	Joined: Mar 2007
	
	
 
	
	
		Hi,
The auto key repeat function in Windows (XP) is screwing up the wait and ifk statements in some of my macros when I try to set the keyboard trigger to spacebar. Does anyone know of a way of disabling this within WIndows or with a QM function?
THanks so much!!!
STuart
	
	
	
	
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		Keyboard repeat delay and repeat rate can be changed in Control Panel and with function SystemParametersInfo (look in MSDN).
	
	
	
	
	
 
 
	
	
	
		
	Posts: 1,006
	Threads: 330
	Joined: Mar 2007
	
	
 
	
	
		Thanks Gintaras,
Some progress based on your tip:
I actually need to turn off key repeat altogether not just slow down the repeat rate or repeat delay which are the parameters available from the Keyboard area of the Control Panel. It turns out the answer is in the FilterKeys function of the Accessibility Options of the Control Panel
Control Panel --> Accessibility Options --> Keyboard Tab --> FilterKeys (check) --> Settings --> Ignore quick keystrokes and slow down the repeat rate --> Settings --> No Keybaord repeat --> SlowKeys: Keys must be held down for: 0.0 seconds.
If you do all this, the regular ifk and wait K statesments work fine but now I have to figure out a way to turn on this filterkeys option. It would be great to do it in a QM script fashion (note when filterkeys is on, there is a "stopwatch" icon that shows up in the taskbar).
I did look in MSDN and found the parameters for #SystemParametersInfo uAction uParam lpvParam fuWinIni 
http://msdn.microsoft.com/en-us/library/...S.85).aspx
but don't yet know how to set these programatically in QM or otherwise. (though I did see how you used it in TO_Menu
Function 
TO_Menu 
int und
SystemParametersInfo SPI_GETKEYBOARDCUES 0 &und 0
if(und) c5Sho=1
Thanks again for getting me on the right track!!!!
Stuart
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		Function 
FilterKeysOnOff 
;/
function !on
;Turns on or off the "Filter keys" Windows accessibility feature.
;Does not change its parameters. You can change it in Control Panel.
;on - 1 on, 0 off.
FILTERKEYS f.cbSize=sizeof(f)
SystemParametersInfo SPI_GETFILTERKEYS 0 &f 0
if on
,if(f.dwFlags&FKF_FILTERKEYSON) ret
,f.dwFlags|FKF_FILTERKEYSON
else
,if(f.dwFlags&FKF_FILTERKEYSON=0) ret
,f.dwFlags~FKF_FILTERKEYSON
SystemParametersInfo SPI_SETFILTERKEYS 0 &f 0
 
 
	
	
	
		
	Posts: 1,006
	Threads: 330
	Joined: Mar 2007
	
	
 
	
	
		thanks so much...this works great for turning on/off pre-defined FilterKeys settings. I will have to look some more in MSDN to see how to prospectively set FilterKey settings.
Thanks!,
Stuart