Jump to content



Photo

AutoHotKey script for keyboards lacking media keys

keyboard

  • Please log in to reply
1 reply to this topic

#1 Denis W.

Denis W.

    The True North!

  • Tech Issues Solved: 6
  • Joined: 06-March 05
  • Location: Toronto, Ontario [CA]
  • OS: Windows 8.1 Pro and OS X Mavericks
  • Phone: iPhone 4S

Posted 08 October 2012 - 02:45

I have a keyboard that lacks media keys - play/pause, back, forward, stop, and volume control keys. But I can't be arsed to buy a new keyboard, and frankly I'm tired of clicking on controls on my desktop to change the volume (and besides, Windows 8 is the first Windows with a OSD built-in - finally).

So I found this sample AutoHotKey script and modified it for my needs. Code is below. For the uber lazy I've also attached a compiled exe. The below comments should easily tell you what the keyboard combinations are ;)

Drop a shortcut in %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup to start upon login.

;; Virtual Media Keys
;; Based on http://frugalcoder.us/post/2011/10/07/Mapping-windows-volume-for-keyboards-without-media-keys.aspx
;; Map WIN + F5 to <<
#F5::Send {Media_Prev}
;; Map WIN + F6 to Play/Pause
#F6::Send {Media_Play_Pause}
;; Map WIN + F7 to >>
#F7::Send {Media_Next}
;; Map WIN + F8 to Stop
#F8::Send {Media_Stop}
;; Map WIN + F9 to Volume Down
#F9::Send {Volume_Down}
;; Map WIN + F10 to Volume Up
#F10::Send {Volume_Up}
;; Map WIN + F11 to toggle mute
#F11::Send {Volume_Mute}

Attached Files




#2 houlty

houlty

    Patient 67

  • Joined: 18-April 04
  • Location: Notts, UK

Posted 12 October 2012 - 12:28

I happened to do exactly the same thing the other day when i received my Filco. I use Ctrl+Alt+Arrow keys for different functions though.

One thing i am looking to do is setup an OSD for the volume control, there's a few already out there that just need modifying to suit.