22
2
Is it possible to play/pause a movie just by clicking on the window? I really miss this feature from Media Player Classic, but from what I could find, it's not possible in VLC.
22
2
Is it possible to play/pause a movie just by clicking on the window? I really miss this feature from Media Player Classic, but from what I could find, it's not possible in VLC.
3
This extension of VLC does pause/play with a single click on the screen. It works with versions 2.1, 2.2 and 3.0.
The feature has to be manually enabled each time you start the player though – None – 2017-10-08T12:52:53.770
1The package does not look not maintained, unfortunately. It used to work without needed manually enabling it. Now it won't work, I haven't checked why. I'll update my comment if I solve it. – galath – 2017-10-11T09:09:54.497
1Tested with VLC 3.0.6 32bit running on Win7 64bit (no idea why I didn't install 64-bit VLC way-back-when, but too lazy to change it). Works like a charm and doesn't need re-enabling. (the opposite in fact, you need to restart the player once after setting up for the changes to take effect) – Tobl – 2019-05-31T10:24:40.277
https://github.com/nurupo/vlc-pause-click-plugin was updated 10 days ago. – Ryan – 2019-08-12T17:31:28.207
3
There is a tool called Nifty Windows, it allows you to associate an action with a press of the mouse. These actions can be key combinations, or execution of a program.
Hope this helps.
1Not a bad idea, although a bit overkill :). – alex – 2010-08-05T20:57:40.590
of course! but that's the only way i know of! – bryan – 2010-08-05T22:24:54.530
does that work in Vista, win7 and above? – None – 2013-12-07T16:22:29.293
It worked in Vista and Windows 7. Have not tried in Windows 8 – bryan – 2013-12-09T19:01:15.887
3
If you right click on the VLC window a menu list comes up with play, pause and more yepon it. I use this all the time.
2It's ok, but not what I want. I want to left click and pause. – alex – 2010-08-05T20:56:41.467
just a related tip: drag with right mouse button in the direction of "play/pause" option instead. it's a bit faster and barely worse than single click play/pause – a13ph – 2014-05-20T22:16:55.790
2
I've created lua extension for doing exactly what you want to do. Please check project at github or videolan addons page
Even worse, this extension doesn't work with newer versions of vlc. The vlc.var.add_callback
method has been removed from the lua API. I am unaware of another way to bind functions in a lua extension to a key. – con-f-use – 2016-01-02T14:53:28.290
2
It's true, seems like there is no way to do this with lua anymore. Instead, take a look at nurupo's pause-click-plugin Worked for me some time ago.
– 3demax – 2016-01-09T19:27:03.7001Aaand... from the project page: "You need to tick it every time you open VLC. This is a limitation of VLC lua api." Why in the hell this has to be so hard ?! – Halil Özgür – 2013-10-20T23:57:02.543
@HalilÖzgür: as you noticed, "This is a limitation of VLC lua api." +1, but indeed, the need to tick it every time you open VLC is a big downside – None – 2013-12-07T16:17:33.213
3Why on earth it's so hard to bind primary click to play/pause in such a popular player? This shouldn't even need an extension. And then, the requirement of the extension is ridiculous, regardless of the origin. For this reason I'm using SMPlayer. – Halil Özgür – 2013-12-07T21:46:10.243
1
A funny alternative to left-click would be mouse gestures, as indicated here:
- enable mouse gestures in VLC
- select left mouse button
- left-click & a quick left-right (or right-left) movement to play/pause.
The result is real... but you have to avoid other two very similar gestures:
Move left: Navigate 10 seconds backward
Move right: Navigate 10 seconds forward
DETAILS:
Go to Tools > Preferences [CTRL + P].
Click on All under show settings to go to Advanced settings.
Navigate to Interface > Control interfaces.
Check the option that says Mouse gestures control interface.
Navigate further down to Interface > Control interfaces > Gestures.
To toggle play or pause: click the mouse button you selected and move left and then right: (Also works if you move right and then left)
But the mouse gestures are not customizable (and you cannot chose to disable some of those you don't need). Therefore, avoid other moves like up and down to avoid making other gestures and trigger other actions like down and then left which quits the player
For reference, the list of all gestures:
Move left: Navigate 10 seconds backward
Move right: Navigate 10 seconds forward
Move up: Increase volume
Move down: Decrease volume
Move left and then right: Toggle play or pause (Also works if you move right and then left)
Move up and then down: Mute volume (Also works if you move down and then up)
Move left and then up: Slow down playing speed
Move right and then up: Increase playing speed
Move left and then down: Play previous track of playlist
Move right and then down: Play next track in playlist
Move up and then right: Switch the audio track
Move down and then right: Switch the subtitle track
Move up and then left: Enables full screen
Move down and then left: Exit VLC media player
Sorry, but doesn't work (player v.2.2.4, win7) – Putnik – 2016-08-05T09:07:56.253
Works for me, Windows 10, VLC 2.2.x. Maybe this should be the accepted answer, because it's a native setting, which should work for most people. Thanks! – Simon Steinberger – 2017-10-08T12:51:30.197
@SimonSteinberger - In fact I don't find it very usable. As I said in the answer, one has to avoid the other very similar gestures (left/right backward/forward): but these are hard to avoid, at least with a mouse. Maybe it's easier with a touch screen or touchpad? – None – 2017-10-08T12:57:40.363
1
Apparently the question is still valid.
My workaround - simple and working - is the one using xdotool
and xinput
.
You need to create a script myVlc
(or alias vlc) like this:
#!/bin/bash
xinput set-button-map DEV_ID 1 2 10 4 5 6 7 8 9
vlc "$@"
xinput set-button-map DEV_ID 1 2 3 4 5 6 7 8 9
It rebinds right_mouse_button into Button10
. For middle button just use 1 10 3 4…. To be sure double check with xev
.
You have to replace DEV_ID with your mouse id. See xinput
.
Or you may grep
it as well:
xinput | grep -i mouse -m 1 | sed -E 's/.*id=([0-9]*).*/\1/'
So the script will be:
#!/bin/bash
xinput set-button-map $(xinput | grep -i mouse -m 1 | sed -E 's/.*id=([0-9]*).*/\1/') 1 2 10 4 5 6 7 8 9
vlc "$@"
xinput set-button-map $(xinput | grep -i mouse -m 1 | sed -E 's/.*id=([0-9]*).*/\1/') 1 2 3 4 5 6 7 8 9
Then rebind Button10 of your WM into space
. For Openbox it goes like that (rc.xml):
<context name="Client">
<mousebind button="Button10" action="Click">
<action name="Execute">
<command>xdotool key space</command>
</action>
</mousebind>
</context>
Actually one could rebind RMB or MMB directly into space, but that would conflict with default RMB/MMB behaviour. And usually we don't want that.
Using myVlc
RMB/MMB will be rebound only while running vlc.
Nice workaround! – dirdi – 2019-10-02T13:05:33.257
0
I am using X-mouse button control and it does exactly what you are asking.
Only be sure to use "simulated keys" {SPACE} and untick "block original mouse input" to allow double clicking.
0
This solution developed and tested by me in Ubuntu 18.04 with VLC 3.
To be able to pause/play VLC player by mouse button, I have created a script file. It runs every time the related mouse button clicked. The script check if the active window title contains "VLC media player". If true, then send "space" key.
Script file content:
wintitle=$(xdotool getwindowfocus getwindowname);
p=" - VLC media player$" ;
if [[ $wintitle =~ $p ]]; then
xte 'key space'
fi
xbindkeys needs to be installed to catch and configure mouse events. I edited ~/.xbindkeysrc file and added some codes as follow:
"bash /home/user/test/control_by_mouse.sh"
b:8 #mouse back button
After that, the following command should be run
xbindkeys
So, every time I press the back button on mouse, the specified script file run.
To get mouse buttons numbers:
xev
The folowing packages needed for this work on my Ubuntu system:
sudo apt install xbindkeys xautomation xev xdotool
Previously I posted this note at https://mim.mbirgin.com/?c=posts&id=105
I am the author. I created the note for me in the linked site and felt it would be useful if put it here. Sorry if I make any mistake.. If there is a problem I could delete it.
How can I disclose it as it is my work? – podcast – 2018-10-27T02:27:22.677
Just [edit] your answer again, and edit the last line to say something like “I previously posted this answer at ____”, and you’ll be fine. – Scott – 2018-10-27T02:43:16.830
Thanks for making the edit to your post. As you've determined, the disclosure requirements aren't intended to be onerous. When it's your own content, it's really pretty easy, just like you've done here. – Makyen – 2018-10-27T03:50:50.580
0
well, I have Test VLC Player is working fine at my site. you need to update your vlc media player
I`ve anwered something in a similar post there: http://superuser.com/questions/1092273/vlc-2-2-4-how-to-turn-on-the-option-pause-on-left-mouse-click?noredirect=1#comment1547756_1092273
– Mark – 2016-06-22T19:03:55.4272
Unfortunately, despite click-to-pause being ubiquitous functionality in video players, it's likely we will never see native support in VLC. The lead devs are firmly against it to the point of throwing insults: https://forum.videolan.org/viewtopic.php?t=124924
– dexgecko – 2017-04-28T01:41:21.170