Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Does anyone know how to create a keyboard shortcut for adjusting volume?

Author
Message
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 20th Jan 2012 05:21
I'm looking for a way to adjust the volume of my speakers via a keyboard a custom shortcut.

If this is not possible, is it possible to do in C++? Thank you in advance.


ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 20th Jan 2012 06:09
You can do it with the program AutoHotkey, available here:

http://www.autohotkey.com/

If you wanted to program it in C++, it is a pain in the butt to change mixer controls, but it is possible as explained in this Stack Overflow article:

http://stackoverflow.com/questions/294292/changing-master-volume-level/294525#294525

MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Jan 2012 06:19
maybe buy a cheap multimedia keyboard? or you using a laptop? should have it built in... I do not get your use for this... can you explain?

Quik
16
Years of Service
User Offline
Joined: 3rd Jul 2008
Location: Equestria!
Posted: 20th Jan 2012 10:34
I personally almost find it a must have, as its a pain in the ass since i listen to music and play games, to have to minimize the game to adjust volume.

also, a "next/previous track" button is nice to have


The result of origin.. Oh and ponies
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 20th Jan 2012 13:09
Isn't it easier just to adjust speaker volume?

DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 20th Jan 2012 17:38
@ionstream Thanks I'm checking that out now.

I'm using a desktop and the keyboard that it came with has no volume controls, and I don't feel like buying another keyboard if I can avoid it.


zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 24th Jan 2012 05:16 Edited at: 24th Jan 2012 05:42
Method 1: Not so elegant
~ via explorer open the system32 folder. (usually C:\Windows\System32)
~ send a shortcut of sndvol.exe to the desktop (by right-clicking)
~ right-click the shortcut on the desktop and click properties... then select the shortcut tab.
~ click in the shortcut field (it will say none).
press the key combination you wish to launch the shortcut ie. Ctrl+Shift+Alt+V.
~ That will launch the volume mixer, use up and down arrows to adjust volume
~ use alt+f4 with the mixer still active to close it

You can alternately use the above method to launch a batch or vbscript. you can assign any key combination to launch a volup vbscript,, and a voldown vbscript. I'll post an example script below...

~ZENassem
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 24th Jan 2012 05:25 Edited at: 24th Jan 2012 05:56
Method 2: More elegant than Method 1
A VBscript solution. I think this will give you enough to to play with and figure it out. Just save the snippet in notepad as voltest.vbs to your Documents [folder]... send a shortcut of the script to the desktop. Launch it. I'm sure you can work it into two separate scripts,, and map the key combination via the shortcuts using the same method as above. Happy Coding!!!



For loop example. Should look familiar......


~ZENassem

Login to post a reply

Server time is: 2025-05-19 20:33:19
Your offset time is: 2025-05-19 20:33:19