Hello Rob,

On 11.04.2005 02:01 Rob Shortt said the following:
Just FYI I've built an event input device plugin for the CVS trunk/2.0. Right now its only been used with pvr-x50 and nexus remotes (with the dvb-ttpci driver). The dvb drivers ( av7110_ir at least) don't use the key remapping interface given by the input layer so these ones may require some more code so we can remap keys using their /proc interface.

Yes, this is a problem. The TwinHan device produces some rather obscure keypresses like CTRL-ALT-F4 for some keys, which obviously will switch to a console if you're running under X.


Because there are no cursor keys on this remote control, I added the following lines to my "local_conf.py" to emulate some cursor keys:

KEYMAP[key.K_4] = 'LEFT'
KEYMAP[key.K_6] = 'RIGHT'
KEYMAP[key.K_2] = 'UP'
KEYMAP[key.K_8] = 'DOWN'

Pressing "2" and "8" works flawlessly, both on the remote control and on the keyboard: I can move the selection in the main menu.

But pressing "4" and "6" doesn't give me the desired result in some conditions. For example, if I try to quite "freevo" and the dialog appears which says "Are you sure you want to quit?" then I cannot use "4" and "6" neither on the remote nor on the keyboard to move the selection.

What am I doing wrong?

Nothing's jumping out at me here at all. :(

Ok, I found a solution to this problem. I added a debug print statement in the dialog box module to see which input is really arriving there.


So, the responsible "module" is "input", not "menu" and the desired events have the INPUT_ prefix.

EVENTS['input']['4'] = Event('INPUT_LEFT')
EVENTS['input']['5'] = Event('INPUT_ENTER')
EVENTS['input']['6'] = Event('INPUT_RIGHT')
EVENTS['input']['y'] = Event('INPUT_EXIT')

IMO it's very unfortunate to have two different domains for navigation.

Then I encountered some other problems, which I needed to solve differently. First, I read that "mplayer" was driver in slave mode and using X11 output I was not able to get some keys working.

For example my remote uses "i" for reverse and "n" for forward. I added the following lines:

EVENTS['video']['i'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -60')
EVENTS['video']['n'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek 60')

This did not work. The reason is that in "event.py" the "key.K_i " is assigned to 'PIP_MOVE'", and "key.K_n" to 'VOL-', so the "i" and "n" keypresses never reached the "video" domain, but rather PIP_MOVE and VOL-.

After I added
KEYMAP[key.K_i] = 'i'
KEYMAP[key.K_n] = 'n'
right in front of the above mapping, everything is now working.

Perhaps I could have added
EVENTS['video']['PIP_MOVE'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='seek -60')
instead, but I did not check this.

Probably this was done to have a consistent interface for all slave programs, right? Either I did not get this from reading the documentation or it's not mentioned there. If I get back from vacation, I'll have a look at the wiki and explain this.

Then I switched from X11 to dfbmga output. I noticed that the keys did not work at all any more. Apparently "mplayer" is not driven in slave mode any more, but is running in "master mode".

So I had to add my desired commands to /etc/mplayer/input.conf to get it working.

Ok, now I have basically everything running. I cannot use some keys because they output obscure things like explained above, that don't map to one single key.

I'll have a look at your input layer module, when I'm back from vacation, but not before 1st of May.

-Rob

CU Michael.


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Freevo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to