[MPlayer-users] mplayer -slave... (how to) disable, keyboard input?

Lee Jackson leej at morphemass.com
Sat Dec 1 16:52:35 CET 2007


RVM wrote:
> El Viernes, 30 de Noviembre de 2007 18:44, Lee Jackson escribió:
>
>   
>> I had a little time to look at this in some more detail this morning.
>>
>> mplayer.c line 2604
>> mp_input_add_key_fd(-1,0,mplayer_get_key,NULL);
>>
>> The above line seems to be responsible for adding console keyboard input
>> and if it is commented out, or the line immediately prior is prefixed by
>> a suitable if statement [ e.g. if (!slave_mode) ], then slave mode works
>> as I had expected it to behave. Thats a very quick hack though, based on
>> VERY limited knowledge (note that Im also observing this problem with
>> the svn version obviously).
>>
>> Anways, the console keyboard input behavior in slave mode APPEARS to be
>> broken (and from browsing the rep, has been for a long time) and it
>> would be useful for an active developer to have a look at this - it may
>> just be a case of the documentation differing from the
>> implimentation.... as an aside, the importance of this to me is that I'm
>> embedding mplayer in a QT4 widget and I want to disable any other input
>> apart from that which I define.
>>
>> I note there are several GUIs for mplayer which presumably are not
>> affected by this; can anyone provide a quick heads up on how they
>> approach remapping/ignoring mplayers keyboard handling?
>>     
>
> I had the same problem when I started to develop smplayer. I just copied the 
> method that kplayer used. It passes to mplayer an input.conf (-input 
> conf=..../input.conf), with something like this:
>
> RIGHT gui_about
> LEFT gui_about
> DOWN gui_about
> UP gui_about
> PGUP gui_about
> PGDWN gui_about
> - gui_about
> + gui_about
> ESC gui_about
> (and so on, for all keys)
>
> This still has problems if mplayer has been compiled with gui support. I think 
> it's better to replace "gui_about" with something mplayer can't understand, 
> that way it's completely ignored.
>
> Anyway this solution is ugly. I'd prefer mplayer had a switch to disable all 
> keyboard input (not only from the console).
>
> BTW, this issue does NOT happen under Windows. For some reason, I don't know 
> if it's a bug or intentional, when mplayer in Windows is embedded in another 
> application it doesn't get keyboard input.
>   
Hehe. Cheers RVM. I was just looking at SMPlayer yesterday thinking it 
was a python based app (then realised that it wasn't, but was glad I 
looked at it - it is a *nice* front end and I was *genuinely* impressed 
with it :] )

The -inputconf method had passed my mind but I couldn't believe that 
such a crude hack had to be resorted to...given this and the fact that 
this isn't an issue under windows would seem to indicate that something 
is broken.

I'd like to see this fixed (given its potentially a one liner) but I 
cant seem to find where to report bugs formally (and informally suggest 
patches)...any suggestions on best way to move forward without adding 
noise to the dev list?

Lee



More information about the MPlayer-users mailing list