xbmc/xbmc — pull request #2706 by cptspiff (2013-05-07 21:19:16+00:00)
Title: Peripheral add-ons

I have always found system/keymaps and system/Lircmap.xml to be a little messy.
they are shipped with the core application and thus cannot be updated between releases. furthermore everything is one huge monolith so over time we hardly know where half the data comes from, which platform(s) is is for and so on.

This moves all input devices to a peripheral add-on extension point. the add-ons themself have been done in a hurry, without putting a lot of thought into cosmetics and such.

a peripheral is basically just a collection of keymaps, lircmaps and irssmaps in any combination wrapped up in the usual add-on fluff.

they can be marked as 'reference' add-ons. these will be loaded first, and is to be used with stuff like the general keyboard mappings, general mouse mappings etc.

they can also be marked as 'conditional' add-ons. this is to be used with the peripheral manager stuff, and are not auto-injected into the button translator. rather, it's done when the peripheral is detected, as exemplified for the nyxboard. it can probably be done cleaner than this simple approach, but most important is that @opdenkamp believes this is enough to add better code later.

cleaning up our code in the keymapping and keymap parsing department is quite the task. i have started it with this work, but there is lots left to do. hopefully you'll agree that this can be done in incremental steps. it's just too much to do in one go, and it's a shame to delay (what i consider) nice features waiting for all the code to be cleaned up.

i have chosen to go for some (temporary) code duplication. in parts, since this changes the XML format slightly (to ease device aliasing) there would be close, but not quite identical code in any case (you know xml..) in parts because we can do cleaner code (no need to worry about legacy) and then simply drop the old once we are satisfied.