[split] Peripheral Input Documentation
#1
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

Image

2. Mapping a button

Image

3. Mapping a keyboard key

Image

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

Image

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.

Image

The full system in all its glory

Image

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

http://forum.kodi.tv/showthread.php?tid=230276

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.