I have this simple hot key to mute the volume

ScrollLock::Send {Volume_Mute}

It works but I want to add the Ctrl key so that I have to press Ctrl + ScrollLock to activate {Volume_Mute}. How do you do it?

I tried ^ScrollLock::Send {Volume_Mute} but it doesn't work.


Hotkeys can be triggered by using the 3-digit hexadecimal scan code (SC) of a key:

; Ctrl + ScrollLock
^SC046::Send {Volume_Mute}

in the rare case where a key has no name or the standard code doesn't work.

The scan code of a key can be determined by following the steps at Special Keys:

  • Run a script with keyboard hook
  • open the AutoHotkey window (context menu in systray, Open item)
  • go to View > Key History and script info
  • type the key
  • hit F5 to see the code
| improve this answer | |
  • That worked but I forgot to mention that I have a previous hotkey also for ScrollLock. Basically, I need this ScrollLock::Send {Volume_Down} and another hotkey with Ctrl like that of yours ^SC046::Send {Volume_Mute}. Is that possible? – IMB May 13 at 22:00
  • 1
    Try SC046::Send {Volume_Down}(replace all ScrollLock with SC046 in the script). – user3419297 May 13 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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