[split] Peripheral Input Documentation
EDIT: See updated documentation at http://forum.kodi.tv/showthread.php?tid=230276

The peripheral input system allows keyboards and game controllers to control Kodi, game add-ons, and button mapping utilities. The documentation is a series of procedures:

1. Scanning keyboards and joysticks


2. Mapping a button


3. Mapping a keyboard key


4. Handling joystick event

Joystick events are mapped to virtual game controller (using button map data). Controller input is then:
* sent to a game add-on, or
* converted to an action and sent to Kodi


5. Handling keyboard events

Keyboards are abstracted as joysticks with many buttons so that joystick input handlers can be re-used. Kodi input is handled elsewhere, so keyboard input is only sent to game add-ons.


The full system in all its glory


EDIT: Split thread, updated diagrams
Wow a developer who actually documents some stuff, nice Wink
What do they tell ya? There's gold at the end of a rainbow? Smile Looks like the truth to me.. Awesome work!
split thread, this documentation should be easier to find
Out of curiosity: how do you manage features like rumble or force feedback?
Rumble is easy, all you gotta do is reverse some arrows in some of these flow charts.


Instead of input events flowing from the joystick to the game add-on, rumble events would flow from the game add-on to the joystick.

Logout Mark Read Team Forum Stats Members Help
[split] Peripheral Input Documentation0
This forum uses Lukasz Tkacz MyBB addons.