Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Some keyboards have volume controls on them that can be pressed anytime to control the master volume. My keyboard does not have that. Is there a way that I can create a key macro that will work like the volume controls on those keyboards? It should always allow me to control the volume, even if I'm playing a game.

share|improve this question

9 Answers 9

I just did this with my laptop. I used AutoHotKey

Here is the script

#PgUp::Send {Volume_Up 3}
#PgDn::Send {Volume_Down 3}

so doing Win+PgUp or Win+PgDown changes the master volume.

  1. If you don't have it installed already, http://www.autohotkey.com/
  2. Once installed, right click your Desktop, and choose new AutoHotKey file
  3. Make sure to title the file ending with .ahk (for example, I used "controls.ahk")
  4. Paste the code in from above
  5. Save it, and double click the script in windows explorer

To run it at startup

  1. Use the AHK provided "Convert to exe" utility (or you can right click the file and select "compile script")
  2. Create the .exe in "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
share|improve this answer
2  
For followers, note that sending Volume_Up is basically the same as instructing AHK to simulate hitting the volume up button on the keyboard. –  rogerdpack Jul 13 '10 at 23:23
3  
This only changes volume on the active application in Windows 7, e.g. it doesn't do anything when Winamp is focused, or it changes the program volume when Media Player Classic is focused. I'd rather like to have a way to always control the real master volume. –  neo Oct 29 '12 at 19:17

Do:

Win + B

Left

Enter

PgUp/PgDown

Escape

This allows you to interact with the notification icons on the right side of the taskbar using the keyboard. Win + B brings focus to one of the taskbar icons, Left will move focus until you have focus on the volume icon, Enter will open the volume slider up, and PgUp/PgDown moves the slider.

share|improve this answer
4  
Thank you very much for teaching me about Win+B! –  FCTW Aug 6 '13 at 15:29
3  
You can also use Up/Down instead of PgUp/PgDown for finer control of the volume. –  Kevin Jul 17 at 15:59
    
Hot tip, @Kevin! –  enthdegree Jul 30 at 2:29

Volumouse

provides you a quick and easy way to control the sound volume on your system - simply by rolling the wheel of your wheel mouse.

share|improve this answer
1  
When I'm in a game and I try to use this, it causes the game to become minimized. –  Phenom Dec 12 '09 at 19:38
1  
+1 Very useful app. –  LeopardSkinPillBoxHat Feb 17 '12 at 3:37

NirCmd is an application that changes the volume and more.

Example of use:

  • Increase the system volume by 2000 units (out of 65535)
    nircmd.exe changesysvolume 2000
  • Decrease the system volume by 5000 units (out of 65535)
    nircmd.exe changesysvolume -5000
  • Set the volume to the highest value
    nircmd.exe setsysvolume 65535

You could use it, together with AutoHotkey to invent your own volume keys.

share|improve this answer

You could use this AutoHotkey macro: Volume On-Screen-Display (OSD) -- by Rajat

The interesting part is here:

vol_WaveUp:
SoundSet, +%vol_Step%, Wave
Gosub, vol_ShowBars
return

vol_WaveDown:
SoundSet, -%vol_Step%, Wave
Gosub, vol_ShowBars
return

vol_MasterUp:
SoundSet, +%vol_Step%
Gosub, vol_ShowBars
return

vol_MasterDown:
SoundSet, -%vol_Step%
Gosub, vol_ShowBars
return

If you modify the script and remove the "Gosub", you can change the volume without the OSD bars.

share|improve this answer
    
I tried this script. Even though the OSD bars change, the volume doesn't change. –  Phenom Dec 12 '09 at 8:43
1  
appears that with vista+ If you want to update the system sound level you have to use Send {Volume_Up} autohotkey.com/docs/commands/SoundSet.htm viz: codeproject.com/KB/audio-video/mixerSetControlDetails.aspx (comment "does this work in vista" reveals that you need to use an IAudioEndpoint now for global adjustment). –  rogerdpack Jul 13 '10 at 23:02
    
You can also easily mute/unmute by doing a "vol_up" then "vol_down" keystroke which unmutes if it is muted. –  rogerdpack Jul 16 '10 at 5:12

Just found 3RVX. The web site is 'down for maintenance' but you can still download the software. And a documentation page is still available.

Simulates the look and feel of the OS X volume overlay (different skins are available) and you can configure key combinations.

share|improve this answer
    
Great software, exactly what I was looking for! –  John Jan 27 '13 at 22:31

Try Sound Volume Hotkeys

This tool allows to control sound volume using system-wide hotkeys. Customizable on-screen sound volume indicator will show you the current level.

enter image description here enter image description here

share|improve this answer
1  
Nice free software, but it's hard-coded to use Ctrl+Arrow Up/Down –  Lessan Vaezi Aug 5 '12 at 5:39
    
@LessanVaezi Yes, it is. I dislike that too. –  Brian Chavez Aug 7 '12 at 6:23

There is a good enough solution that does not require installing additional programs:

  1. Click your start menu and type sndvol in the search box
  2. Create a shortcut on your desktop for it (right-click -> Send to Desktop (create shortcut)
  3. Right-click on the new shortcut and edit Properties
  4. On the Shortcut tab, set the box “shortcut key” to your prefrence. For example: CTRL + ALT + V, and hit OK.

Now you can press your shortcut keys and the volume control box will popup. Then use the UP and DOWN arrows to change the volume, and ESC to close.

Recipe taken form this blog post.

share|improve this answer

Although it's a very old question, I want to report my findings on this topic. I stumbled across an AutoHotKey_L library whilst trying to overwrite my keyboard's Volume_Up and Volume_Down global hotkeys. The purpose was to be able to control master volume while running restrictive, key press consuming fullscreen applications/games (Bethesda's games as an infamous example). The functions are pretty straightforward, so I'll just post a little example:

Volume_Up::
    newVol := VA_GetMasterVolume() + 5
    VA_SetMasterVolume(newVol)
return

Volume_Down::
    newVol := VA_GetMasterVolume() - 5
    VA_SetMasterVolume(newVol)
return

In principle, this code contains everything you'll need. It overwrites both keys to do the same as before, but instead of relying on the OS to catch the keypress, AHK sets the volume by itself. Of course, you can specify any other hotkey. Since there doesn't seem to be a built-in function to change the volume relatively, you'll have to get the current volume first and then in-/ decrease it at will (here: 5). VA_SetMasterVolume accepts values between 0.0 and 100.0, inclusive.

To get this working in restrictive fullscreen windows, it was sufficient to call the #UseHook directive at the top of my script.

References:

  1. Library download: Vista Audio Control Functions by Lexikos
  2. VA Online documentation
share|improve this answer

Your Answer

 
discard

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.