Hi, all!!
I've read Infrared Remotes [LibreELEC.wiki], but that's been only partially helpful, and I haven't been able to do things the way I want them.
I have LibreELEC working 99.9% of how I want it. My sole remaining issue has to do with my lack of ability to remap the KEY_SLEEP remote button. I've already successfully remapped KEY_POWER to CECActivateSource via a keymap file.
My problem is that somewhere at a lower level, KEY_SLEEP is mapped to KEY_POWER, so Kodi doesn't see a difference between them. Looking in /etc/eventlircd.d I see that there are 5 different files in which seems to be remapped to KEY_POWER.
Furthermore, using a laptop to debug the remote I see that KEY_POWER produces keycode 151 (0x97), while KEY_SLEEP produces 150 (0x96). However, I see no keymaps in /usr/lib/udev/rc_keymaps that associate 0x96 to KEY_SLEEP or 0x97 to KEY_POWER ... so I have no clue where this is defined.
So the key questions are:
1) where at the O/S level is KEY_SLEEP getting remapped to KEY_POWER?
2) if it's via a file in /etc/eventlircd.d (a *.evmap file), how do I override those mappings via /storage/.config? (or somesuch that will be preserved across updates)
I've been unable to use ir-keytable to do testing on the LE box itself because I get the "/sys/class/rc: No such file or directory" problem when I try to run ir-keytable, but I've not found information on how to correctly load the correct IR receiver driver (even in the link above).
Any help or additional links for reference would be greatly appreciated!