up vote 8 down vote favorite
8
share [g+] share [fb]

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.

link|improve this question

65% accept rate
feedback

5 Answers

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
  2. Create the .exe in "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
link|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. – user39364 Jul 13 '10 at 23:23
feedback

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.

link|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
feedback

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.

link|improve this answer
feedback

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.

link|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
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). – user39364 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. – user39364 Jul 16 '10 at 5:12
feedback

Your Answer

 
or
required, but never shown

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