geekhack
geekhack Community => Keyboards => Topic started by: NorrisB on Sun, 29 April 2012, 18:48:08
-
Id like to assign Page up and Page down as volume up or down, how do I go about doing that?
-
You could try using some third party software. I think popular ones I've seen are Sharpkeys or Autohotkey. Even though they have their downfalls I don't think there's any other way to do it.
-
I have had good luck with Key Tweak.
-
I use Autohotkey for volume control and it works great. I use the right control key and up and down arrow. Even has a little window that pops up showing volume when I'm adjusting it!
http://www.autohotkey.com/community/viewtopic.php?t=49219
-
Well sharkeys and keytweak wont let you assign multiple keys to an action. SO you cant use something like Ctrl + page up to increase the volume.
-
autohotkey is best for something like this. I have pgup/dn backspace and enter respectively, but ctrl+pgup/dn executes the normal key
-
Most media players let you make your own hotkeys, besides WMP and not sure about itunes.. never used it. But Winamp/foobar2000 let you make your own and they are much better media players imo.
-
Most media players let you make your own hotkeys, besides WMP and not sure about itunes.. never used it. But Winamp/foobar2000 let you make your own and they are much better media players imo.
Yep, that's the way to go!
But for system volume I think autohotkey is great.
-
Autohotkey is great for volume.
If you need dedicated (hardwired) media buttons get the Filco Camo :)
-
Yeah, I use foobar, but controlling the system volume would be great. A mute button is just awesome IMO.
-
I use AutoHotkey as well. Here's what I use for media control:
AppsKey:: Send {AppsKey} ;Allow AppsKey (Menu key) to function normally if pressed by itself
AppsKey & Ins:: Send {Media_Play_Pause} ;Play/Pause
AppsKey & Del:: Send {Media_Stop} ;Stop
AppsKey & End:: Send {Media_Next} ;Next Track
AppsKey & Home:: Send {Media_Prev} ;Previous Track
AppsKey & PgUp:: Send {Volume_Up} ;Volume Up
AppsKey & PgDn:: Send {Volume_Down} ;Voume Down
AppsKey & BS:: Send {Volume_Mute} ;Toggle Mute On/Off
AppsKey is the "Menu" key. The AppsKey, for some reason, does not work without using the "&" function. Using & causes AHK to wait until an assigned combination of keys is pressed, effectively disabling the AppsKey for normal use and makes into an "Fn" key. The first line of code lets you use the key as normal. You can remove it if you want to disable the Menu key and only have it work when pressed with a matching hotkey.
OSD (on screen display) scripts are also available for volume control and media playback. This is a simple OSD for plain messages. But there are more complex ones for finding and display the volume level along with a volume bar.
OSD(text)
{
#Persistent
Progress, hide W400 b zh0 CW000000 FM16 CTFFFFFF,, %text%, AutoHotKeyProgressBar, Backlash BRK
WinSet, TransColor, FFFFFF 255, AutoHotKeyProgressBar
Progress, show
SetTimer, RemoveToolTip, 3000
Return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
Progress, Off
return
}
With the OSD code in your script, the following would simply display a box on your screen with the words: "Hello World" in it everytime you press Ctrl + H. ^h::OSD("Hello World")
This last bit of code is something I made to double the function of Scroll Lock as a Disable Windows Key button. Since Scroll Lock is pretty much never used, you can take advantage of the LED indicator to double as an indicator for Windows Lock. This does not remove the Scroll Lock function, so when it's active, Scroll Lock is still on.
ScrollLock::
If (GetKeyState("ScrollLock","T"))
{
SetScrollLockState, Off
;Return Windows key to full function
Hotkey Rwin, DoNothing, off
Hotkey Lwin, DoNothing, off
Hotkey Rwin Up, DoNothing, off
Hotkey Lwin Up, DoNothing, off
OSD("Windows Key Enabled")
}
Else
{
SetScrollLockState, On
; Complete Windows Key Disable
Hotkey Rwin, DoNothing, on
Hotkey LWin, DoNothing, on
;For Soft Disable Windows to allow Windows key shortcuts
;Hotkey ~Rwin Up, DoNothing, on
;Hotkey ~Lwin Up, DoNothing, on
OSD("Windows Key Disabled")
}
DoNothing:
Return
EDIT: Just in case anyone was wondering, any text following a semi-colon ";" is considered a comment/note and has no function.
-
wow thank you mr. wasd! :)
Very usefull stuff in there!