geekhack

geekhack Community => Keyboards => Topic started by: nala on Fri, 17 August 2012, 18:04:43

Title: How can I setup media keys on a keyboard without media keys?
Post by: nala on Fri, 17 August 2012, 18:04:43
Basically that. I searched for it on geekhack but couldn't find a solid answer.

Mostly what I want is volume control, and if possible, play/pause on multimedia.
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: Djuzuh on Fri, 17 August 2012, 18:07:35
autohotkey.
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: The_Beast on Fri, 17 August 2012, 18:10:39
autohotkey.

Yup, AHK is something I use every day at a work. It helps a TON
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: nala on Fri, 17 August 2012, 18:32:39
Mind sharing the script I need for volume control? I'm running on Win7 just in case. I tried two scripts but one of them didn't work, and the other one needed like a libraries that I couldn't download as the link was down.
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: Djuzuh on Fri, 17 August 2012, 18:38:35
Dude, AHK is very easy. Just learn it. :P.

(And yes, I'm too lazy myself to do it xD).
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: nala on Fri, 17 August 2012, 19:56:37
Dude, AHK is very easy. Just learn it. :P.

(And yes, I'm too lazy myself to do it xD).

Just for a volume control script? Nah, thanks.
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: fohat.digs on Fri, 17 August 2012, 20:02:37
How would you compare Auto Hot Key and Key Tweak?

For those who have used both.
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: alaricljs on Fri, 17 August 2012, 21:10:29
Key Tweak merely mangles the registry to re-map the keyboard.  AHK is an entire scripting language where you can execute actions, send complete strings on a single key press, manipulate windows and do all sorts of nifty stuff.

I use AHK to give me volume and playback control w/ OSD, a minimize window combo, and a few other nifty gadgets.

Found the AHK thread (http://geekhack.org/index.php?topic=18052.msg348717#msg348717)
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: The_Beast on Fri, 17 August 2012, 23:01:24
Honestly, I would learn the "language" it's pretty simple to pick up and you can always google and final a solution. For instance, at work I need to type in all caps for the drawings I do in AutoCAD. The problems was it was annoying to have caps lock on, forget about it and type an email sounding super pissed. I googled "autocad caps lock" or something like that, I found a script that disables caps lock entirely except in AutoCAD. So if I switch from AutoCAD to outlook, caps locks turns off. If I go from outlook to AutoCAD, caps lock turns back on. A simple problem, a pre-made script and it's hard to work without it now since I'm so used to it.


Same goes for other scripts I've written. Another example is I turned caps lock into a FN key for a layer on my keyboard to do common AutoCAD tasks that aren't associated with a letter. Without these two scripts, I would spent a whole lot more time on drawings because I would have to type the command or move my mouse to find it on a tool bar. I don't know how I drew before these. Defiantly learn the language
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: stingrae on Sat, 18 August 2012, 01:38:04
#IfWinActive    ; works in any active window
~LWin Up:: Return
~RWin Up:: Return
$#F5::SendInput {Media_Play_Pause}
$#F6::SendInput {Media_Next}
$#F7::SendInput {Media_Prev}
$#F8::SendInput {Media_Stop}
Volume_Down::Media_Play_Pause
Media_Prev::Media_Stop
LWin & 0::SendInput {Volume_Mute}
LWin & =::SendInput {Volume_Up}
LWin & -::SendInput {Volume_Down}
return   

Turns the left windows key into a psuedo function key doesn't work too well in games though :D so maybe change to control.
And now you have to learn the script to understand how to change this mess :D
Title: Re: How can I setup media keys on a keyboard without media keys?
Post by: KeyboardRookie on Sat, 18 August 2012, 04:45:09
Even a media key has its own Scancode in windows OS.
You can modify the registry to allocate keys as media keys.
I assume that is most efficient and less risky.
But unfortunately, you won't be able to use combination key like other keyboard which provides media key.