Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
It might help to specify what the desired response is (e.g. in what application?). – Gilles Aug 7 '10 at 9:33
@Gilles; There's a "manual BSOD" function in windows activated by holding right control and double tapping scroll lock. Perhaps the asker wants an extreme boss key? – Phoshi Aug 7 '10 at 10:33
@Phoshi I am working with the manual BSOD lol but not for an extreme boss key. – MrStatic Aug 7 '10 at 23:55
up vote 3 down vote accepted

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).

share|improve this answer
Thanks I will try the delay and no not a KVM. I am trying to BSOD a test machine with the MS regedit. – MrStatic Aug 7 '10 at 23:54
@MrStatic: there's a good chance that the key combination is intercepted directly in the keyboard driver, at a lower level than AutoHotkey's key injection. There may be a way to generate a manual BSOD through an API call rather than the keyboard driver, you could try asking that question. If there isn't you could run your test system in a virtual machine and send the keyboard events from outside the VM. – Gilles Aug 8 '10 at 11:40
Thanks, I gave you an upvote but can't accept. I will probably end up asking the new question. – MrStatic Aug 8 '10 at 14:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.