<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mapping of keys to actions within Kodi.                       -->
<!--                                                                                      -->
<!-- The format is:                                                                       -->
<!--  <window>                                                                            -->
<!--    <device>                                                                          -->
<!--      <button>action</button>                                                         -->
<!--    </device>                                                                         -->
<!--  </window>                                                                           -->
<!--                                                                                      -->
<!-- The <global> section is a fall through - they will only be used if the button is     -->
<!-- not used in the current window's section.                                            -->
<!--                                                                                      -->
<!-- Actions can be built-in functions.                                                   -->
<!--  eg <B>ActivateWindow(Music)</B>                                                     -->
<!-- would automatically go to Music on the press of the B button.                        -->
<!--                                                                                      -->
<!--                                                                                      -->
<!-- An empty action removes the corresponding mapping from default and parent keymaps.   -->
<!-- This is different from a "noop" action, which disables a button.                     -->
<!--                                                                                      -->
<!-- More documentation on keymaps can be found on http://kodi.wiki/view/keymaps          -->
<keymap>
  <global>
    <joystick>
      <a>Select</a>
      <b>Back</b>
      <x>ContextMenu</x>
      <y>FullScreen</y>
      <start>ActivateWindow(PlayerControls)</start>
      <back>PreviousMenu</back>
      <guide>ActivateWindow(Home)</guide>
      <up>Up</up>
      <down>Down</down>
      <right>Right</right>
      <left>Left</left>
      <leftthumb>Screenshot</leftthumb>
      <rightthumb>ActivateWindow(ShutdownMenu)</rightthumb>
      <lefttrigger>ScrollUp</lefttrigger>
      <righttrigger>ScrollDown</righttrigger>
      <leftbumper>ScrollUp</leftbumper>
      <rightbumper>ScrollDown</rightbumper>
      <leftstickleft>Left</leftstickleft>
      <leftstickright>Right</leftstickright>
      <leftstickup>Up</leftstickup>
      <leftstickdown>Down</leftstickdown>
      <rightstickleft>VolumeDown</rightstickleft>
      <rightstickright>VolumeUp</rightstickright>
      <rightstickup>VolumeUp</rightstickup>
      <rightstickdown>VolumeDown</rightstickdown>
    </joystick>
  </global>
  <FileManager>
    <joystick>
      <rightbumper>Highlight</rightbumper>
    </joystick>
  </FileManager>
  <MusicPlaylist>
    <joystick>
      <leftbumper>Delete</leftbumper>
    </joystick>
  </MusicPlaylist>
  <Music>
  </Music>
  <FullscreenVideo>
    <joystick>
      <a>Pause</a>
      <b>Stop</b>
      <x>OSD</x>
      <y>FullScreen</y>
      <start>Info</start>
      <back>Seek(-7)</back>
      <guide>ActivateWindow(Home)</guide>
      <up>ChapterOrBigStepForward</up>
      <down>ChapterOrBigStepBack</down>
      <right>StepForward</right>
      <left>StepBack</left>
      <leftthumb>ShowSubtitles</leftthumb>
      <rightthumb>AspectRatio</rightthumb>
      <lefttrigger>AnalogRewind</lefttrigger>
      <righttrigger>AnalogFastForward</righttrigger>
      <leftbumper>AnalogRewind</leftbumper>
      <rightbumper>AnalogFastForward</rightbumper>
      <leftstickleft>AnalogSeekBack</leftstickleft>
      <leftstickright>AnalogSeekForward</leftstickright>
      <leftstickup>AnalogSeekForward</leftstickup>
      <leftstickdown>AnalogSeekBack</leftstickdown>
      <rightstickleft>VolumeDown</rightstickleft>
      <rightstickright>VolumeUp</rightstickright>
      <rightstickup>VolumeUp</rightstickup>
      <rightstickdown>VolumeDown</rightstickdown>
    </joystick>
  </FullscreenVideo>
  <FullscreenLiveTV>
    <joystick>
      <up>ChannelUp</up>
      <down>ChannelDown</down>
      <left>StepBack</left>
      <right>StepForward</right>
    </joystick>
  </FullscreenLiveTV>
  <FullscreenRadio>
    <joystick>
      <up>ChannelUp</up>
      <down>ChannelDown</down>
      <left>StepBack</left>
      <right>StepForward</right>
    </joystick>
  </FullscreenRadio>
  <FullscreenInfo>
    <joystick>
      <b>Close</b>
      <x>OSD</x>
      <start>Close</start>
      <lefttrigger>AnalogRewind</lefttrigger>
      <righttrigger>AnalogFastForward</righttrigger>
      <leftbumper>AnalogRewind</leftbumper>
      <rightbumper>AnalogFastForward</rightbumper>
    </joystick>
  </FullscreenInfo>
  <PlayerControls>
    <joystick>
      <x>Close</x>
      <leftthumb>Close</leftthumb>
      <rightthumb>Close</rightthumb>
    </joystick>
  </PlayerControls>
  <Visualisation>
    <joystick>
      <a>Pause</a>
      <b>Stop</b>
      <x>ActivateWindow(AddonSettings)</x>
      <y>ActivateWindow(VisualisationPresetList)</y>
      <start>Info</start>
      <rightthumb>ActivateWindow(MusicOSD)</rightthumb>
      <up>SkipNext</up>
      <down>SkipPrevious</down>
      <left>StepBack</left>
      <right>StepForward</right>
      <lefttrigger>AnalogRewind</lefttrigger>
      <righttrigger>AnalogFastForward</righttrigger>
      <leftbumper>AnalogRewind</leftbumper>
      <rightbumper>AnalogFastForward</rightbumper>
      <leftstickleft>PreviousPreset</leftstickleft>
      <leftstickright>NextPreset</leftstickright>
    </joystick>
  </Visualisation>
  <MusicOSD>
    <joystick>
      <b>Close</b>
      <start>Info</start>
    </joystick>
  </MusicOSD>
  <VisualisationPresetList>
    <joystick>
      <b>Close</b>
    </joystick>
  </VisualisationPresetList>
  <SlideShow>
    <joystick>
      <a>Pause</a>
      <b>Stop</b>
      <y>ZoomNormal</y>
      <leftbumper>Rotate</leftbumper>
      <rightbumper>Info</rightbumper>
      <up>ZoomIn</up>
      <down>ZoomOut</down>
      <left>PreviousPicture</left>
      <right>NextPicture</right>
      <leftstickleft>AnalogMoveX</leftstickleft>
      <leftstickright>AnalogMoveX</leftstickright>
      <leftstickup>AnalogMoveY</leftstickup>
      <leftstickdown>AnalogMoveY</leftstickdown>
      <lefttrigger>ZoomOut</lefttrigger>
      <righttrigger>ZoomIn</righttrigger>
    </joystick>
  </SlideShow>
  <ScreenCalibration>
    <joystick>
      <x>ResetCalibration</x>
      <leftbumper>NextResolution</leftbumper>
      <rightbumper>NextCalibration</rightbumper>
    </joystick>
  </ScreenCalibration>
  <ScreenCalibration>
    <joystick>
      <x>ResetCalibration</x>
      <leftbumper>NextResolution</leftbumper>
      <rightbumper>NextCalibration</rightbumper>
    </joystick>
  </ScreenCalibration>
  <VideoOSD>
    <joystick>
      <b>Close</b>
    </joystick>
  </VideoOSD>
  <VideoMenu>
    <joystick>
      <b>Stop</b>
      <x>OSD</x>
      <leftbumper>AspectRatio</leftbumper>
      <start>Info</start>
    </joystick>
  </VideoMenu>
  <OSDVideoSettings>
    <joystick>
      <leftbumper>AspectRatio</leftbumper>
      <x>Close</x>
    </joystick>
  </OSDVideoSettings>
  <OSDAudioSettings>
    <joystick>
      <leftbumper>AspectRatio</leftbumper>
      <x>Close</x>
    </joystick>
  </OSDAudioSettings>
  <VideoBookmarks>
    <joystick>
      <leftbumper>Delete</leftbumper>
    </joystick>
  </VideoBookmarks>
  <Videos>
  </Videos>
  <VideoPlaylist>
    <joystick>
      <leftbumper>Delete</leftbumper>
    </joystick>
  </VideoPlaylist>
  <VirtualKeyboard>
    <joystick>
      <b>BackSpace</b>
      <y>Symbols</y>
      <leftbumper>Shift</leftbumper>
      <leftthumb>Enter</leftthumb>
      <lefttrigger>CursorLeft</lefttrigger>
      <righttrigger>CursorRight</righttrigger>
    </joystick>
  </VirtualKeyboard>
  <ContextMenu>
    <joystick>
      <b>Close</b>
    </joystick>
  </ContextMenu>
  <Settings>
    <joystick>
      <b>PreviousMenu</b>
    </joystick>
  </Settings>
  <AddonInformation>
    <joystick>
      <b>Close</b>
    </joystick>
  </AddonInformation>
  <AddonSettings>
    <joystick>
      <b>Close</b>
    </joystick>
  </AddonSettings>
  <TextViewer>
    <joystick>
      <b>Close</b>
    </joystick>
  </TextViewer>
  <shutdownmenu>
    <joystick>
      <b>PreviousMenu</b>
      <leftthumb>PreviousMenu</leftthumb>
    </joystick>
  </shutdownmenu>
  <submenu>
    <joystick>
      <b>PreviousMenu</b>
    </joystick>
  </submenu>
  <MusicInformation>
    <joystick>
      <b>Close</b>
    </joystick>
  </MusicInformation>
  <MovieInformation>
    <joystick>
      <b>Close</b>
    </joystick>
  </MovieInformation>
  <NumericInput>
    <joystick>
      <b>BackSpace</b>
      <leftthumb>Enter</leftthumb>
    </joystick>
  </NumericInput>
  <GamepadInput>
    <joystick>
      <leftthumb>Stop</leftthumb>
    </joystick>
  </GamepadInput>
  <LockSettings>
    <joystick>
      <b>PreviousMenu</b>
      <leftthumb>Close</leftthumb>
    </joystick>
  </LockSettings>
  <ProfileSettings>
    <joystick>
      <b>PreviousMenu</b>
      <leftthumb>Close</leftthumb>
    </joystick>
  </ProfileSettings>
</keymap>
