xbmc / peripheral.joystick

Kodi joystick support (drivers and button maps)
GNU General Public License v2.0
24 stars 46 forks source link

Keyboard mapping support #136

Closed garbear closed 6 years ago

garbear commented 6 years ago

This allows for:

Previously, we mapped the key's scancode by pretending it was a joystick with a lot of buttons:

<buttonmap>
    <device name="Keyboard" provider="application">
        <controller id="game.controller.default">
            <feature name="a" button="128" />
        </controller>
    </device>
</buttonmap>

Now, the symbol is used instead of the scancode:

<buttonmap>
    <device name="Keyboard" provider="application">
        <controller id="game.controller.keyboard">
            <feature name="1" key="1" />
            <feature name="a" key="a" />
            <feature name="capslock" key="capslock" />
            <feature name="leftshift" key="leftshift" />
            <feature name="rightalt" key="rightalt" />
        </controller>
    </device>
</buttonmap>

A list of symbols is defined here: https://github.com/kodi-game/kodi-game-controllers/blob/keyboard/Readme.md