OK, let's try something different. We can remap the OK key with a hwdb file.
First install the system tools addon (from LibreELEC repository -> Programs) as we'll need the evtest program. Also remove the udev conf file from the previous test.
Reboot with only the wireless remote connected, then ssh in and stop kodi.
Now lookup the remote in /proc/bus/input/devices. According to the infos in post 3 there should be 2 entries, one for the keyboard / remote part and one for the mouse - we're interested in the former. Look at the name entries (Name="2.4G Smart Remote") and the handler (Handlers=sysrq kbd eventX) to locate it - ignore the one with the mouse handler.
We need the event device number (eventX) and sysfs path from that block:
Quote
I: Bus=0003 Vendor=25a7 Product=5704 Version=0101
N: Name="2.4G Smart Remote"
P: Phys=usb-3f980000.usb-1.3/input0
S: Sysfs=/devices/platform/soc/http://3f980000.usb/usb1/1-1/1-1.3…01/input/input0
U: Uniq=
H: Handlers=sysrq kbd event0
B: PROP=0
B: EV=10001f
B: KEY=3f 3007f 0 0 0 0 483ffff 17aff32d bf544446 0 0 1 130f93 8b17c007 ffff7bfa d941dfff febeffdf ffefffff ffffffff fffffffe
B: REL=40
B: ABS=1 0
B: MSC=10
Display More
Now run evtest on the event device (substitute event0 with the event device number from above)
Press the OK button, you should get something like this:
Event: time 1510571041.251851, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1510571041.251851, type 1 (EV_KEY), code 352 (KEY_OK), value 1
Event: time 1510571041.251851, -------------- SYN_REPORT ------------
Event: time 1510571041.291835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1510571041.291835, type 1 (EV_KEY), code 352 (KEY_OK), value 0
Event: time 1510571041.291835, -------------- SYN_REPORT ------------
We are interested in the scancode of the button, that's the value in the EV_MSC line. In the output above that would be 70028. The EV_KEY line tells us which key code the button/key is mapped to - in above example it's KEY_OK (which kodi can't handle), we want to remap that to KEY_ENTER (which kodi supports).
Now stop evtest with ctrl-c.
Next thing we need is the modalias of the input device. We can get that with udevadm using the sysfs path from above. Run the following command, replace the long /devices/platform/... path with the one you got from /proc/bus/input/devices
udevadm test /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:25A7:5704.0001/input/input0 2>&1 | grep ^MODALIAS
This should print a line like this:
MODALIAS=input:b0003v05A4p9881e0110-e0,1,4,11,14,k77,7D,7E,7F,160,ram4,l0,1,2,sfw
The important info from that line is the "input:bXXXXvYYYYpZZZZ" part. In your case that would probably be "input:b0003v25A7p5704" (b0003 is USB bus, followed by v and uppercase USB vendor id, followed by p and uppercase USB product id) - we can ignore the stuff after that (eXXXX is the version info from USB).
Now with this info we can create a /storage/.config/hwdb.d/70-local-keyboard.hwdb file with the following content. Replace the "input:..." and the scancode in KEYBOARD_KEY_XXXXX with your values. Don't forget the "*" at the end of the evdev:input:... line!
evdev:input:b0003v05A4p9881*
KEYBOARD_KEY_70028=enter
To activate the config run the following commands:
udevadm hwdb --update
udevadm trigger -s input
Then run evtest again, press the OK button and verify that you now see KEY_ENTER in the EV_KEY lines
evtest /dev/input/event0
...
Event: time 1510573065.623580, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1510573065.623580, type 1 (EV_KEY), code 28 (KEY_ENTER), value 1
Event: time 1510573065.623580, -------------- SYN_REPORT ------------
Event: time 1510573065.663566, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1510573065.663566, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1510573065.663566, -------------- SYN_REPORT ------------
If it doesn't work please post the evtest output and the contents of your hwdb file.
so long,
Hias