Alternative keymaps for Generic PS3 remotes

From Official Kodi Wiki
Jump to: navigation, search

1 Installing keymaps

There are a few methods to load custom keymaps on Kodi.

1.1 File manager

Kodi's built in file manager can be used to copy files from a network file share (such as SMB/Windows sharing), or a USB thumb drive, to the userdata folder.

  1. Save the keymap you want to use as a plain text file as "keymap.xml" (it can be anything as long as it ends in .xml) on the file share.
  2. Go to the File Manager in Kodi. For the default skin, Confluence, highlight the "System" tab and then select the submenu "File manager" option.
  3. Add the file share as a source in the "A" window, then navigate to where the keymap file is.
  4. In the "B" window go do the Profile directory which will be the userdata folder, then open the keymaps folder.
  5. Highlight the keymap file from the "A" window, then press menu, and then select copy. This will copy the selected keymap to the Fire TV's userdata folder.
  6. Now just restart Kodi to load the new keymap.

1.2 Copy directly to userdata folder

  1. Save the keymap you want to use as a plain text file as "keymap.xml" (it can be anything as long as it ends in .xml)
  2. Use a file manager of your choice, such as the one build into your OS, and copy this file to the userdata folder within the keymaps folder.
Note: In older versions of the software (before v14) the kodi directories were named xbmc.
Operating system File path
Android Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note)
iOS /private/var/mobile/Library/Preferences/Kodi/userdata/
LibreELEC /storage/.kodi/userdata/
Linux ~/.kodi/userdata/
OSMC /home/osmc/.kodi/userdata/
Mac /Users/<your_user_name>/Library/Application Support/Kodi/userdata/ (see note)
Windows Start - type %APPDATA%\kodi\userdata - press <Enter>
Windows UWP  %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\


2 YuanChen.Game.Controller.xml

Keymapping for Generic PS3 remote.

XBMC Live (v10.1) seems to load this without any other changes to the default config.

Working Config, (Kind off) I'm trying to get LIRC to produce different events to stop the duplication of keys.

Cut and paste the following into a new text document and save as YuanChen.Game.Controller.xml and place in /usr/share/xbmc/system/keymaps/

