Skip to content

Instantly share code, notes, and snippets.

@regisboliver
Last active September 22, 2023 19:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regisboliver/e9059097e1026aced3197d9f7a18a0d8 to your computer and use it in GitHub Desktop.
Save regisboliver/e9059097e1026aced3197d9f7a18a0d8 to your computer and use it in GitHub Desktop.
Media keys shortcuts file for AutoHotkey - by przemoc

Media keys shortcuts for AutoHotkey

This script must be used with the AutoHotkey application to emulate media buttons, considering that your keyboard does not have them.

  • Ctrl+Alt+ sends Previous
  • Ctrl+Alt+ sends Play/Pause
  • Ctrl+Alt+ sends Next
  • Ctrl+Shift+Alt+ sends Volume Down
  • Ctrl+Shift+Alt+ sends Mute
  • Ctrl+Shift+Alt+ sends Volume Up

There are two files below:

  • For AHK v1.X: MediaKeys.ahk
  • For AHK v2.X: MediaKeys_v2.ahk

Credits to przemoc Superuser's answer.

To run this script when Windows starts, put MediaKeys.ahk file into C:\Users\<UserName>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup folder, make sure that AHK is installed and be happy!

^!Left:: Send {Media_Prev}
^!Down:: Send {Media_Play_Pause}
^!Right:: Send {Media_Next}
+^!Left:: Send {Volume_Down}
+^!Down:: Send {Volume_Mute}
+^!Right:: Send {Volume_Up}
#Requires AutoHotkey v2.0
^!Left:: Send "{Media_Prev}"
^!Down:: Send "{Media_Play_Pause}"
^!Right:: Send "{Media_Next}"
+^!Left:: Send "{Volume_Down}"
+^!Down:: Send "{Volume_Mute}"
+^!Right:: Send "{Volume_Up}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment