User Tools

Site Tools


ahk

AutoHotKey

1-key Media Controls

Makes it easy to change track with only one media button (play/pause button).
I have the third side button on my mouse binded as a play/pause button, which makes this a must have.

; ▄█ ▄▄ █▄▀ █▀▀ █▄█   █▀▄▀█ █▀▀ █▀▄ █ ▄▀█   █▀▀ █▀█ █▄░█ ▀█▀ █▀█ █▀█ █░░ █▀
; ░█ ░░ █░█ ██▄ ░█░   █░▀░█ ██▄ █▄▀ █ █▀█   █▄▄ █▄█ █░▀█ ░█░ █▀▄ █▄█ █▄▄ ▄█
; 1 press for Play/Pause, double press for Next, triple press for Previous

~Media_Play_Pause::
PlayPauseCount += 1 
SetTimer, PlayPauseDoSomething, -200
Return

PlayPauseDoSomething:
if (PlayPauseCount = 2){
	Send {Media_Next}
} else if (PlayPauseCount = 3) {
	Send {Media_Play_Pause}
	Send {Media_Prev}
}
PlayPauseCount := 0
return

Media Controls Hotkeys on a regular keyboard

When normal media keys are not available (laptops etc.) these are my favorite media key combinations

;       █▀▄▀█ █▀▀ █▀▄ █ ▄▀█   █▀▀ █▀█ █▄░█ ▀█▀ █▀█ █▀█ █░░ █▀   █░█ █▀█ ▀█▀ █▄▀ █▀▀ █▄█ █▀
;       █░▀░█ ██▄ █▄▀ █ █▀█   █▄▄ █▄█ █░▀█ ░█░ █▀▄ █▄█ █▄▄ ▄█   █▀█ █▄█ ░█░ █░█ ██▄ ░█░ ▄█
; shift+alt+ left/up/right for prev/playpause/next, ctrl+alt+ left/up/right for volume down/mute/up

+!Left::Send   {Media_Prev}
+!Up::Send   {Media_Play_Pause}
+!Right::Send  {Media_Next}
+^!Up::Send  {Volume_Mute}
+^!Left::Send  {Volume_Down}
+^!Right::Send {Volume_Up}
return

ahk.txt · Last modified: 2020/09/23 22:21 by mathias