Add-on for remote response config

So, the way I’m configuring my remote’s response is by copying and modifying system’s 70-input-repeat.rules at /storage/.config/udev.rules.d. My modified 70-input-repeat.rules file looks like this:

ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", GOTO="start"

# don't change eventlircd device settings
ATTRS{name}=="eventlircd", GOTO="end"

# don't change settings of rc remotes
# SUBSYSTEMS=="rc", GOTO="end"

# set default repeat delay to 500ms like rc remotes
  RUN+="/usr/bin/ir-keytable --delay=350 --device=$devnode"
  RUN+="/usr/bin/ir-keytable --period=90 --device=$devnode"

ACTION=="add|change", KERNEL=="lirc*[0-9]", DRIVERS=="meson-ir", RUN+="/usr/bin/ir-ctl -d $devnode -t 35000"

Now within this file I can control 3 parameters of remote’s responsiveness: delay, period & idle timeout (last line - credits for this @HiassofT over at libreelec forums).

First of all, is this implementation correct? It works on my end but not sure if it can be considered correct or hacky.
If it’s good, I suppose it wouldn’t be difficult for an add-on to do that job, would it?
Maybe with options for remote control types (ATTRS{protocols} could be nec, rc-5, rc-6, jvc, sony, sanyo, rc-5-sz, lirc, sharp, mce_kbd, xmp).


1 Like