Kodi Development  20.0
for Binary and Script based Add-Ons

4. Handling input for the Game API

When a port is opened by the Game API, it is assigned an input handler that receives driver events involving driver elements, and dispatches events in the form of the desired controller.