My keyboard has no volume control keys; how do I assign shortcuts to control the global sound volume?

14

4

My keyboard lacks any "multimedia" keys but I really want to have keyboard shortcuts for the global Volume Up, Volume Down, and Mute actions. What's the easiest way to program custom keyboard shortcuts to trigger these missing keys virtually?

I'm not asking about how to work with a particular application. I want to affect the master volume control, regardless of which application has focus.

Brendan Kidwell

Posted 2012-01-03T22:48:58.200

Reputation: 589

Question was closed 2015-02-09T18:52:21.550

Answers

24

Install AutoHotkey using the link called "Installer for AutoHotkey_L" at http://www.autohotkey.com/download/ .

Run AutoHotkey from your Start Menu to create a sample file called "AutoHotkey.ahk" in your "Documents" folder. Open "AutoHotkey.ahk" from your "Documents" folder in a text editor.

You can comment out all the sample commands by putting a ";" at the beginning of each line. Add the following text to the end of the file:

#,::Volume_Down
#.::Volume_Up
#/::Volume_Mute

These commands assign:
Win+, → Volume Down
Win+. → Volume Up
Win+/ → Volume Mute

If you want to use other keys, briefly read "Basic Usage and Syntax" in the help file -- particularly the subsection "Key List".

Create a shortcut in the "Startup" folder of your Start Menu pointing to your "AutoHotkey.ahk" file in your "Documents" folder, and run it. The script will run each time you log in.

If you change the contents of your script and want to recompile it: Log out and log back in; or right-click on the "AutoHotkey.ahk" icon in your system tray and click the Exit command, and then run the shortcut in your Startup folder again.

Brendan Kidwell

Posted 2012-01-03T22:48:58.200

Reputation: 589

@sky This answer is pretty useful: http://superuser.com/a/694773/74576

– Ryan – 2016-12-27T15:40:52.040

6Is there any way to accomplish this without AutoHotkey?(Something like registry editor...) As you know, some keyboards with volume control buttons do it without any 3rd party application. – sky – 2014-06-14T08:41:20.757