I made an aluminum case for one of my media centers. It has a built-in LCD display and several buttons connected to the GPIO. I was looking for how other users are solving the problem of controlling Kodi via GPIO. I found some options, but I didn't like anything. That's why I decided to create my own add-on for this purpose. I named it GPIO keyboard.
My add-on works on the principle of keyboard emulation. Pressing the button calls up a normal keyboard shortcut. For this to work, I had to create one more add-on. This is actually a python-evdev library, modified into a Kodi add-on form. This (binary) add-on is named the same as the original library, thus python-evdev (id = "script.module.evdev"). The python-evdev library is very powerful, and I think its use in Kodi add-ons could be much greater.
The GPIO keyboard add-on allows you to configure up to 16 buttons. Each button can have two functions (short or long press).
I made both add-ons in two versions. One is for Orange Pi boards (Allwinner), the other for Raspberry Pi 4.
There is no dedicated support area for Raspberry Pi created here, so I publish it together in the Allwinner space.
The GPIO keyboard add-on depends not only on the python-evdev add-on, but also on the Orange Pi Tools (or Raspberry Pi Tools) add-on.
Allwinner_addon_service.gpio-keyboard-001.zip
RPi4_addon_service.gpio-keyboard-001.zip