Disable mouse and hotkeys

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Disable mouse and hotkeys

Postby davidhoyt » 28 May 2008 19:55

I've seen similar posts while searching through this forum and never found an answer -- is there a way to disable all mouse and keyboard input through JVLC/VLC for all modules? The reason being that I want those events to bubble up to Java and not be consumed in VLC so I can do such things as display a context menu over the video and disable fullscreen mode when a video is double-clicked. Thanks!

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 30 May 2008 19:40

I would really appreciate any leads anyone could give me - even if it involves modifying the source and recompiling.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Disable mouse and hotkeys

Postby Jean-Baptiste Kempf » 30 May 2008 19:44

Don't compile hotkeys. But I am not sure the event would go to Java...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 31 May 2008 00:27

Can I just remove the hotkeys plugin and expect it to work or will I have to reconfigure and recompile the entire thing?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Disable mouse and hotkeys

Postby Jean-Baptiste Kempf » 31 May 2008 01:29

yes, you can. No idea, if it'll make what you want though.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

cbouleau
Blank Cone
Blank Cone
Posts: 10
Joined: 08 Mar 2008 18:49

Re: Disable mouse and hotkeys

Postby cbouleau » 02 Jun 2008 10:48

Hello,

I had a similar problem than yours and finally (after a lot of search but neither answer nor help in any forum) I managed to disable some mouse events (all the button events), after making a little patch in a VLC source.
The solution I found is (unfortunately) not generic but can be easily adapted to other cases.
I worked on VLC 0.8.6c, on Windows XP plateform, and I modified the DirectX video output events handler.
I did not manage to act at a higher level (in libvlc), but had not enough time to implement a better solution (I presume that if a better solution was possible, someone would have already posted it :wink: ).

Anyway the top level application into which my libvlc player is embedded now receives all the windows mouse events it needs, and the goal is reached :D .

If you are interested, I can give my (simple) patch.

Chris. B

P.S. :
- The windows key events are also processed in this source file, so they could be taken into account too.
- I think you can make same kind of patch if you use another video output module than directX

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Disable mouse and hotkeys

Postby Jean-Baptiste Kempf » 02 Jun 2008 17:56

We are interested in the patches...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 02 Jun 2008 19:21

I would love to see your patch. Maybe one of the VLC developers also knows of a higher level place we could patch to take out mouse/keyboard event handling so it applies to all output modules?

cbouleau
Blank Cone
Blank Cone
Posts: 10
Joined: 08 Mar 2008 18:49

Re: Disable mouse and hotkeys

Postby cbouleau » 03 Jun 2008 14:49

Hello,

Thus here is the patch.

- Goal : let the parent window process the video window button events,
and disable the VLC default behaviour (fullscreen on double click an so on ...).
- Based on VLC 0.8.6c version.
- Tested on Windows XP SP2.
- Involves DirectX video output module.

1 modified source file: "vlc-0.8.6c\modules\video_output\directx\events.c" :

Replace all the "case WM_*BUTTON*" code (i.e. from line 198 to line 144) by this code:

Code: Select all

case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_LBUTTONDBLCLK: case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_RBUTTONDOWN: case WM_RBUTTONUP: msg_Dbg( p_event, "msg.hwnd=%d, get WM BUTTON message %u", (int)(msg.hwnd), msg.message ); msg_Dbg( p_event, "hvideownd=%d, hparent=%d", (int)(p_event->p_vout->p_sys->hvideownd), (int)(p_event->p_vout->p_sys->hparent) ); if ( p_event->p_vout->p_sys->hparent ) { // re-post the event message to the parent BOOL result = PostMessage(p_event->p_vout->p_sys->hparent, msg.message, msg.wParam, msg.lParam); msg_Dbg( p_event, "PostMessage returned %d", (int)result); } else { msg_Dbg( p_event, "hparent window is null, no re-PostMessage"); } break;
That's all (but was no so easy to find :cry: ).

I presume you can do similar modifications (in the same source file) to process key events or mouse move events.

I hope it will help you (and other people),

Good luck
Chris B.

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 05 Jun 2008 17:40

Thanks so much! Does anyone have a generic solution (one that would apply to all output modules)? As in - is there a place where I could turn it off globally? I just want VLC to handle the audio and video and nothing more.

At least this will get me started on the Windows side of things.

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 13 Jun 2008 20:15

Hello? Anyone? <Crickets chirping>

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 01 Jul 2008 23:24

I still don't think anyone has ever had a satisfactory response on this topic. I'm not the only one w/ this question. MPlayer has an option to disable all mouse/keyboard inputs. I haven't seen anything in VLC that will allow me to do that. Is it so hard to have VLC ignore all mouse/keyboard events if I ask it to?

At the very least, can someone point me in the right direction of which file or area to look at to make this change myself (to globally disable keyboard/mouse, not just for a particular module)? I have zero experience working w/ the VLC source and so I need some help.

I would have figured this option already existed. If it does and I just overlooked it, please let me know! Thanks! :)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Disable mouse and hotkeys

Postby Jean-Baptiste Kempf » 02 Jul 2008 09:19

Nothing is said because they are two different things:
- Disable mouse and hotkeys, which is doable
- Forward the event to mother application, which is more complex and not implemented.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 02 Jul 2008 20:59

Thanks for your reply! :D How do I disable mouse/keyboard input?

davidhoyt
Blank Cone
Blank Cone
Posts: 68
Joined: 02 May 2008 03:26

Re: Disable mouse and hotkeys

Postby davidhoyt » 16 Jul 2008 22:41

Anyone? I just want to ignore all mouse and keyboard input. I would really, really, really appreciate it. This is the one thing that keeps us from moving over to VLC over MPlayer. :(


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 10 guests