Kodi Development  20.0
for Binary and Script based Add-Ons

8. Button mapping (controller configuration)

When the controller's button dialog wants the user to press a button, it creates a button mapper for the controller it belongs to.

It then waits for an event. When the event arrives, the dialog tells its button mapper to map the event to the controller feature being mapped.