wolfgang ziegler

„make stuff and blog about it“

Missing The Media Keys On Your Mechanical Keyboard?

May 8, 2014

For quite a while now I am using a Cherry mechanical keyboard. More specifically, a Cherry G80-3000LSCDE-2.

Cherry G80-3000LSCDE-2 (source: amazon.de)

I freaking love this keyboard and would not switch back to another one if someone paid me to do so. That's because even though, I am not the best touch-typist, this mechanical keyboard's haptic experience gives me a great typing flow and its pronounced "click, click" adds to a great typing (coding) experience.

Dude, where are my media keys?

There was only one thing I initially missed and these were the media keys my former keyboard had. Most importantly, the keys for Volume Up, Volume Down, Play/Pause I probably couldn't' live without.

AutoHotkey to the Rescue!

Luckily, this is Windows and "there has always been an app for that". In this case this app is called AutoHotkey, which is a great power tool for adding hotkeys, macros and scripts to your PC.

The easiest way to install AutoHotkey on your machine is using the Chocolatey package manager and this command line call:

c:\> cinst autohotkey

Or, if you prefer portable versions of software instead of installer packages:

c:\> cinst autohotkey.portable

AutoHotKey comes with a custom scripting language that allows me to bind e.g. certain keyboard shortcuts to certain Windows commands. I my case I want to assign keyboard shortcuts for increasing and decreasing the volume as well as being able to pause and resume media playback.

Ctrl + Alt + Shift + : Volume Down

Ctrl + Alt + Shift + : Volume Up

Ctrl + Alt + Shift + : Play Pause

Adding these three lines of code in the AutoHotKey configuration script does the trick.

+^!Down::Send   {Media_Play_Pause}
+^!Left::Send;  {Volume_Down}
+^!Right::Send   {Volume_Up}

(The ^ character encodes the Ctrl key, + encodes Shift and ! stands for the Alt key.)

AutoStarting AutoHotKey

For some reason, AutoHotKey does not come with a built-in option to run it automatically when Windows starts up. We have to add it manually to the Autostart folder for this reason.

Finding the Autostart folder can be a bit tricky on Windows 8, unless you use this neat little shortcut.

Press Windows + R and then type: shell:startup.

(Or simply type this command on the Start Screen).


Thanks to AutoHotKey I can have the best of both worlds, using my awesome mechanical keyboard while still being able to leverage those fancy and useful media commands.