I'm emitting keys from a python script using python-uinput. Basic stuff such as up / down / enter / esc.
As far as I can see this works fine on my desktop, in the terminal, and with the browser. But when I run Kodi, it doesn't seem to respond at all. Is this something to do with it being a fullscreen application?
NB: I'm running Raspbian on model 3 Raspberry Pi.
Maybe you need to do: sudo modprobe uinput
The following script works for me to send Function key 12 to vice (a C64 emulator) based on a button press on a GPIO:
Note that I used uinput.KEY_F12 twice. The script should be run as root.