OSMC Remote Keyboard, Volume +- not working

  • Hello,

    I use LibreElec / Kodi on a Raspi 4B, System => About says:

    Distro: LibreELEC (official)

    Version: 9.2.6

    I have the keyboard layout configured as de-latin1-nodeadkeys (as I also have such a keyboard attached).

    I bought an an OSMC RF remote KEYBOARD. All works fine as expected, except the VolumeUp / VolumeDown keys.

    When attaching it to my main PC and using usbhid-dump I see:

    Feb 01 17:48:47 localhost.localdomain kernel: input: OSMC Remote Controller USB Keyboard Mouse System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:2017:1689.0006/input/input29

    Feb 01 17:48:47 localhost.localdomain kernel: hid-generic 0003:2017:1689.0006: input,hidraw5: USB HID v1.10 Mouse [OSMC Remote Controller USB Keyboard Mouse] on usb-0000:00:14.0-10/input1

    Feb 01 17:48:48 localhost.localdomain systemd-logind[1481]: Watching system buttons on /dev/input/event29 (OSMC Remote Controller USB Keyboard Mouse System Control)

    Feb 01 17:48:48 localhost.localdomain systemd-logind[1481]: Watching system buttons on /dev/input/event26 (OSMC Remote Controller USB Keyboard Mouse)

    Feb 01 17:48:48 localhost.localdomain systemd-logind[1481]: Watching system buttons on /dev/input/event28 (OSMC Remote Controller USB Keyboard Mouse Consumer Control)

    usbhid-dump -m 2017 -es

    Vol-

    001:010:000:STREAM 1612198757.484851

    00 00 2D 00 00 00 00 00

    => KEY_MINUS

    Vol+

    001:010:000:STREAM 1612198769.644489

    00 00 2E 00 00 00 00 00

    => KEY_EQUAL (which is also PLUS sign)

    When in LibreElec and starting the keymap editor I get 0xF200 (in decimal) when I press either Vol+ or Vol-.

    This part I don't understand, the USB packet (when on my main PC) shows clearly the expected values.

    Somewhere in LibreElec this gets translated to incorrect values, at least this is what I suspect.

    When I do by ssh and then press the remote:

    tail -f /storage/.kodi/temp/kodi.log

    Vol-:

    2021-02-01 19:07:01.616 T:3011532112 DEBUG: Keyboard: scancode: 0x0c, sym: 0x0000, unicode: 0x00df, modifier: 0x0

    2021-02-01 19:07:01.616 T:3011532112 DEBUG: GetActionCode: Trying Hardy keycode for 0xf200

    Vol+:

    2021-02-01 19:08:53.720 T:3011532112 DEBUG: Keyboard: scancode: 0x0d, sym: 0x0000, unicode: 0x0000, modifier: 0x0

    2021-02-01 19:08:53.720 T:3011532112 DEBUG: GetActionCode: Trying Hardy keycode for 0xf200

    What looks incorrect here is the 0x0D (and 0x0C), the scancode (in the USB packet) is 0x2D, not 0x0D.


    Another try I did:

    I installed Kodi as SW packet on a normal Raspberry Pi OS, there all works fine, no problems with the volume keys.


    EDIT:

    I use a german keyboard and also use the layout de-latin1-nodeadkeys.

    On an english keyboard it seems KEY_PLUS and KEY_MINUS are left to the backspace keys.

    On the german keyboard there are the characters ssharp and apostrophe.

    The scancode for both of them is the same, scancode 0x0C is KEY_MINUS on international keyboards and ssharp on german keyboards, both on scancode 0x0C.

    My RF keyboard emits 0x0C. My de-latin1-nodeadkeys makes this an ssharp. This is then not understood by Kodi.

    What would be the best way to fix this?


    Thanks for any hints,

    Torsten

    Edited once, last by tmohr (February 2, 2021 at 10:29 PM).