Page 1 of 1

Python Binding Keyboard events severe problem

Posted: 21 May 2010 21:47
by ppaulojr
Using the Python Bindings for VLC 1.0.6 the problem of Keyboard events not being captured remains.

In Debian Testing (vlc 1.0.6) when you run the:

./vlc.py file.avi

The window created to display the movie don't handle any default event, such as spacebar to pause. It even don't handle the close window event.

I attached xev the in the windows id and it seems to be receiving the input as show in the log below. (The vlcwidget.py is not working also...)

Code: Select all

VisibilityNotify event, serial 13, synthetic NO, window 0x1200004, state VisibilityUnobscured FocusIn event, serial 13, synthetic NO, window 0x1200004, mode NotifyNormal, detail NotifyNonlinear KeymapNotify event, serial 13, synthetic NO, window 0x0, keys: 4294967229 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KeyRelease event, serial 13, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10519063, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyPress event, serial 13, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10519063, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XmbLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyRelease event, serial 16, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10519295, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyRelease event, serial 16, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10520135, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyPress event, serial 16, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10520135, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XmbLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyRelease event, serial 16, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10520287, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XFilterEvent returns: False KeyRelease event, serial 16, synthetic NO, window 0x1200004, root 0x112, subw 0x0, time 10520399, (210,632), root:(319,839), state 0x0, keycode 65 (keysym 0x20, space), same_screen YES, XLookupString gives 1 bytes: (20) " " XFilterEvent returns: False

Re: Python Binding Keyboard events severe problem

Posted: 25 May 2010 19:08
by Rémi Denis-Courmont
yeah, this is a known limitation.

Re: Python Binding Keyboard events severe problem

Posted: 25 May 2010 19:22
by ppaulojr
So there's no way to get any input?

Re: Python Binding Keyboard events severe problem

Posted: 25 May 2010 19:31
by Rémi Denis-Courmont
There is no way to get VLC to act on the events. If you want to capture the events yourself, you need to set vout-events to 3, IIRC.

Re: Python Binding Keyboard events severe problem

Posted: 25 May 2010 19:49
by ppaulojr
thanks. I'll try it.