How can I control the master volume in Windows?
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.
I just did this with my laptop. I used AutoHotKey
Here is the script
#PgUp::Send {Volume_Up 1}
#PgDn::Send {Volume_Down 1}
so doing Win+PgUp Win+PgDown changes the master volume. If you prefer Ctrl+PgUp, use ^PgUp::Send
.
- If you don't have it installed already, http://www.autohotkey.com/
- Once installed, right click your Desktop, and choose new AutoHotKey file
- Make sure to title the file ending with .ahk (for example, I used "controls.ahk")
- Paste the code in from above
- Save it, and double click the script in windows explorer
To run it at startup
- Use the AHK provided "Convert to exe" utility (or you can right click the file and select "compile script")
- Create the .exe in "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
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.
There is a good enough solution that does not require installing additional programs:
- Click your start menu and type
sndvol
in the search box - Create a shortcut on your desktop for it (right-click -> Send to Desktop (create shortcut)
- Right-click on the new shortcut and edit Properties
- 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.
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.
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.