channel up/downdon't. To solve this LibreELEC runs
eventlircdin the background to translate Linux input events into LIRC events. So "under the hood" the new scheme is being used, but remote buttons still show up as LIRC events in Kodi.
Lircmap.xmland then buttons are mapped to Kodi actions via
keyboard.xmlfiles. This wiki page describes the LibreELEC configuration. Information on Kodi configuration is available in the Kodi LIRC and Kodi Keyboard.xml wiki pages.
ir-keytableto configure Infra-Red Remotes. Each IR receiver kernel driver installs a default
keytablewhich specifies the IR protocol to use, e.g. RC5, RC6, NEC, and the scancode to Linux keycode mappings.
ir-keytable -ais automatically run to change the kernel default configuration. First
/etc/rc_maps.cfgdetermines which keytable to load. Then the corresponding keytable file from
/usr/lib/udev/rc_keymapsis used to configure the remote control driver.
/storage/.config/rc_maps.cfg.samplehas simple examples.
libreelec_multikeytable instead of rc6_mce.
libreelec_multikeytable allows us to support Xbox 360/One remotes "out of box" in addition to MCE/RC6 remotes. This is configured via the following change:
ir-keytable -c -w /path/to/keytable-filee.g.
/storage/.config/rc_maps.cfgwith the name of the keytable, e.g. if the
samsungkeytable works the file with the following content:
ir-keytable -a /storage/.config/rc_maps.cfgand the output should look like:
ir-keytableto find out which protocols tthe receiver driver supports. Look at the
Supported protocols:line, e.g.
ir-keytable -p PROTOCOL -tand press buttons on the remote. If you discover the correct protocol you will see
EV_MSCevents and the scancode of the button pressed, e.g.
CTRL-Cand try another protocol from the list. You can ignore
lircas this is not a real protocol.
/storage/.config/rc_keymaps/custom_remoteand set the header file. In the example above the protocol is
rc-5so we set:
custom_remotekeytable file, e.g. in one open the
ir-keytable -tto find out the scancode of each button. For each button do the following:
irrecord -l | grep ^KEYbut it is easiest to use keycodes listed in the
<remote device=“devinput”>section of
/usr/share/kodi/system/Lircmap.xmlelse you must also create a Kodi
lircmap.xmlwith Linux keycode to action mappings.
CTRL-Cand then restart it with the keytable file:
ir-keytable -tand press buttons. In addition to EV_MSC scancode events you should now see EV_KEY events, e.g.
/storage/.config/rc_maps.cfgwith the following content:
ir-keytable. If you see the error message
/sys/class/rc/: No such file or directoryno driver is loaded.
lircas a supported protocol. If yes, run
ir-ctl -rto show raw, undecoded signals from the receiver. If IR reception works you will see lots of pulse and space lines when pressing a button. Note: On kernels before 4.3 lirc may be listed in Supported protocols but not in Enabled protocols. In this case run
ir-keytable -p lircto enable it first (remembering this will disable other decoders).
lircdis running run
ir-keytable. If only
lircshows up in
Enabled protocols:lircd is running. When it starts it disables all other protocols). You can also run
ps | grep /usr/sbin/lircdto check for
/usr/sbin/lircd-uinputprocesses. If you see them LIRC enabled. If LIRC is enabled, disable it in LibreELEC Settings > Services and reboot.
ir-keytable -rto show the current keytable and protocol. Compare this to the header in
/storage/.config/rc_maps.cfgreferences the correct keytable name.
ir-keytable -tand press buttons on the remote. You should see EV_MSC events with the scancode and EV_KEY events with the Linux keycode, e.g.
irwto show the translated LIRC events Kodi sees. When pressing a button you should see messages like this:
LIRC: Updatelike this:
OnKey:line shows the action generated after applying
remote.xml. If you see LIRC lines but incorrect actions, check your Kodi
remote.xmlconfig files are correct.
/etc/lirc/lirc_options.conffile configures the default LIRC driver and /dev/lirc0.
/etc/lirc/lircd.conffile includes remote configs for MCE, Xbox 360, Xbox One, and a few others.
/storage/.config/lirc_options.confwith needed changes.
lircd-uinputreads decoded LIRC events from
/run/lirc/lircd.socketand translates these to Linux input events via the Linux uinput driver. The Linux input events from lircd-uinput are then picked up by
eventlircdand fed to Kodi as LIRC events via the
atvclientto support the Apple IR sensor and send LIRC events to Kodi. Since 9.2.0 we use the native Linux kernel driver for the IR sensor, which sends normal HID events. Create a custom keymap in
/storage/.kodi/userdata/keymaps/keymap.xmlwith the following content to map a White or Silver remote: