Add keybind to right click hold
Would it be possible to add a keybind to right click hold, basically how YouTube implemented it? It would be useful when someone does not have easy access to their keyboard.
Yeah I want to do it eventually.
Would it be possible to add a keybind to right click hold, basically how YouTube implemented it? It would be useful when someone does not have easy access to their keyboard.
If you're on windows, you can use a program called AutoHotKey with my script and get what you need. Save the script as whatever name you want to with a (.ahk) at the end and run it, now when you're using MPV and you hold the right mouse button down, it will simulate holding the right arrow key down physically and will keep fast forwarding, when you let go of the right mouse button physically, it will stop fast forwarding.
#IfWinActive ahk_exe mpv.exe
RButton::
; Send the right arrow key down
Send {Right down}
; Set a flag to indicate that the right arrow key is being held down
KeyDownFlag := true
return
RButton Up::
; Release the right arrow key
Send {Right up}
; Reset the flag since the key is no longer held down
KeyDownFlag := false
return
; Check if the right arrow key is still being held down at regular intervals (e.g., every 50 milliseconds)
SetTimer, CheckKeyState, 50
return
CheckKeyState:
; If the right mouse button is no longer held down, release the right arrow key
if (!GetKeyState("RButton", "P") and KeyDownFlag) {
Send {Right up}
KeyDownFlag := false
}
return
#If
https://github.com/jgreco/mpv-scripts/blob/master/fastforward.lua
If you're on windows, you can use a program called AutoHotKey with my script and get what you need. Save the script as whatever name you want to with a (.ahk) at the end and run it, now when you're using MPV and you hold the right mouse button down, it will simulate holding the right arrow key down physically and will keep fast forwarding, when you let go of the right mouse button physically, it will stop fast forwarding.
I'm not too keen on having to install another program just for this one feature.
https://github.com/jgreco/mpv-scripts/blob/master/fastforward.lua
I think I like evafast's implementation more.
I found my own solution by using the input event script.
This is still something I'd like to support natively.