Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
The lifetime of a button press for peripherals with input. More...
The lifetime of a button press for peripherals with input.
When a controller is plugged in and a button is pressed, it starts a large chain reaction of different systems. The button's journey is destined to reach one or more eventual outcomes:
Instead of being forced to use a single controller abstraction, game add-ons can request input in the form of any platform controller known to Kodi. For example, a NES emulator receives input events for a NES controller; if the emulator doesn't care, it receives events for a default 360-style controller.
If no game is receiving input in fullscreen mode, the button is translated to the default 360-style controller and Kodi's keymapping system takes over from here
A configuration utility needs know the button's driver index in order to map it to a feature on its controller. In addition to raw driver events, it also needs to promiscuously monitor the input translated to its platform controller to highlight features in the GUI as they're pressed.
The final system can handle any number of these input listeners, monitoring input in the form of any number of platform controllers
some class names are outdated, sorry