public

https://developer.android.com/reference/android/view/KeyEvent#KEYCODE0

linux/android/adb_key_mapping.md

https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_0

#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.

;TODO: Look at using OnExit to disconnect adb

;Run C:\Users\me\Desktop\scrcpy-win64\adb.exe tcpip 5555
RunWait C:\Users\me\Desktop\scrcpy-win64\adb.exe shell :, , Hide UseErrorLevel
If (ErrorLevel != 0)
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe connect 192.168.1.103:5555, , Hide
return

Media_Play_Pause::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 85, , Hide
return

Volume_Mute::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 164, , Hide
return

Volume_Down::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 25, , Hide
return

Volume_Up::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 24, , Hide
return

Media_Next::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 87, , Hide
    ;there's also skip forwards and fast forward; https://developer.android.com/reference/android/view/KeyEvent.html is full list
return

Media_Prev::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 88, , Hide
    ;88 is previous; there's also skip backwards at 273 and rewind at 89
return

Media_Stop::
    Run C:\Users\me\Desktop\scrcpy-win64\adb.exe shell input keyevent 86, , Hide
return