Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preventing Auto Key Repeat (spacebar)
#1
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
#2
Keyboard repeat delay and repeat rate can be changed in Control Panel and with function SystemParametersInfo (look in MSDN).
#3
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
Code:
Copy      Help
int und
SystemParametersInfo SPI_GETKEYBOARDCUES 0 &und 0
if(und) c5Sho=1

Thanks again for getting me on the right track!!!!

Stuart
#4
Function FilterKeysOnOff
Code:
Copy      Help
;/
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
#5
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


Forum Jump:


Users browsing this thread: 1 Guest(s)