<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<!-- The <global> section is a fall through - they will only be used if the button is not          -->
<!-- used in the current window's section.  Note that there is only handling                       -->
<!-- for a single action per button at this stage.                                                 -->
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox       -->
<!-- gamepads.                                                                                     -->

<!-- The format is:                      -->
<!--    <device>                         -->
<!--      <button>action</button>        -->
<!--    </device>                        -->

<!-- To map keys from other remotes using the RCA protocol, you may add <universalremote> blocks -->
<!-- In this case, the tags used are <obc#> where # is the original button code (OBC) of the key -->
<!-- You set it up by adding a <universalremote> block to the window or <global> section:       -->
<!--    <universalremote>             -->
<!--       <obc45>Stop</obc45>         -->
<!--    </universalremote>            -->

<!-- Note that the action can be a built-in function.                 -->
<!--  eg <B>XBMC.ActivateWindow(MyMusic)</B>                         -->
<!-- would automatically go to My Music on the press of the B button. -->

<!-- Joysticks / Gamepads:                                                                    -->
<!--   See the sample PS3 controller configuration below for the format.                      -->
<!--                                                                                          -->
<!--  Joystick Name:                                                                          -->
<!--   Do 'cat /proc/bus/input/devices' or see your xbmc log file  to find the names of       -->
<!--   detected joysticks. The name used in the configuration should match the detected name. -->
<!--                                                                                          -->
<!--  Button Ids:                                                                             -->
<!--   'id' is the button ID used by SDL. Joystick button ids of connected joysticks appear   -->
<!--   in xbmc.log when they are pressed. Use your log to map custom buttons to actions.      -->
<!--                                                                                          -->
<!--  Axis Ids / Analog Controls                                                              -->
<!--   Coming soon.                                                                           -->
<keymap>
  <global>
    <joystick name="Harmony">
      <!-- up       	-->      <button id="1">Up</button>
      <!-- minus      	-->      <button id="2">Down</button>
      <!-- left       	-->      <button id="3">Left</button>
      <!-- right      	-->      <button id="4">Right</button>
      <!-- OK		-->      <button id="5">Select</button>
      <!-- menu       	-->      <button id="6">ContextMenu</button>
      <!-- hold play  	-->      <button id="7">Fullscreen</button>
      <!-- hold menu  	-->      <button id="8">ContextMenu</button>
      <!-- hold right 	-->      <button id="9">Right</button>
      <!-- hold left  	-->      <button id="10">Left</button>
      <!-- Stop       	-->      <button id="15">Stop</button>
      <!-- Stop Hold   	-->      <button id="17"/>
      <!-- Play       	-->      <button id="16">Play</button>
      <!-- Play Hold   	-->      <button id="18"/>
      <!-- Replay       -->      <button id="91">SkipPrevious</button>
      <!-- Skip      	-->      <button id="92">SkipNext</button>
      <!-- Record	-->      <button id="52">Screenshot</button>
      <!-- Rew       	-->      <button id="41">Rewind</button>
      <!-- Fwd  	-->      <button id="42">FastForward</button>
      <!-- Pause	-->      <button id="26">Pause</button>
      <!-- Prev		-->      <button id="32">Back</button>
      <!-- Guide  	-->      <button id="65">FullScreen</button>
      <!-- Info  	-->      <button id="31">Info</button>
      <!-- Exit 	-->      <button id="51">ActivateWindow(Home)</button>
      <!-- Channel Up  	-->      <button id="71">PageUp</button>
      <!-- Channel Down -->      <button id="72">PageDown</button>
      <!-- looks like buttons below are duplicates of those above
      Arrow Up  	 <button id="71"></button>
      Arrow Down 	 <button id="72"></button>
	  -->
      <!-- Volume + 	-->  <button id="21">VolumeUp</button>
      <!-- Volume - 	-->  <button id="22">VolumeDown</button>
      <!-- 1 		-->      <button id="11">Number1</button>
      <!-- 2 		-->      <button id="12">Number2</button>
      <!-- 3 		-->      <button id="13">Number3</button>
      <!-- 4 		-->      <button id="14">Number4</button>
      <!-- 5 		-->      <button id="23">Number5</button>
      <!-- 6 		-->      <button id="24">Number6</button>
      <!-- 7 		-->      <button id="33">Number7</button>
      <!-- 8 		-->      <button id="34">Number8</button>
      <!-- 9 		-->      <button id="43">Number9</button>
      <!-- 0 		-->      <button id="44">Number0</button>
      <!-- * clear 	-->      <button id="45">Back</button>
      <!-- # enter 	-->      <button id="36">Select</button>
      <!-- Mute		-->      <button id="25">Mute</button>
      <!-- Aspect	-->      <button id="61">AspectRatio</button>
      <!-- F1		-->      <button id="53">XBMC.ActivateWindow(Music)</button>
      <!-- F3		-->      <button id="55">XBMC.ActivateWindow(videolibrary,tvshowtitles,return)</button>
      <!-- F2		-->      <button id="54">XBMC.ActivateWindow(videolibrary,movietitles,return)</button>
      <!-- F4		-->      <button id="56">XBMC.ActivateWindow(Weather)</button>
      <!-- F5			-->  <button id="93">OSD</button>
      <!-- F7			-->  <button id="95">XBMC.ActivateWindow(Home)</button>
      <!-- F6			-->  <button id="94">XBMC.ActivateWindow(Scripts)</button>
      <!-- F8			-->  <button id="96">XBMC.ActivateWindow(favourites)</button>
      <!-- F9			-->  <button id="73">ShowVideoMenu</button>
      <!-- F10			-->  <button id="74">ShowSubtitles</button>
      <!-- F11			-->  <button id="75">NextSubtitle</button>
      <!-- F12			-->  <button id="76">XBMC.ActivateWindow(VideoFiles)</button>
      <!-- F13			-->  <button id="63">Playlist</button>
      <!-- F14			-->  <button id="64">AudioNextLanguage</button>
      <!-- Large Down	-->  <button id="82">PageDown</button>
      <!-- Large Up	-->      <button id="81">PageUp</button>
      <!-- pwrToggle   -->   <button id="66">XBMC.ShutDown()</button>
      <!-- Queue	-->      <button id="62">Queue</button>
      <!-- Sleep	-->      <button id="46">XBMC.Suspend()</button>
      <!-- Red		-->      <button id="83">CodecInfo</button>
      <!-- Green	-->      <button id="84">XBMC.ActivateWindow(Settings)</button>
      <!-- Yellow	-->      <button id="85">xbmc.ActivateWindow(SystemSettings)</button>
      <!-- Blue		-->      <button id="86">XBMC.ActivateWindow(SystemInfo)</button>
    </joystick>
  </global>
  <Home>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">ContextMenu</button>
      <!-- Info  	-->      <button id="31">XBMC.ActivateWindow(Settings)</button>
      <!-- Exit 	-->      <button id="51">XBMC.ActivateWindow(ShutdownMenu)</button>
      <!-- #enter	-->      <button id="36">XBMC.ActivateWindow(SystemInfo)</button>
      <!-- 1 		-->      <button id="11">ToggleFullScreen</button>
    </joystick>
  </Home>
  <MyFiles>
    <joystick name="Harmony">
      <!-- 1 		-->      <button id="11">Highlight</button>
      <!-- 4 		-->      <button id="14">Copy</button>
      <!-- 7 		-->      <button id="33">Move</button>
      <!-- * clear 	-->      <button id="45">Delete</button>
    </joystick>
  </MyFiles>
  <MyMusicPlaylist>
    <joystick name="Harmony">
      <!-- * clear 	-->      <button id="45">Delete</button>
      <!-- Channel Up  	-->      <button id="71">MoveItemUp</button>
      <!-- Channel Down -->      <button id="72">MoveItemDown</button>
    </joystick>
  </MyMusicPlaylist>
  <MyMusicFiles>
    <joystick name="Harmony">
      <!-- * clear 	-->      <button id="45">Delete</button>
      <!-- 1 		-->      <button id="11">JumpSMS1</button>
      <!-- 2 		-->      <button id="12">JumpSMS2</button>
      <!-- 3 		-->      <button id="13">JumpSMS3</button>
      <!-- 4 		-->      <button id="14">JumpSMS4</button>
      <!-- 5 		-->      <button id="23">JumpSMS5</button>
      <!-- 6 		-->      <button id="24">JumpSMS6</button>
      <!-- 7 		-->      <button id="33">JumpSMS7</button>
      <!-- 8 		-->      <button id="34">JumpSMS8</button>
      <!-- 9 		-->      <button id="43">JumpSMS9</button>
    </joystick>
  </MyMusicFiles>
  <MyMusicLibrary>
    <joystick name="Harmony">
      <!-- 1 		-->      <button id="11">JumpSMS1</button>
      <!-- 2 		-->      <button id="12">JumpSMS2</button>
      <!-- 3 		-->      <button id="13">JumpSMS3</button>
      <!-- 4 		-->      <button id="14">JumpSMS4</button>
      <!-- 5 		-->      <button id="23">JumpSMS5</button>
      <!-- 6 		-->      <button id="24">JumpSMS6</button>
      <!-- 7 		-->      <button id="33">JumpSMS7</button>
      <!-- 8 		-->      <button id="34">JumpSMS8</button>
      <!-- 9 		-->      <button id="43">JumpSMS9</button>
    </joystick>
  </MyMusicLibrary>
  <FullscreenVideo>
    <joystick name="Harmony">
      <!-- up       	-->      <button id="1">BigStepForward</button>
      <!-- down      	-->      <button id="2">BigStepBack</button>
      <!-- left       	-->      <button id="3">StepBack</button>
      <!-- right      	-->      <button id="4">StepForward</button>
      <!-- menu       	-->      <button id="6">OSD</button>
      <!-- Prev		-->      <button id="32">SmallStepBack</button>
      <!-- Info  	-->      <button id="31">Info</button>
      <!-- F7		-->      <button id="95">NextSubtitle</button>
      <!-- F6		-->      <button id="94">ShowSubtitles</button>
    </joystick>
  </FullscreenVideo>
  <FullscreenLiveTV>
    <joystick name="Harmony">
      <!-- up       	-->      <button id="1">ChannelUp</button>
      <!-- down      	-->      <button id="2">ChannelDown</button>
      <!-- left       	-->      <button id="3">PreviousChannelGroup</button>
      <!-- right      	-->      <button id="4">NextChannelGroup</button>
    </joystick>
  </FullscreenLiveTV>
  <FullscreenInfo>
    <joystick name="Harmony">
      <!-- Info  	-->      <button id="31">Back</button>
    </joystick>
  </FullscreenInfo>
  <PlayerControls>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </PlayerControls>
  <Visualisation>
    <joystick name="Harmony">
      <!-- up       	-->      <button id="1">IncreaseRating</button>
      <!-- minus      	-->      <button id="2">DecreaseRating</button>
      <!-- left       	-->      <button id="3">PreviousPreset</button>
      <!-- right      	-->      <button id="4">NextPreset</button>
      <!-- menu       	-->      <button id="6">OSD</button>
      <!-- Prev		-->      <button id="32">LockPreset</button>
      <!-- Info  	-->      <button id="31">Info</button>
      <!-- F8		-->      <button id="96">XBMC.ActivateWindow(VisualisationPresetList)</button>
      <!-- F9		-->      <button id="73">XBMC.ActivateWindow(VisualisationSettings)</button>
    </joystick>
  </Visualisation>
  <MusicOSD>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
      <!-- Info  	-->      <button id="31">CodecInfo</button>
    </joystick>
  </MusicOSD>
  <VisualisationSettings>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </VisualisationSettings>
  <VisualisationPresetList>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </VisualisationPresetList>
  <SlideShow>
    <joystick name="Harmony">
      <!-- 1 		-->      <button id="11">ZoomLevel1</button>
      <!-- 2 		-->      <button id="12">ZoomLevel2</button>
      <!-- 3 		-->      <button id="13">ZoomLevel3</button>
      <!-- 4 		-->      <button id="14">ZoomLevel4</button>
      <!-- 5 		-->      <button id="23">ZoomLevel5</button>
      <!-- 6 		-->      <button id="24">ZoomLevel6</button>
      <!-- 7 		-->      <button id="33">ZoomLevel7</button>
      <!-- 8 		-->      <button id="34">ZoomLevel8</button>
      <!-- 9 		-->      <button id="43">ZoomLevel9</button>
      <!-- 0 		-->      <button id="44">ZoomNormal</button>
      <!-- Skip      	-->      <button id="92">NextPicture</button>
      <!-- Replay       -->      <button id="91">PreviousPicture</button>
      <!-- Info  	-->      <button id="31">Info</button>
      <!-- OK		-->      <button id="5">Rotate</button>
    </joystick>
  </SlideShow>
  <ScreenCalibration>
    <joystick name="Harmony">
      <!-- OK		-->      <button id="5">NextCalibration</button>
      <!-- 0 		-->      <button id="44">ResetCalibration</button>
      <!-- # enter 	-->      <button id="36">NextCalibration</button>
      <!-- Guide  	-->      <button id="65">NextResolution</button>
    </joystick>
  </ScreenCalibration>
  <GUICalibration>
    <joystick name="Harmony">
      <!-- OK		-->      <button id="5">NextCalibration</button>
      <!-- 0 		-->      <button id="44">ResetCalibration</button>
      <!-- # enter 	-->      <button id="36">NextCalibration</button>
    </joystick>
  </GUICalibration>
  <VideoOSD>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </VideoOSD>
  <VideoMenu>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">OSD</button>
      <!-- Info  	-->      <button id="31">Info</button>
    </joystick>
  </VideoMenu>
  <OSDVideoSettings>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </OSDVideoSettings>
  <OSDAudioSettings>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </OSDAudioSettings>
  <VideoBookmarks>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
      <!-- * clear 	-->      <button id="45">Delete</button>
    </joystick>
  </VideoBookmarks>
  <MyVideoLibrary>
    <joystick name="Harmony">
      <!-- * clear 	-->      <button id="45">Delete</button>
      <!-- # enter 	-->      <button id="36">ToggleWatched</button>
      <!-- 1 		-->      <button id="11">JumpSMS1</button>
      <!-- 2 		-->      <button id="12">JumpSMS2</button>
      <!-- 3 		-->      <button id="13">JumpSMS3</button>
      <!-- 4 		-->      <button id="14">JumpSMS4</button>
      <!-- 5 		-->      <button id="23">JumpSMS5</button>
      <!-- 6 		-->      <button id="24">JumpSMS6</button>
      <!-- 7 		-->      <button id="33">JumpSMS7</button>
      <!-- 8 		-->      <button id="34">JumpSMS8</button>
      <!-- 9 		-->      <button id="43">JumpSMS9</button>
    </joystick>
  </MyVideoLibrary>
  <MyVideoFiles>
    <joystick name="Harmony">
      <!-- * clear 	-->      <button id="45">Delete</button>
      <!-- 1 		-->      <button id="11">JumpSMS1</button>
      <!-- 2 		-->      <button id="12">JumpSMS2</button>
      <!-- 3 		-->      <button id="13">JumpSMS3</button>
      <!-- 4 		-->      <button id="14">JumpSMS4</button>
      <!-- 5 		-->      <button id="23">JumpSMS5</button>
      <!-- 6 		-->      <button id="24">JumpSMS6</button>
      <!-- 7 		-->      <button id="33">JumpSMS7</button>
      <!-- 8 		-->      <button id="34">JumpSMS8</button>
      <!-- 9 		-->      <button id="43">JumpSMS9</button>
    </joystick>
  </MyVideoFiles>
  <MyVideoPlaylist>
    <joystick name="Harmony">
      <!-- * clear 	-->      <button id="45">Delete</button>
      <!-- Channel Up  	-->      <button id="71">MoveItemUp</button>
      <!-- Channel Down -->      <button id="72">MoveItemDown</button>
    </joystick>
  </MyVideoPlaylist>
  <VirtualKeyboard>
    <joystick name="Harmony">
      <!-- Prev		-->      <button id="32">BackSpace</button>
      <!-- * clear 	-->      <button id="45">Shift</button>
      <!-- # enter 	-->      <button id="36">Symbols</button>
      <!-- 1 		-->      <button id="11">Number1</button>
      <!-- 2 		-->      <button id="12">Number2</button>
      <!-- 3 		-->      <button id="13">Number3</button>
      <!-- 4 		-->      <button id="14">Number4</button>
      <!-- 5 		-->      <button id="23">Number5</button>
      <!-- 6 		-->      <button id="24">Number6</button>
      <!-- 7 		-->      <button id="33">Number7</button>
      <!-- 8 		-->      <button id="34">Number8</button>
      <!-- 9 		-->      <button id="43">Number9</button>
      <!-- 0 		-->      <button id="44">Number0</button>
      <!-- Rew       	-->      <button id="41">CursorLeft</button>
      <!-- Fwd  	-->      <button id="42">CursorRight</button>
    </joystick>
  </VirtualKeyboard>
  <Scripts>
    <joystick name="Harmony">
      <!-- Info  	-->      <button id="31">info</button>
    </joystick>
  </Scripts>
  <NumericInput>
    <joystick name="Harmony">
      <!-- 1 		-->      <button id="11">Number1</button>
      <!-- 2 		-->      <button id="12">Number2</button>
      <!-- 3 		-->      <button id="13">Number3</button>
      <!-- 4 		-->      <button id="14">Number4</button>
      <!-- 5 		-->      <button id="23">Number5</button>
      <!-- 6 		-->      <button id="24">Number6</button>
      <!-- 7 		-->      <button id="33">Number7</button>
      <!-- 8 		-->      <button id="34">Number8</button>
      <!-- 9 		-->      <button id="43">Number9</button>
      <!-- 0 		-->      <button id="44">Number0</button>
      <!-- Prev		-->      <button id="32">BackSpace</button>
    </joystick>
  </NumericInput>
  <MusicInformation>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </MusicInformation>
  <MovieInformation>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </MovieInformation>
  <LockSettings>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </LockSettings>
  <ProfileSettings>
    <joystick name="Harmony">
      <!-- menu       	-->      <button id="6">Back</button>
    </joystick>
  </ProfileSettings>
  <PictureInfo>
    <joystick name="Harmony">
      <!-- Replay       -->      <button id="91">PreviousPicture</button>
      <!-- Skip      	-->      <button id="92">NextPicture</button>
      <!-- Info  	-->      <button id="31">Back</button>
    </joystick>
  </PictureInfo>
</keymap>