<keymap>
  <global>
    <joystick name="YuanChen Game Controller">
      <altname>YuanChen Game Controller</altname>
      <!-- TOP MENU --><button id="1">FullScreen</button>
      <!-- Center Hat  --><button id="2">Select</button>
      <!--  R2 --><button id="3">XBMC.ActivateWindow(Home)</button>
      <!-- Options --><button id="4">ContextMenu</button>
      <!--  L1  --><button id="5">VolumeUp</button>
      <!--  R1? --><button id="6">FullScreen</button>
      <!--  L2  --><button id="7">VolumeDown</button>
      <!--  BACK  --><button id="8">PreviousMenu</button>
      <!-- Display --><button id="9">Info</button>
      <!-- START --><button id="10">Mute</button>
      <!-- L3 --><button id="11">ActivateWindow(shutdownmenu)</button>
      <!-- R3 --><button id="12">Screenshot</button>
      <hat    id="1" position="left">Left</hat>
      <hat    id="1" position="right">Right</hat>
      <hat    id="1" position="up">Up</hat>
      <hat    id="1" position="down">Down</hat>
      <button id="5">VolumeUp</button>     
      <button id="7">VolumeDown</button>
      <axis limit="+1" id="3">AnalogSeekForward</axis>
      <axis limit="-1" id="3">AnalogSeekBack</axis>
      <axis limit="-1" id="2">ScrollUp</axis>
      <axis limit="+1" id="2">ScrollDown</axis>

    </joystick>
  </global>

  <Home>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">XBMC.ActivateWindow(Favourites)</button>
    </joystick>
  </Home>

  <MyPictures>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">ParentDir</button>
    </joystick>
  </MyPictures>

  <MyMusicPlaylist>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Playlist</button>
    </joystick>
  </MyMusicPlaylist>

  <MyMusicPlaylistEditor>
    <joystick name="YuanChen Game Controller">
      <button id="3">Playlist</button>
    </joystick>
  </MyMusicPlaylistEditor>

  <MyMusicFiles>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">ParentDir</button>
      <button id="4">Queue</button>
    </joystick>
  </MyMusicFiles>

  <MyMusicLibrary>
    <joystick name="YuanChen Game Controller">
      <button id="3">ParentDir</button>
      <button id="4">Queue</button>
    </joystick>
  </MyMusicLibrary>

  <FullscreenVideo>
    <joystick name="YuanChen Game Controller">
      <button id="10">Pause</button>
      <button id="3">Stop</button>
      <button id="9">AspectRatio</button>
      <button id="">Rewind</button>
      <button id="">FastForward</button>
      <button id="4">OSD</button>

      <hat    id="1" position="left">StepBack</hat>
      <hat    id="1" position="right">StepForward</hat>
      <hat    id="1" position="up">BigStepForward</hat>
      <hat    id="1" position="down">BigStepBack</hat>
    </joystick>
  </FullscreenVideo>

  <FullscreenInfo>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </FullscreenInfo>

  <PlayerControls>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </PlayerControls>

  <Visualisation>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="2">Pause</button>
      <button id="3">Stop</button>
      <button id="4">XBMC.ActivateWindow(VisualisationPresetList)</button>
      <button id="5">Rewind</button>
      <button id="6">FastForward</button>
      <button id="10">XBMC.ActivateWindow(MusicOSD)</button>

      <hat    id="1" position="left">SkipPrevious</hat>
      <hat    id="1" position="right">SkipNext</hat>
      <hat    id="1" position="up">NextPreset</hat>
      <hat    id="1" position="left">PreviousPreset</hat>
    </joystick>
  </Visualisation>

  <MusicOSD>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </MusicOSD>

  <VisualisationSettings>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </VisualisationSettings>

  <VisualisationPresetList>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </VisualisationPresetList>

  <SlideShow>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="1">ZoomNormal</button>
      <button id="2">Pause</button>
      <button id="3">Stop</button>
      <button id="4">Rotate</button>

      <hat    id="1" position="left">PreviousPicture</hat>
      <hat    id="1" position="right">NextPicture</hat>
      <hat    id="1" position="up">ZoomIn</hat>
      <hat    id="1" position="down">ZoomOut</hat>
    </joystick>
  </SlideShow>

  <ScreenCalibration>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="2">NextCalibration</button>
    </joystick>
  </ScreenCalibration>

  <SelectDialog>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </SelectDialog>

  <VideoOSD>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </VideoOSD>

  <OSDVideoSettings>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </OSDVideoSettings>

  <OSDAudioSettings>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </OSDAudioSettings>

  <VideoBookmarks>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </VideoBookmarks>

  <MyVideoLibrary>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">ParentDir</button>
      <button id="4">Queue</button>
      <button id="5">Info</button>
    </joystick>
  </MyVideoLibrary>

  <MyVideoFiles>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">ParentDir</button>
      <button id="4">Queue</button>
      <button id="5">Info</button>
    </joystick>
  </MyVideoFiles>

  <MyVideoPlaylist>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Playlist</button>
    </joystick>
  </MyVideoPlaylist>

  <VirtualKeyboard>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="1">Symbols</button>
      <button id="3">BackSpace</button>
      <button id="4">Shift</button>
      <button id="5">CursorLeft</button>
      <button id="6">CursorRight</button>
      <button id="9">Close</button>
      <button id="10">Enter</button>
    </joystick>
  </VirtualKeyboard>

  <ContextMenu>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </ContextMenu>

  <FileStackingDialog>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </FileStackingDialog>

  <MusicInformation>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </MusicInformation>

  <MovieInformation>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </MovieInformation>

  <PictureInfo>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </PictureInfo>

  <AddonInformation>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </AddonInformation>

  <AddonSettings>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </AddonSettings>

  <TextViewer>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </TextViewer>

  <NumericInput>
    <joystick name="YuanChen Game Controller">
      <altname>Logitech Cordless RumblePad 2</altname>
      <button id="3">Close</button>
    </joystick>
  </NumericInput>

</keymap>