Last active
December 22, 2022 11:28
-
-
Save dwettstein/ec9a100b26cca0120bd3ad188e206e9a to your computer and use it in GitHub Desktop.
AutoHotkey Media Control Shortcuts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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. | |
#!Left::Send {Media_Prev} ; Win + Alt + Left | |
#!Down::Send {Media_Play_Pause} ; Win + Alt + Down | |
#!Right::Send {Media_Next} ; Win + Alt + Right | |
#!Up::Send {Volume_Mute} ; Win + Alt + Up | |
#!PgUp::Send {Volume_Up} ; Win + Alt + PageUp | |
#!PgDn::Send {Volume_Down} ; Win + Alt + PageDown | |
AppsKey & Left::Send {Media_Prev} ; Menu + Left | |
AppsKey & Down::Send {Media_Play_Pause} ; Menu + Down | |
AppsKey & Right::Send {Media_Next} ; Menu + Right | |
AppsKey & Up::Send {Volume_Mute} ; Menu + Up | |
AppsKey & PgUp::Send {Volume_Up} ; Menu + PageUp | |
AppsKey & PgDn::Send {Volume_Down} ; Menu + PageDown | |
#If MouseIsOver("ahk_class Shell_TrayWnd") ; If the mouse is over taskbar, | |
WheelUp::Send {Volume_Up} ; wheel over taskbar to | |
WheelDown::Send {Volume_Down} ; increase/decrease volume. | |
MouseIsOver(WinTitle) { | |
MouseGetPos,,, Win | |
return WinExist(WinTitle . " ahk_id " . Win) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To auto-start the program, open
shell:startup
in File Explorer and add a shortcut to the exe.