ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event3) with:
Driver sunxi-rc-recv, table rc_map_sunxi
Supported protocols: lirc rc-5 jvc sony nec sanyo mce-kbd rc-6
Enabled protocols: nec
Name: sunxi_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
sudo ir-keytable -r -d /dev/input/event3
will print out a list of the scancodes and the keys that they are mapped to.
Test the remote by sudo ir-keytable -t -d /dev/input/event3
The codes for the remote I am using did not match default keytable rc_map_sunxi, thus no mapping occurred, just scancodes read.
Dump the mapping into a file
ir-keytable -r > rc-wdkeymap
Get scancodes for each button using -t and edit scancodes in rc-wdkeymap to suit mythtv
eg scancode 0x847912 = KEY_ESC (0x01) #
scancode 0x847918 = KEY_1 (0x02) #
sudo ir-keytable -w rc-wdkeymap -d /dev/input/event3
Test the remote again by sudo ir-keytable -t -d /dev/input/event3
To make permanent:
copy rc-wdkeymap to /etc/rc_keymaps/rc-wdkeymap
Add this line to /etc/rc_maps.cfg
#driver table file
sunxi-rc-recv rc_map_sunxi /etc/rc_keymaps/rc-wdkeymap