geekhack

geekhack Community => Keyboards => Topic started by: afton on Sun, 08 January 2012, 00:01:44

Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: afton on Sun, 08 January 2012, 00:01:44
Is there any way to create a keyboard shortcut to increase/decrease system volume in Windows 7?
eg. bind F11 to decrease volume and F12 to increase volume.
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: Human on Sun, 08 January 2012, 00:29:13
Quote from: afton;485790
Is there any way to create a keyboard shortcut to increase/decrease system volume in Windows 7?
eg. bind F11 to decrease volume and F12 to increase volume.


Try AutoHotKey? For details go to the script sharing thread.
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: startacked on Sun, 08 January 2012, 01:33:10
Try 3RVX on http://matthew.malensek.net/
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: TheProfosist on Sun, 08 January 2012, 04:59:11
Quote from: Human;485806
Try AutoHotKey? For details go to the script sharing thread.

I second autohotkey
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: Spharx on Sun, 08 January 2012, 06:00:14
You could also use autoit and mod this script:
Code: [Select]

#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_Run_Tidy=y

Func MEDIA_next()
Send("{MEDIA_NEXT}");
Beep(50, 500)
EndFunc   ;==>MEDIA_next

Func MEDIA_pause()
Send("{MEDIA_PLAY_PAUSE}");
EndFunc   ;==>MEDIA_pause

Func MEDIA_prev()
Send("{MEDIA_PREV}");
EndFunc   ;==>MEDIA_prev

Func MEDIA_up()
Send("{VOLUME_UP}");
Beep(200, 10)
EndFunc   ;==>MEDIA_up

Func MEDIA_down()
Send("{VOLUME_DOWN}");
Beep(50, 10)
EndFunc   ;==>MEDIA_down

Func MEDIA_mute()
Send("{VOLUME_MUTE}");
EndFunc   ;==>MEDIA_mute

HotKeySet("#{F8}", "MEDIA_next")
HotKeySet("#{F7}", "MEDIA_pause")
HotKeySet("#{F6}", "MEDIA_prev")
HotKeySet("#{F9}", "MEDIA_up")
HotKeySet("#{F10}", "MEDIA_down")
HotKeySet("#{F11}", "MEDIA_mute")

While 1
Sleep(100)
WEnd


Why is the hide content button missing here at geekhack ??
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: limmy on Sun, 08 January 2012, 06:26:57
It is easy to do in autohotkey. If you simply want F11 and F12 to behave as Vol Down and Up, just add the following two lines in the script.

F11::Volume_Up
F12::Volume_Down
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: Rajagra on Sun, 08 January 2012, 07:10:42
Does Win 7 have the same problem as Vista? Each app has its own volume setting. If you use autohotkey to change the volume ... you only change autohotkey's volume!!!
F*^@ you, Microsoft!

If there are 2 keys you are willing to lose, you could map them to volume up/down using KeyTweak or Sharpkeys or similar.
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: alaricljs on Sun, 08 January 2012, 08:32:17
Win7 does maintain separate volumes for apps, however I've never had an AHK script change anything but the master volume.  How odd.
Title: Keyboard shortcut to increase/decrease system volume in Windows 7
Post by: fohat.digs on Sun, 08 January 2012, 09:32:02
I have used Key Tweak and it works pretty well, most of the time, but in XP, at least once a week, I have no sound and have to jump through a lot of hoops to get it back.

Sometimes making changes to "Sounds" in the Control Panel works, sometimes it inexplicably goes back to Mute when I close the Control Panel.

Occasionally I find the volume turned all the way down, as opposed to muted.

I am not doing any of this myself. I had just pegged it up to a "ghost in the machine" and assumed I would have to live with it.