Requirements
- Autohotkey: for information on Autohotkey, look here
Installation
- copy/paste the code from the script below into a new file
- save that new file in a new folder (you can name it whatever you want)
- run the script
- done
Usage
- manually run the script once, it stays active unless you manually close it (if you use it frequently, you might want to consider adding it to your computers startup)
- done
Script
app_name = GlobalMediaKeys app_ver = 0.01 app_author = Johan Klos /* Not every keyboard has media-keys. With this plugin you have default global media keys (CTRL-WIN-ALT up/left/right). If the script is Run as Admin (line 16: "runasadmin = 1") the hotkeys will work even if a program has focus that is running as admin. If the script is not Run as Admin (line 16: "runasadmin = 0"), the hotkeys will not work when a program has focus that is running as admin. */ #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. runasadmin = 0 if runasadmin = 1 { full_command_line := DllCall("GetCommandLine", "str") if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)")) { try { if A_IsCompiled Run *RunAs "%A_ScriptFullPath%" /restart else Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%" } ExitApp } } ^#!UP::Media_Play_Pause ^#!RIGHT::Media_Next ^#!LEFT::Media_Prev return