Just to wrap this thing up I did a bit of testing with Linux Mint and this should be something that will work with all versions of the OSMC remotes.
Run the following command in the terminal to make the remap file…
sudo nano /etc/udev/hwdb.d/osmcrf.hwdb
and copy/paste the following in its entirety into nano (there should be a button in the top right corner to copy the code block). You would then ctrl+x, y, then enter to save and exit.
evdev:input:b0003v2017p1689*
KEYBOARD_KEY_c0226=x
KEYBOARD_KEY_c00cd=p
KEYBOARD_KEY_7002e=volumeup
KEYBOARD_KEY_7002d=volumedown
evdev:input:b0003v2017p1690*
KEYBOARD_KEY_c0226=x
KEYBOARD_KEY_c00cd=p
KEYBOARD_KEY_7002e=volumeup
KEYBOARD_KEY_7002d=volumedown
evdev:input:b0003v2017p1688*
KEYBOARD_KEY_7004a=esc
KEYBOARD_KEY_c0060=i
KEYBOARD_KEY_10084=c
KEYBOARD_KEY_c0226=x
KEYBOARD_KEY_c00cd=p
KEYBOARD_KEY_7002e=volumeup
KEYBOARD_KEY_7002d=volumedown
evdev:input:b0003v2252p1037*
KEYBOARD_KEY_7004a=esc
KEYBOARD_KEY_c0060=i
KEYBOARD_KEY_10084=c
KEYBOARD_KEY_c0226=x
KEYBOARD_KEY_c00cd=p
KEYBOARD_KEY_c00b3=f
KEYBOARD_KEY_c00b4=r
Then run the following command to enable the map…
sudo systemd-hwdb update && sudo udevadm trigger
If anyone is making changes the above note that the file must NOT be set with an executable permission. Additionally, notice that there is a single space before each of the “KEYB…” lines and this is required for this to work.
If there is any Linux experts out there that know why when trying to remap to a keyboard multimedia keys “playpause” and “stop” don’t work and might have a solution then I would happy to hear it.