Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Media keys shortcuts for AutoHotkey

Media keys shortcuts for AutoHotkey

  • Ctrl + Alt + Space : Pause
  • Ctrl + Alt + Right : Next
  • Ctrl + Alt + Left : Previous
  • Ctrl + Alt + - : Volume down
  • Ctrl + Alt + + : Volume up
  • Ctrl + Alt + * : Mute
; AutoHotkey Media Keys
^!Space::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
^!NumpadMult::Send {Volume_Mute}
^!NumpadAdd::Send {Volume_Up}
^!NumpadSub::Send {Volume_Down}
@ChrisRoss5

This comment has been minimized.

Copy link

@ChrisRoss5 ChrisRoss5 commented Sep 19, 2020

Thanks king, however NumpadSub isn't working as my keyboard is registering NumpadSubtract (https://keycode.info/) and AHK doesn't recognize that...?

@Lahiri

This comment has been minimized.

Copy link

@Lahiri Lahiri commented Jan 22, 2021

This was very very usefult, thank you so much!
I modified a little bit to fit my setup. I'm leaving it here just in case anyone is interested:

>!>Space::Send      {Media_Play_Pause}      ; AltR + Space
>!>Left::Send       {Media_Prev}            ; AltR + Left
>!>Right::Send      {Media_Next}            ; AltR + Right
>!>Delete::Send     {Volume_Mute}           ; AltR + Delete
>!>Up::Send         {Volume_Up}             ; AltR + Up
>!>Down::Send       {Volume_Down}           ; AltR + Down
@tmuka

This comment has been minimized.

Copy link

@tmuka tmuka commented May 19, 2021

thanks! In case it's helpful, I used this modification on my Thinkpad Trackpoint Keyboard ii which lacked multimedia keys. I don't know why they didn't keep the useful older Fn+arrow key shortcuts they used to have. It seems like it would be an easy firmware update for Lenovo... AutoHotkey to the rescue!

^!Down::Send	{Media_Play_Pause}
^!Up::Send	{Media_Stop}
^!Left::Send	{Media_Prev}
^!Right::Send	{Media_Next}
^!PgUp::Send	{Volume_Up}
^!PgDn::Send	{Volume_Down}
@SuperAadhil

This comment has been minimized.

Copy link

@SuperAadhil SuperAadhil commented Jun 23, 2021

Just for those who only need volume control like in a laptop. Hope it helps.

#SingleInstance force

F6::Send	{Volume_Up}
F5::Send	{Volume_Down}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment