Stop/play with mouse pointer in the video

Hi,

It would be useful if the “Toggle play or pause (Space)” function could also be used if we clicked in the moving/still frame with the mouse pointer.

This would be useful because the icons used now are small and sometimes it is difficult to find exactly the right one.

Thank You!

1 Like

It is not a bad idea at the high level. However, we have a number of filters with a UI overlaying the video, and these will get the mouse clicks. If click to play/pause works sometimes and other times not, that becomes a bug. If one attempts to address that by making these video UIs sensitive to where you click such that clicking a visible part of the UI versus not, then they become a little tricky to use. Also, some of these rectangle controls allow one to click anywhere inside their UI with a key held in order to move the rectangle. Also, there is the ability to drag-n-drop from the player to playlist or timeline. On touch screens, often a tap can be perceived as a short drag if you press hard and move just a little. So, that is a lot of clicks to differentiate, which is a little difficult to code but can also be difficult to use.
Meanwhile, there are a couple of different keyboard shortcuts you can use.

Thank you for your answer, you say it’s not that easy to solve as I thought, a lot more needs to be considered, thank you for thinking about my proposal.

Hi @Jules ,
I was thinking about your proposal and I found a workaround - but you have to be on Windows and have Auto Hotkey installed.

I wrote a “simple” AHK script which, when activated in the background, makes it so pressing Ctrl + Left Click ANYWHERE on the shotcut screen (not just in the preview pane) activates PLAY, and also toggles between PLAY and STOP.

It works fine for me (but a disclaimer - only use it if you are happy to do so) - see demo (each time Shotcut starts or stops I’m pressing Ctrl + Left Click).
DEMO:

So far I haven’t found it clashes with any other operations in Shotcut. I’ll report it here if I do.

Warning

[Edit] - As pointed out by @shotcut (next post), the combination Ctrl + click is used for multiple selection of clips in the timeline, and the script stops this from working, so maybe it's not a great idea after all...

See script below. To use it, copy/paste it into Notepad, or Notepad++, or any other text editor, save it as xxx.ahk (any filename you want, with ahk extension). Then run it by double-clicking the script file.

I will find this very useful myself and probably run it every time I use Shotcut.
Script:

 SetKeyDelay, 200			   ; ^ =ctrl  +=shift  !=alt
 SetNumLockState , on


 ^LButton::
 KeyWait, LButton
 KeyWait, Ctrl
 Send {space}
 Return

That is the combination for multiple selection.

1 Like

Oh yes, of course. It does mess that up. Apologies for not thinking about that. It might not be a great idea, then. I’ll add a warning in the post above if I can still edit the post.

Thanks for the effort, as I can see this is not the best solution.

1 Like

No problem, @jules. It was just an idea I had, and I posted to hastily before my brain had a chance to think it through fully. :yum: :stuck_out_tongue_winking_eye: (It’s probably not a great idea of mine to try to use AHK to alter imbedded processes within Shotcut, because of possible clashes). I will refrain from doing so!! :smiley:

I do use AHK all the time to automate repetitive tasks within Shotcut by stringing along a series of SC keyboard shortcuts, and in some cases, mouse position clicks though, and I find it very useful.