<?xml version="1.0" encoding="UTF-8"?>
<buttonmap version="2">
  <controller id="game.controller.msx.joystick" type="RETRO_DEVICE_JOYPAD">
    <feature name="button1" mapto="RETRO_DEVICE_ID_JOYPAD_A"/>
    <feature name="button2" mapto="RETRO_DEVICE_ID_JOYPAD_B"/>
    <feature name="up" mapto="RETRO_DEVICE_ID_JOYPAD_UP"/>
    <feature name="right" mapto="RETRO_DEVICE_ID_JOYPAD_RIGHT"/>
    <feature name="down" mapto="RETRO_DEVICE_ID_JOYPAD_DOWN"/>
    <feature name="left" mapto="RETRO_DEVICE_ID_JOYPAD_LEFT"/>
  </controller>
  <controller id="game.controller.colecovision" type="RETRO_DEVICE_JOYPAD">
    <feature name="left" mapto="RETRO_DEVICE_ID_JOYPAD_A"/>
    <feature name="right" mapto="RETRO_DEVICE_ID_JOYPAD_B"/>
    <feature name="up" mapto="RETRO_DEVICE_ID_JOYPAD_UP"/>
    <feature name="right" mapto="RETRO_DEVICE_ID_JOYPAD_RIGHT"/>
    <feature name="down" mapto="RETRO_DEVICE_ID_JOYPAD_DOWN"/>
    <feature name="left" mapto="RETRO_DEVICE_ID_JOYPAD_LEFT"/>
    <feature name="keypad1" mapto="RETRO_DEVICE_ID_JOYPAD_X"/>
    <feature name="keypad2" mapto="RETRO_DEVICE_ID_JOYPAD_Y"/>
    <feature name="keypad3" mapto="RETRO_DEVICE_ID_JOYPAD_R"/>
    <feature name="keypad4" mapto="RETRO_DEVICE_ID_JOYPAD_L"/>
    <feature name="keypad5" mapto="RETRO_DEVICE_ID_JOYPAD_R2"/>
    <feature name="keypad6" mapto="RETRO_DEVICE_ID_JOYPAD_L2"/>
    <feature name="keypad7" mapto="RETRO_DEVICE_ID_JOYPAD_R3"/>
    <feature name="keypad8" mapto="RETRO_DEVICE_ID_JOYPAD_L3"/>
    <!-- Player 1: RETROK_2 -->
    <!-- Player 2: RETROK_4 -->
    <feature name="keypad9" mapto=""/>
    <!-- Player 1: RETROK_1 -->
    <!-- Player 2: RETROK_3 -->
    <feature name="keypad0" mapto=""/>
    <feature name="star" mapto="RETRO_DEVICE_ID_JOYPAD_SELECT"/>
    <feature name="pound" mapto="RETRO_DEVICE_ID_JOYPAD_START"/>
  </controller>
  <controller id="game.controller.msx.keyboard" type="RETRO_DEVICE_KEYBOARD">
    <!-- Row 0 -->
    <feature name="f1" mapto="RETROK_F1"/>
    <feature name="f2" mapto="RETROK_F2"/>
    <feature name="f3" mapto="RETROK_F3"/>
    <feature name="f4" mapto="RETROK_F4"/>
    <feature name="f5" mapto="RETROK_F5"/>
    <feature name="home" mapto="RETROK_HOME"/>
    <feature name="ins" mapto="RETROK_INSERT"/>
    <feature name="del" mapto="RETROK_DELETE"/>
    <feature name="stop" mapto="RETROK_END"/>
    <!-- Row 1 -->
    <feature name="esc" mapto="RETROK_ESCAPE"/>
    <feature name="1" mapto="RETROK_1"/>
    <feature name="2" mapto="RETROK_2"/>
    <feature name="3" mapto="RETROK_3"/>
    <feature name="4" mapto="RETROK_4"/>
    <feature name="5" mapto="RETROK_5"/>
    <feature name="6" mapto="RETROK_6"/>
    <feature name="7" mapto="RETROK_7"/>
    <feature name="8" mapto="RETROK_8"/>
    <feature name="9" mapto="RETROK_9"/>
    <feature name="0" mapto="RETROK_0"/>
    <feature name="minus" mapto="RETROK_MINUS"/>
    <feature name="equals" mapto="RETROK_EQUALS"/>
    <feature name="backslash" mapto="RETROK_BACKSLASH"/>
    <feature name="backspace" mapto="RETROK_BACKSPACE"/>
    <!-- Row 2 -->
    <feature name="tab" mapto="RETROK_TAB"/>
    <feature name="q" mapto="RETROK_q"/>
    <feature name="w" mapto="RETROK_w"/>
    <feature name="e" mapto="RETROK_e"/>
    <feature name="r" mapto="RETROK_r"/>
    <feature name="t" mapto="RETROK_t"/>
    <feature name="y" mapto="RETROK_y"/>
    <feature name="u" mapto="RETROK_u"/>
    <feature name="i" mapto="RETROK_i"/>
    <feature name="o" mapto="RETROK_o"/>
    <feature name="p" mapto="RETROK_p"/>
    <feature name="leftbracket" mapto="RETROK_LEFTBRACKET"/>
    <feature name="rightbracket" mapto="RETROK_RIGHTBRACKET"/>
    <feature name="return" mapto="RETROK_RETURN"/>
    <!-- Row 3 -->
    <feature name="ctrl" mapto="RETROK_LCTRL"/>
    <feature name="a" mapto="RETROK_a"/>
    <feature name="s" mapto="RETROK_s"/>
    <feature name="d" mapto="RETROK_d"/>
    <feature name="f" mapto="RETROK_f"/>
    <feature name="g" mapto="RETROK_g"/>
    <feature name="h" mapto="RETROK_h"/>
    <feature name="j" mapto="RETROK_j"/>
    <feature name="k" mapto="RETROK_k"/>
    <feature name="l" mapto="RETROK_l"/>
    <feature name="ntilde" mapto=""/>
    <feature name="quote" mapto="RETROK_QUOTE"/>
    <feature name="semicolon" mapto="RETROK_SEMICOLON"/>
    <!-- Row 4 -->
    <feature name="leftshift" mapto="RETROK_LSHIFT"/>
    <feature name="z" mapto="RETROK_z"/>
    <feature name="x" mapto="RETROK_x"/>
    <feature name="c" mapto="RETROK_c"/>
    <feature name="v" mapto="RETROK_v"/>
    <feature name="b" mapto="RETROK_b"/>
    <feature name="n" mapto="RETROK_n"/>
    <feature name="m" mapto="RETROK_m"/>
    <feature name="comma" mapto="RETROK_COMMA"/>
    <feature name="period" mapto="RETROK_PERIOD"/>
    <feature name="divide" mapto="RETROK_SLASH"/>
    <feature name="rightshift" mapto="RETROK_RSHIFT"/>
    <feature name="backtick" mapto=""/>
    <!-- Row 5 -->
    <feature name="capslock" mapto="RETROK_CAPSLOCK"/>
    <feature name="code" mapto=""/>
    <feature name="space" mapto="RETROK_SPACE"/>
    <feature name="graph" mapto="RETROK_LALT"/>
    <feature name="select" mapto=""/>
    <!-- Arrows -->
    <feature name="up" mapto="RETROK_UP"/>
    <feature name="right" mapto="RETROK_RIGHT"/>
    <feature name="down" mapto="RETROK_DOWN"/>
    <feature name="left" mapto="RETROK_LEFT"/>
    <!-- Numeric keyboard -->
    <feature name="num7" mapto="RETROK_KP7"/>
    <feature name="num8" mapto="RETROK_KP8"/>
    <feature name="num9" mapto="RETROK_KP9"/>
    <feature name="numdivide" mapto="RETROK_KP_DIVIDE"/>
    <feature name="num4" mapto="RETROK_KP4"/>
    <feature name="num5" mapto="RETROK_KP5"/>
    <feature name="num6" mapto="RETROK_KP6"/>
    <feature name="nummultiply" mapto="RETROK_KP_MULTIPLY"/>
    <feature name="num1" mapto="RETROK_KP1"/>
    <feature name="num2" mapto="RETROK_KP2"/>
    <feature name="num3" mapto="RETROK_KP3"/>
    <feature name="numminus" mapto="RETROK_KP_MINUS"/>
    <feature name="num0" mapto="RETROK_KP0"/>
    <feature name="numperiod" mapto="RETROK_KP_ENTER"/>
    <feature name="numcomma" mapto="RETROK_KP_PERIOD"/>
    <feature name="numadd" mapto="RETROK_KP_PLUS"/>
    <!-- SVI specific keys -->
    <feature name="print" mapto="RETROK_PRINT"/>
  </controller>
</buttonmap>
