This AutoHotkey script allows controlling media playback using the win + mouse wheel actions:

  • win + scroll up = volume up
  • win + scroll down = volume down
  • win + middle click = play/pause
  • win + middle click drag right = next
  • win + middle click drag left = previous
#Requires AutoHotkey v2.0
 
; https://www.autohotkey.com/docs/v2/lib/A_MenuMaskKey.htm
; Prevents extra Ctrl keystrokes and reduces phantom effects
A_MenuMaskKey := "vkE8" ; Change the masking key to something unassigned such as vkE8.
 
; Increase/decrease volume on wheel scroll up/down
#WheelUp:: {
  Send("{Volume_Up}")
}
#WheelDown:: {
  Send("{Volume_Down}")
}
 
 
; On middle mouse button down, capture screen X coords
CoordMode("Mouse", "Screen")
global originX := 0
#MButton:: {
  global originX
  MouseGetPos(&originX)
}
 
; On middle mouse button release, control media based on amount dragged
#MButton up:: {
  global originX
  MouseGetPos(&currentX)
  if ((currentX - originX) > 5) {
    Send("{Media_Next}")
  }
  else if ((originX - currentX) > 5) {
    Send("{Media_Prev}")
  }
  else {
    Send("{Media_Play_Pause}")
  }
}
 
; Set custom tray icon
TraySetIcon("MouseMedia.ico")