[mythtv] Interface to HID remote devices
dave
dave at atkinson.net.au
Tue Jun 5 00:26:16 UTC 2007
Clint,
The way I would approach this is to hack the kernel to map the remote keys to
what you want. I did this for the Twinhan remote see the bottom of
http://www.mythtv.org/wiki/index.php/Twinhan_Ter_or_MiniTer_DVT_PCI
This way you dont need to worry about X or Qt or LIRC just remap to the remote
key set. Modifying hid-input.c as I did allows you to support a usb keyboard
and remote at the same time without the key mapping interfering with each other.
The missing keys is probably because they are being mapped to nothing in
hid-input.
I'm taking the same approach for a USB remote that came with a product called
USB Radio XTreme (cheapest remote I could find locally in Australia and I
needed another one for a frontend I'm building). I've written a kernel driver
for it that remaps the keys to my current myth key settings.
Regards
David
p.s. hid-input.c is front event driven USB HID devices. It handles a rnge of
devices including keyboards, mice, joysticks. FOr keyboaords it basically
receives input event from the device which is a key number indexed from 0. It
then does a translation using a simple array to determine what key event this
should be translated to and then generates the input event.
On Mon, 4 Jun 2007 12:14:51 -0400 (GMT-04:00), Clint Eaker wrote
> I'm trying to investigate using a HID remote control device
> (Logitech UltraX remote) with Mythtv. Basically, it appears to the
> system as a HID keyboard. What I'm finding using EditKeys is that
> while many of the keys on the remote are recognized by Mythtv, many
> of the media remote oriented keys are not acknowledged by Mythtv at
> all (pressing the button on the remote to map the key/button within
> EditKeys simply does nothing).
>
> I have determined that support for the Logitech UltraX remote has
> been added to hid-input.c (http://lkml.org/lkml/2005/9/10/197). I'm
> assuming that what's going on is that Mythtv is listening for
> standard keyboard input. It appears that somewhere along the line
> the remote buttons that don't map to a standard keyboard are getting
> dropped (buttons like 'DVD' or 'TV'). I don't know whether they are
> being ignored by the standard keyboard driver or ignored by Mythtv
> (I suspect the former, but that's just a guess).
>
> The biggest challenge I'm running into is simply finding any kind of
> description of how any of this works. I'm not familiar with the
> linux architecture for handling user input or how it is received by
> applications. My suspicion is that to get this to work, Mythtv
> would have to be modified to recognize and listen to a separate
> interface in the HID driver that provides the key presses that are
> not part of the standard keyboard. But I don't know how to confirm this.
>
> Can anyone point me in the right direction for how I might be able
> to make some progress on this? Anything would be appreciated
> (suggestions on this forum, other forums that might be more suited
> to these questions, HOWTOs, documentation, anything).
>
> Thanks,
> Clint
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
More information about the mythtv-dev
mailing list