ew2x4 Posted September 3, 2014 Share Posted September 3, 2014 My old media friendly keyboard at work died. IT guy only had standard Dell ones lying around. I'm missing my play/pause button and volume up and down buttons. Is there a way to map my function keys to do these tasks? I'm using Windows 7 and itunes. Thanks. Link to comment Share on other sites More sharing options...
Max Norris Posted September 3, 2014 Share Posted September 3, 2014 Was in a similar situation a few months back, went from a Logitech keyboard with a gazillion keys to one that's the "traditional" layout (and 1000% more durable). AutoHotKey can do that rather easily. Just a simple example, easily change it to whatever keystrokes you want: ^!m:: Send {Volume_Mute} return ^!up:: Send {Volume_Up} return ^!down:: Send {Volume_Down} returnControl-Alt-Up/Down for volume and M for mute, which is also set as extra buttons on my mouse so I don't actually have to press the hotkey at all.. change up the keystrokes if you prefer the function keys, easily done. There's also Media_Next/Prev/Stop, Media_Play_Pause and a bunch of others available to you as well.http://www.autohotkey.com/docs/commands/Send.htm zhangm and goretsky 2 Share Link to comment Share on other sites More sharing options...
ew2x4 Posted September 9, 2014 Author Share Posted September 9, 2014 I got this to work with play/pause in itunes, but it has to have the active window. Any way around this? Link to comment Share on other sites More sharing options...
Max Norris Posted September 9, 2014 Share Posted September 9, 2014 I got this to work with play/pause in itunes, but it has to have the active window. Any way around this?Ah -- I don't use iTunes myself but from what I've read in the past it can be a bit quirky when it comes to the keyboard. You can tell AHK to send a keystroke directly to a window or control. Something along the lines of: DetectHiddenWindows, on ; (Not positive, but you *might* need this for iTunes) ^!p:: IfWinExist, ahk_class iTunes ControlSend, ahk_parent, {SPACE} ; Simulates the space which should be play/pause May need some fiddling, been years since I had a desire to look at iTunes, theoretically if you press ctrl-alt-p it'll send a space to the iTunes window, even if it's not in the foreground. Theoretically.If you want to get cute you can also use "IfWinNotExist, ahk_class iTunes" to see if iTunes is even running, and if it's not, launch it via "Run". http://www.autohotkey.com/docs/commands/ControlSend.htm Link to comment Share on other sites More sharing options...
ew2x4 Posted September 9, 2014 Author Share Posted September 9, 2014 Nice! It works well. I skip between itunes and zune. I just listen to podcasts with them. Google Play All access for everything else. Link to comment Share on other sites More sharing options...
Recommended Posts