Easily Adjusting the Volume With Hotkeys (Win 7)

Hello there and welcome to my first instructable!
In this instructable I will demonstrate how to adjust the volume with just a hotkey.
I will be doing this in windows 7.

What you will need.

  • Autohotkey [Download Link]
  • A Text Editor. For now since you are just starting with autohotkey the Notepad will do.
This is a very simple app script!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Install Autohotkey

Now open the downloaded files and install it normally.

Custom or Express doesn't matter. Just Install it.

Step 2: Determine the Hotkey.

Now determine the hokey you want to adjust the volume.
  • Ctrl + ↑ for Volume Up.                        
  • Ctrl + ↓ for Volume Down.
  • Some other Key for Mute.
On second thought lets use Right Control instead of both controls. You see when we use control both keys are added as hotkeys.
The Second Key is Up. So it will be:

RControl & Up

In autohotkey you have to use ampersand(&) between the two key names if you want  a combination hotkey.
If you dont want to use the ampersand you can use the symbols.

# is Windows Key.
+ is Shift Key.
! is Alt Key.
^ is Control Key.
< or > stands for left or right. Not the arrow keys but Left or Right of the above
mentioned keys. ( <^ is Left Control )

List of Keys [link]

So its either:
RControl & Up or <^Up

Note: It doesn't Necessarily have to be two keys. It can be one key. But it will 
be a bother when you do tasks and have to press the key to do something else. 

Step 3: Open the Editor.

Open your editor. I will be using sciTE4Autohotkey since I use autohotkey pretty often.
If you want to download: [link]

Scite offers special tools and functions and is very easy to use. If you will continue on with scripting with
autohotkey you would definitely want to check it out. 

I use it all the time! :3

Step 4: Scripting!

Lets start scripting.
Add the first line.


So that a tray icon wont be seen.

Now add the hotkey. Remember? We went through this in step 3. 
Oh! And add two colons(:) after it. That is to tell authotkey to run the codes after it when the key is pressed.
If the "~" symbol is present the hotkey will not be hidden from the system.

~RControl & Up::

This is the Volume up hotkey right ? So we send Volume Up.
The "2" is how many levels to move up.

Send {Volume_Up 2}

Now add:


The use I will skip for now.

Now your script will look like this:

~RControl & Up::
Send {Volume_Up 2}

Now add the Volume down hotkeys as well.

~RControl & Down::
Send {Volume_Down 2}

Now the Mute Hotkey. The only difference is that we will enter "Send {Volume_Mute}".

~RControl & Space::
Send {Volume_Mute}

Step 5: Save!

Now the script should look like this:


~RControl & Up::
Send {Volume_Up 2}

~RControl & Down::
Send {Volume_Down 2}

~RControl & Space::
Send {Volume_Mute}

Now goto Save as and Save it as a .ahk file.

Step 6: Add It to Startup!

Now if you want this script to start automatically just copy the script to your startup folder.

C:\Users\%Username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

If you want the script to start for the current user only. ( Replace %Username% with your username )

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\

If you want the script to start for all the users.


Add a Registry Key (For advanced users only.)

Add A String Value with the directory as the data to
f you want the script to start for the current user only.
f you want the script to start for all the users.

Step 7: Finishing Off!

Here! I made an awesome version which uses the mouse's scroll.
It will work when the mouse is over the taskbar!
Middle Button( Scroll Press) to Mute!

If MouseIsOver("ahk_class Shell_TrayWnd")
    Send {Volume_Up 2}
  Send, {WheelUp}

If MouseIsOver("ahk_class Shell_TrayWnd")
    Send {Volume_Down 2}
  Send, {WheelDown}

If MouseIsOver("ahk_class Shell_TrayWnd")
    Send {Volume_Mute}

MouseIsOver(WinTitle) {
    MouseGetPos,,, Win
    return WinExist(WinTitle . " ahk_id " . Win)

Enjoy! :)

Be the First to Share


    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    3 Discussions


    5 years ago on Introduction

    I sort of got this to work but if a youtube video is too loud, I have to click on the desktop to be able to use my hotkey. Is there a way to fix that? Thanks!