[mythtv-users] updating a keymap

R. G. Newbury newbury at mandamus.org
Mon Nov 14 17:49:43 UTC 2016


On 11/13/2016 07:26 AM, Vincent McIntyre wrote:


> I need to remap a few keys to scancodes less than 255.
> The wiki page above refers to /usr/src/<linux>/input.h
> but I can't find any header files that have that kind
> of data in it.

On Fedora you would need to install 'kernel-devel' and 'kernel-headers'

Fedora puts the file at:

/usr/src/kernels/`uname -r`/include/uapi/linux/input-event-codes.h.

I have no idea where Ubuntu would put them but you need to have the 
appropriate kernel set installed

> Can anyone suggest how to find appropriate keycode names?



> The remote is a little unusual. I have a
> 'DVICO FusionHDTV DVB-T Dual Digital 4'
> tuner card and the (IR) remote came with that.
> The sensor for the remote plugs into the card
> with a 3.5mm jack and I run the cable to the
> front of the computer to a spot where the remote
> can talk to it. Worked fine with LIRC on 14.04.
> Now I'm trying to leave LIRC behind.
>
> The good news is the remote mainly works.
> evtest sees the device (event15 in the list below)
> and ir-keytable will talk to it if I specify the device, ie
>   ir-keytable -t -d /dev/input/event15
> Both report the same keycodes when I press any key, including
> the ones that don't work in mythtv.
>
> The keytable I get from ir-keytable -r exactly matches
> the one in /lib/udev/rc_keymaps/dvico_mce.
>
> The odd thing is the device does not show up in /sys/class/rc/,
> only event10 and event16 do. So ir-keytable does not show the
> device by default. Can anyone explain why this occurs?

Quite different here:

ls -A /sys/class/rc/
lrwxrwxrwx  1 root root 0 Nov  6 12:02 rc0 -> 
../../devices/pci0000:00/0000:00:04.0/usb3/3-5/3-5:1.0/rc/rc0

[root at myth rc]# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller

So Fedora does not put to the /dev/event instance although that exists 
in /dev
ls -A /dev/input/by-id/
lrwxrwxrwx 1 root root   9 Nov  6 09:32 usb-15c2_ffdc-event-if00 -> 
../event5


> # evtest
> /dev/input/event4:	iMON Panel, Knob and Mouse(15c2:ffdc)
> /dev/input/event10:	iMON Remote (15c2:ffdc)

I think you are testing the wrong event: the iMon remote is event4 and 
10 not 15

My system is using what you have as event10. My event4 gives a smaller 
key list than the one for what you have as event10, But the keys which 
do not work as all listed as  >255 in both lists. evtest wants to use 
event 4. Now I have to figure out how to change that mapping... from the 
'Panel, Knob' to the 'Remote'.

Not that it seems to matter:

> # ir-keytable
> Found /sys/class/rc/rc0/ (/dev/input/event10) with:
> 	Driver imon, table rc-imon-mce
> 	Supported protocols: rc-6
> 	Enabled protocols: rc-6
> 	Name: iMON Remote (15c2:ffdc)
> 	bus: 3, vendor/product: 15c2:ffdc, version: 0x0000
> 	Repeat delay = 500 ms, repeat period = 125 ms

My system reports /dev/input/event10 with
     Driver imon, table rc_imon-pad
     Supported protocols other
(Well actually in my case, it is event5, but it is the Remote)

So are close. You just need to find the correct input-event-codes.h file.
Note that I posted the top section of my /etc/rc_keymaps/imon_pad on 
this list a couple of days ago.
But yell if you need help.

Geoff



More information about the mythtv-users mailing list