[mythtv-users] holtek keyboard mappings not recognised
Corona Sensei
coronasensei at gmail.com
Mon Apr 8 03:07:59 UTC 2013
On 4/04/2013 7:44 PM, Mike de Plume wrote:
> On Thu, 2013-04-04 at 09:40 +1100, Corona Sensei wrote:
>> On 4/04/2013 8:20 AM, Mike de Plume wrote:
>>> On Wed, 2013-04-03 at 21:36 +0100, Mike de Plume wrote:
>>>> On Mon, 2013-04-01 at 23:10 +0100, Mike de Plume wrote:
>>>>> I have a box that comes with a IR interface that reports itself as a
>>>>> HOLTEK keyboard. Not a problem - I read the wiki entry
>>>>> http://www.mythtv.org/wiki/Generic_HID_%22MCE%22_Remotes and created a
>>>>> setxxkbmap as described.
>>>>>
>> Hi Mike,
>> I've also got a cheap IR remote that reports itself as Holtek.
>> After battling with it's various key combinations previously, I went
>> looking for a different solution when moving the remote to a new slave
>> frontend and stumbled upon this: http://rtr.ca/sapphire_remote/
>>
>> It's basically a replacement hid driver that's customised for remotes,
>> and allows you to map any keypress to any button, including choosing to
>> have modifyers (ctrl/alt) if you want them.
>> Even better it lets you have a separate keypress for a long button hold,
>> and custom repeat rates for different keys. This means for instance that
>> I can have the power button normally mapped to esc, but then if I hold
>> it down for > 1 second send a different key that's macro'd to a script
>> to send the pc to sleep. It's a very flexible driver.
>
> I had thought of a replacement but I need to get over the fact that the
> box has a nice neat IR window and a replacement would (probably) mean a
> separate receiver hanging out somewhere. Actually, on second thoughts, a
> separate receiver means the positioning of the box relative to me is
> less critical. Hmmm...
>
>> I modified the driver and scripts to recognise my HOLTEK remote rather
>> than the original sapphire one and set up most of the keys on my remote
>> (it has different button keycodes to the sapphire one), as well as
>> figuring out settings to add to udev to run the script to set the driver
>> automatically when plugging the usb remote in.
>> Unfortunately I haven't written up my modifications yet, and the pc that
>> it's all on isn't remotely accessible at the moment, so I'll have to get
>> back to you later if you're interested.
> That looks well worth trying. Yes please.
>> Alternately, you can always use lirc with devinput to take over the
>> remote and stop X from seeing it as a keyboard. This is a really decent
>> solution that's probably better supported really, and should let you
>> remap the buttons to any keypress you want. There's some links down the
>> bottom of the sapphire page that might help with that.
> This thing reports itself as a keyboard in `lsusb`, so I don't know how
> that can be caught by lirc. That won't stop me reading the links,
> though.
>
> Thanks also to Martin who suggests eventlircd for this problem.
>
> I've got lots more reading to do, and some day time work as well, so
> I'll be back in a couple of days.
>
> Thanks
>
> Mike S.
>
Hi Mike, it does report itself as keyboard by default, but it goes
through the event layer to do so.
lirc with devinput module can basically take control of it from the
event layer and stop it acting as a keyboard.
To see what input devices are mapped to which /dev/input/* nodes run
this line from the command prompt:
for i in /sys/class/input/input* ; do echo -n "$(basename "$i"): "; ls
-d "$i"/event* | awk -F/ -vORS= '{print "/dev/input/" $6 ": "}'; cat
"$i/name"; done
The alternate sapphire driver however replaces the default hid one and
still reports itself as a keyboard, but it handles remapping keys in
between.
I've put most of my stuff up here:
http://www.alelec.net/cheap-hid-remote-on-linux-sapphire-driver/
But missed copying the udev stuff off the pc, so that'll have come
later. It's not needed until you want to change to this driver
permanently anyway.
Andrew
More information about the mythtv-users
mailing list