Autohotkey simulate scroll lock being pushed twice

Basically I am trying to write a script that will simulate holding down control and pushing scroll lock twice. I just can't seem to get it right.


Send, {Ctrl Down}{ScrollLock}
Send, {ScrollLock}{Ctrl Up}


Send, {Ctrl Down}{ScrollLock}{ScrollLock}{Ctrl Up}

But neither trigger the desired response.

Solution 1:

Wild guess: maybe the application requires a delay between the presses. Try adding Sleep 1000 (1 second, if it works you can try shortening the delay) between the two Send commands.

Second wild guess: are you trying to get a KVM to react? If so, Autohotkey won't help directly, because it simulates keyboard events at the OS level, not the keyboard level. (I've seen KVMs that require two Scroll Lock presses with a little delay, but they don't need Ctrl, they react on the LED changes rather than the key presses).