[SOLVED] Problems with mapping keys on a USB remote (HID keyboard/mouse device) and reading correct key codes

@darwindesign You’re right, thank you!

I just figured it out myself, shortly after posting and updating a moment later that I nocited it actually does a right-click :). That pointed me in the right direction, and from there I simply refered to Kodi’s official Wiki, specifically the remapping section regarding mice.

What you said is exactly what It did, the only difference being that I chose the “Back” action instead of “PreviousMenu”.

My ~/.kodi/userdata/keymaps/mouse.xml:

<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <global>
    <mouse>
      <rightclick>Back</rightclick>
    </mouse>
  </global>
</keymap>

My ~/.kodi/userdata/keymaps/keyboard.xml:

<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <global>
    <keyboard>
      <key id="61576">ActivateWindow(Home)</key>
    </keyboard>
  </global>
</keymap>

So now I have exactly what I wanted. The back button going back, and the home button going straight to the Home screen :).

Gosh, if only I noticed that it was actually doing a right-click earlier… that would’ve saved me sooooooo much time!