Alternative keymaps for most remotes: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{mininav| [[Remote controls]] }}
{{mininav| [[Remote controls]] }}
Alternative keymaps for most remotes, as suggested by the community. This includes MCE/RC6 type remote controls.
Alternative keymaps for most remotes, as suggested by the community. This includes MCE/RC6 and keyboard type remote controls.


__TOC__
__TOC__


== Keymap 1 ==
== Installing keymaps ==
{{keymap install instructions}}
 
== Keymap 1 - SmallStepBack ==
 
:Cut and paste the following into a new text document and save as '''remote.xml''' and place in <code>[[userdata]]/keymaps/</code>
:Cut and paste the following into a new text document and save as '''remote.xml''' and place in <code>[[userdata]]/keymaps/</code>
<syntaxhighlight lang="xml" enclose="div">
<syntaxhighlight lang="xml" enclose="div">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<keymap>
<!-- The <global> section is a fall through - they will only be used if the button is not          -->
  <FullscreenVideo>
<!-- used in the current window's section.  Note that there is only handling                      -->
    <remote>
<!-- for a single action per button at this stage.                                                -->
      <back>seek(-7)</back>
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox      -->
    </remote>
<!-- gamepads.                                                                                    -->
    <keyboard>
      <back>seek(-7)</back>
      <backspace>seek(-7)</backspace>
      <escape>seek(-7)</escape>
    </keyboard>
  </FullscreenVideo>
</keymap>
</syntaxhighlight>


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


<!-- To map keys from other remotes using the RCA protocol, you may add <universalremote> blocks -->
;What it does
<!-- In this case, the tags used are <obc#> where # is the original button code (OBC) of the key -->
* {{button|Back}} durning full screen playback is changed to SmallStepBack (-7 seconds)
<!-- 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.                -->
== Keymap 2 - stop a video when backing out of it ==
<!--  eg <B>XBMC.ActivateWindow(MyMusic)</B>                        -->
:Cut and paste the following into a new text document and save as '''remote.xml''' and place in <code>[[userdata]]/keymaps/</code>
<!-- would automatically go to My Music on the press of the B button. -->
<syntaxhighlight lang="xml" enclose="div">
 
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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>
<keymap>
  <global>
    <remote>
      <play>Play</play>
      <pause>Pause</pause>
      <stop>Stop</stop>
      <forward>FastForward</forward>
      <reverse>Rewind</reverse>
      <left>Left</left>
      <right>Right</right>
      <up>Up</up>
      <down>Down</down>
      <select>Select</select>
      <enter>FullScreen</enter>
      <pageplus>PageUp</pageplus>
      <pageminus>PageDown</pageminus>
      <back>Back</back>
      <menu>PreviousMenu</menu>
      <title>ContextMenu</title>
      <info>Info</info>
      <skipplus>SkipNext</skipplus>
      <skipminus>SkipPrevious</skipminus>
      <display>FullScreen</display>
      <start>PreviousMenu</start>
      <record>Record</record>
      <volumeplus>VolumeUp</volumeplus>
      <volumeminus>VolumeDown</volumeminus>
      <mute>Mute</mute>
      <power>XBMC.ShutDown()</power>
      <myvideo>XBMC.ActivateWindow(MyVideos)</myvideo>
      <mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
      <mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
      <mytv>XBMC.ActivateWindow(MyPVR)</mytv>
      <guide>XBMC.ActivateWindowAndFocus(MyPVR, 31,0, 10,0)</guide>
      <livetv>XBMC.ActivateWindowAndFocus(MyPVR, 32,0, 11,0)</livetv>
      <liveradio>XBMC.ActivateWindowAndFocus(MyPVR, 33,0, 12,0)</liveradio>
      <recordedtv>XBMC.ActivateWindowAndFocus(MyPVR, 34,0, 13,0)</recordedtv>
      <epgsearch>XBMC.ActivateWindowAndFocus(MyPVR, 35,0, 14,0)</epgsearch>
      <red>XBMC.ActivateWindow(MyPVR)</red>
      <green>XBMC.ActivateWindow(MyVideos)</green>
      <yellow>XBMC.ActivateWindow(MyMusic)</yellow>
      <blue>XBMC.ActivateWindow(MyPictures)</blue>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>JumpSMS2</two>
      <three>JumpSMS3</three>
      <four>JumpSMS4</four>
      <five>JumpSMS5</five>
      <six>JumpSMS6</six>
      <seven>JumpSMS7</seven>
      <eight>JumpSMS8</eight>
      <nine>JumpSMS9</nine>
    </remote>
  </global>
  <Home>
    <remote>
      <info>XBMC.ActivateWindow(SystemInfo)</info>
      <clear>XBMC.ActivateWindow(Weather)</clear>
      <hash>XBMC.ActivateWindow(Settings)</hash>
    </remote>
  </Home>
  <MyTV>
    <remote>
      <clear>Delete</clear>
    </remote>
  </MyTV>
  <MyFiles>
    <remote>
      <clear>Delete</clear>
      <zero>Highlight</zero>
      <star>Move</star>
      <hash>Rename</hash>
    </remote>
  </MyFiles>
  <MyMusicPlaylist>
    <remote>
      <clear>Delete</clear>
      <zero>Delete</zero>
    </remote>
  </MyMusicPlaylist>
  <MyMusicPlaylistEditor>
    <remote>
      <zero>Queue</zero>
    </remote>
  </MyMusicPlaylistEditor>
  <MyMusicFiles>
    <remote>
      <zero>Queue</zero>
      <star>Queue</star>
    </remote>
  </MyMusicFiles>
  <MyMusicLibrary>
    <remote>
      <zero>Queue</zero>
      <star>Queue</star>
    </remote>
  </MyMusicLibrary>
   <FullscreenVideo>
   <FullscreenVideo>
     <remote>
     <remote>
      <zero>Number0</zero>
       <back>stop</back>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
      <left>StepBack</left>
      <right>StepForward</right>
      <up>ChapterOrBigStepForward</up>
      <down>ChapterOrBigStepBack</down>
       <back>SmallStepBack</back>
      <menu>OSD</menu>
      <start>OSD</start>
      <select>OSD</select>
      <title>CodecInfo</title>
      <info>Info</info>
      <guide>XBMC.ActivateWindow(PVROSDGuide)</guide>
      <teletext>XBMC.ActivateWindow(Teletext)</teletext>
      <subtitle>NextSubtitle</subtitle>
      <star>NextSubtitle</star>
      <language>AudioNextLanguage</language>
      <playlist>Playlist</playlist>
      <hash>AudioNextLanguage</hash>
      <pageplus>SkipNext</pageplus>
      <pageminus>SkipPrevious</pageminus>
     </remote>
     </remote>
    <keyboard>
      <back>stop</back>
      <backspace>stop</backspace>
      <escape>stop</escape>
    </keyboard>
   </FullscreenVideo>
   </FullscreenVideo>
  <VideoTimeSeek>
    <remote>
      <select>Select</select>
      <enter>Select</enter>
    </remote>
  </VideoTimeSeek>
  <FullscreenInfo>
    <remote>
      <title>CodecInfo</title>
      <info>Back</info>
      <menu>OSD</menu>
    </remote>
  </FullscreenInfo>
  <PlayerControls>
    <remote>
      <menu>Back</menu>
    </remote>
  </PlayerControls>
  <Visualisation>
    <remote>
      <left>PreviousPreset</left>
      <right>NextPreset</right>
      <up>IncreaseRating</up>
      <down>DecreaseRating</down>
      <back>Back</back>
      <title>CodecInfo</title>
      <select>XBMC.ActivateWindow(VisualisationPresetList)</select>
      <menu>OSD</menu>
      <start>OSD</start>
      <info>Info</info>
      <guide>XBMC.ActivateWindow(PVROSDGuide)</guide>
      <playlist>XBMC.ActivateWindow(PVROSDChannels)</playlist>
    </remote>
  </Visualisation>
  <MusicOSD>
    <remote>
      <menu>Back</menu>
      <title>Info</title>
      <info>CodecInfo</info>
    </remote>
  </MusicOSD>
  <VisualisationSettings>
    <remote>
      <menu>Back</menu>
    </remote>
  </VisualisationSettings>
  <VisualisationPresetList>
    <remote>
      <menu>Back</menu>
    </remote>
  </VisualisationPresetList>
  <SlideShow>
    <remote>
      <zero>ZoomNormal</zero>
      <one>ZoomLevel1</one>
      <two>ZoomLevel2</two>
      <three>ZoomLevel3</three>
      <four>ZoomLevel4</four>
      <five>ZoomLevel5</five>
      <six>ZoomLevel6</six>
      <seven>ZoomLevel7</seven>
      <eight>ZoomLevel8</eight>
      <nine>ZoomLevel9</nine>
      <info>CodecInfo</info>
      <skipplus>NextPicture</skipplus>
      <skipminus>PreviousPicture</skipminus>
      <title>Info</title>
      <select>Rotate</select>
    </remote>
  </SlideShow>
  <ScreenCalibration>
    <remote>
      <select>NextCalibration</select>
      <zero>ResetCalibration</zero>
      <display>NextResolution</display>
      <xbox>NextResolution</xbox>
    </remote>
  </ScreenCalibration>
  <GUICalibration>
    <remote>
      <select>NextCalibration</select>
      <zero>ResetCalibration</zero>
    </remote>
  </GUICalibration>
  <VideoOSD>
    <remote>
      <menu>Back</menu>
      <start>Back</start>
    </remote>
  </VideoOSD>
  <VideoMenu>
    <remote>
      <menu>OSD</menu>
      <info>Info</info>
      <title>CodecInfo</title>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
      <play>Select</play>
      <pageplus>SkipNext</pageplus>
      <pageminus>SkipPrevious</pageminus>
    </remote>
  </VideoMenu>
  <OSDVideoSettings>
    <remote>
      <menu>Back</menu>
      <start>Back</start>
    </remote>
  </OSDVideoSettings>
  <OSDAudioSettings>
    <remote>
      <menu>Back</menu>
      <start>Back</start>
    </remote>
  </OSDAudioSettings>
  <VideoBookmarks>
    <remote>
      <menu>Back</menu>
      <start>Back</start>
      <zero>Delete</zero>
    </remote>
  </VideoBookmarks>
  <MyVideoLibrary>
    <remote>
      <zero>Queue</zero>
      <clear>Delete</clear>
    </remote>
  </MyVideoLibrary>
  <MyVideoFiles>
    <remote>
      <zero>Queue</zero>
      <star>Queue</star>
    </remote>
  </MyVideoFiles>
  <MyVideoPlaylist>
    <remote>
      <clear>Delete</clear>
      <zero>Delete</zero>
    </remote>
  </MyVideoPlaylist>
  <VirtualKeyboard>
    <remote>
      <back>BackSpace</back>
      <star>Shift</star>
      <hash>Symbols</hash>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
      <enter>Enter</enter>
      <pageminus>CursorLeft</pageminus>
      <pageplus>CursorRight</pageplus>
    </remote>
  </VirtualKeyboard>
  <ContextMenu>
    <remote>
      <title>Back</title>
    </remote>
  </ContextMenu>
  <Scripts>
    <remote>
      <info>info</info>
    </remote>
  </Scripts>
  <NumericInput>
    <remote>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
      <enter>Enter</enter>
      <back>BackSpace</back>
    </remote>
  </NumericInput>
  <Weather>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </Weather>
  <TV>
    <remote>
      <red>Red</red>
      <green>Green</green>
      <yellow>Yellow</yellow>
      <blue>Blue</blue>
    </remote>
  </TV>
  <Settings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </Settings>
  <AddonBrowser>
    <remote>
    </remote>
  </AddonBrowser>
  <AddonInformation>
    <remote>
      <back>Close</back>
    </remote>
  </AddonInformation>
  <AddonSettings>
    <remote>
      <back>Close</back>
    </remote>
  </AddonSettings>
  <TextViewer>
    <remote>
      <back>Close</back>
    </remote>
  </TextViewer>
  <MyPicturesSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </MyPicturesSettings>
  <MyProgramsSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </MyProgramsSettings>
  <MyWeatherSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </MyWeatherSettings>
  <MyMusicSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </MyMusicSettings>
  <SystemSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </SystemSettings>
  <MyVideosSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </MyVideosSettings>
  <NetworkSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </NetworkSettings>
  <AppearanceSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </AppearanceSettings>
  <Profiles>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </Profiles>
  <systeminfo>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </systeminfo>
  <shutdownmenu>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </shutdownmenu>
  <submenu>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </submenu>
  <MusicInformation>
    <remote>
      <info>Back</info>
    </remote>
  </MusicInformation>
  <MovieInformation>
    <remote>
      <info>Back</info>
    </remote>
  </MovieInformation>
  <LockSettings>
    <remote>
      <menu>Back</menu>
    </remote>
  </LockSettings>
  <ProfileSettings>
    <remote>
      <menu>Back</menu>
    </remote>
  </ProfileSettings>
  <PictureInfo>
    <remote>
      <skipplus>NextPicture</skipplus>
      <skipminus>PreviousPicture</skipminus>
      <info>Back</info>
    </remote>
  </PictureInfo>
  <Teletext>
    <remote>
      <zero>number0</zero>
      <one>number1</one>
      <two>number2</two>
      <three>number3</three>
      <four>number4</four>
      <five>number5</five>
      <six>number6</six>
      <seven>number7</seven>
      <eight>number8</eight>
      <nine>number9</nine>
      <red>Red</red>
      <green>Green</green>
      <yellow>Yellow</yellow>
      <blue>Blue</blue>
      <info>Info</info>
      <menu>Back</menu>
      <start>Back</start>
      <teletext>Back</teletext>
    </remote>
  </Teletext>
  <Favourites>
    <remote>
      <back>Close</back>
    </remote>
  </Favourites>
  <FullscreenLiveTV>
    <remote>
      <left>StepBack</left>
      <right>StepForward</right>
      <up>ChannelUp</up>
      <down>ChannelDown</down>
    </remote>
  </FullscreenLiveTV>
  <PVROSDChannels>
    <remote>
      <back>Close</back>
      <menu>Close</menu>
      <start>Close</start>
      <playlist>Close</playlist>
    </remote>
  </PVROSDChannels>
  <PVROSDGuide>
    <remote>
      <back>Close</back>
      <menu>Close</menu>
      <start>Close</start>
      <guide>Close</guide>
    </remote>
  </PVROSDGuide>
  <PVROSDDirector>
    <remote>
      <back>Close</back>
      <menu>Close</menu>
    </remote>
  </PVROSDDirector>
  <PVROSDCutter>
    <remote>
      <back>Close</back>
      <menu>Close</menu>
    </remote>
  </PVROSDCutter>
  <MyTVSettings>
    <remote>
      <back>PreviousMenu</back>
    </remote>
  </MyTVSettings>
  <AddonSettings>
    <remote>
      <clear>Delete</clear>
    </remote>
  </AddonSettings>
</keymap>
</keymap>
</syntaxhighlight>
</syntaxhighlight>


=== What it does ===
* {{button|Back}} durning full screen playback is changed to SmallStepBack (-7 seconds)


[[Category:Custom keymaps]]
;What it does
* {{button|Back}} durning full screen playback will stop the video and return you to the file/library lists.
 
== Keymap 3 - move cursor on keyboard instead of buttons ==
{{Note| As of Kodi v15, you can use {{keypress|TAB}} to toggle between selecting keys on the on-screen-keyboard and moving the cursor.}}
:Cut and paste the following into a new text document and save as '''remote.xml''' and place in <code>[[userdata]]/keymaps/</code>
<syntaxhighlight lang="xml" enclose="div">
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <virtualkeyboard>
    <keyboard>
      <left>CursorLeft</left>
      <right>CursorRight</right>
    </keyboard>
  </virtualkeyboard>
</keymap>
</syntaxhighlight>
 
 
;What it does
* Left/right arrow keys will move the cursor when entering text with the on-screen-keyboard, rather than select different keyboard buttons. This restores the behavior previously seen when "Remote sends keyboard presses" was turned off.
 
== Remotes with only a few buttons ==
{{See|Alternative keymaps for low button remotes}}
 
== HOW-TO:Use SMS-style text entry for remotes ==
{{see|HOW-TO:Use SMS-style text entry for remotes}}
 
[[Category:Custom keymaps|Remotes]]

Revision as of 05:51, 25 March 2016

Home icon grey.png   ▶ Remote controls ▶ Alternative keymaps for most remotes

Alternative keymaps for most remotes, as suggested by the community. This includes MCE/RC6 and keyboard type remote controls.

Installing keymaps

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

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.

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.

The Userdata folder is a subfolder of the Kodi Data Folder and is located as shown in the table below.

Operating system Userdata Folder
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/
macOS /Users/<your_user_name>/Library/Application Support/Kodi/userdata/
Nvidia Shield (SMB) smb://<nvidiashieldurl>/internal/Android/data/org.xbmc.kodi/files/.kodi/userdata
OSMC /home/osmc/.kodi/userdata/
tvOS /private/var/mobile/Library/Preferences/Kodi/userdata/
Windows %APPDATA%\Kodi\userdata
Windows Portable <Install location chosen by you>\portable_data\userdata\
Windows via Microsoft Store %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\
Windows Xbox %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\
Note: In some Android setups the path may be slightly different to the one stated above.


Keymap 1 - SmallStepBack

Cut and paste the following into a new text document and save as remote.xml and place in userdata/keymaps/
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <FullscreenVideo>
    <remote>
      <back>seek(-7)</back>
    </remote>
    <keyboard>
      <back>seek(-7)</back>
      <backspace>seek(-7)</backspace>
      <escape>seek(-7)</escape>
    </keyboard>
  </FullscreenVideo>
</keymap>


What it does
  • Back durning full screen playback is changed to SmallStepBack (-7 seconds)

Keymap 2 - stop a video when backing out of it

Cut and paste the following into a new text document and save as remote.xml and place in userdata/keymaps/
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <FullscreenVideo>
    <remote>
      <back>stop</back>
    </remote>
    <keyboard>
      <back>stop</back>
      <backspace>stop</backspace>
      <escape>stop</escape>
    </keyboard>
  </FullscreenVideo>
</keymap>


What it does
  • Back durning full screen playback will stop the video and return you to the file/library lists.

Keymap 3 - move cursor on keyboard instead of buttons

Note: As of Kodi v15, you can use Tab  to toggle between selecting keys on the on-screen-keyboard and moving the cursor.

Cut and paste the following into a new text document and save as remote.xml and place in userdata/keymaps/
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
  <virtualkeyboard>
    <keyboard>
      <left>CursorLeft</left>
      <right>CursorRight</right>
    </keyboard>
  </virtualkeyboard>
</keymap>


What it does
  • Left/right arrow keys will move the cursor when entering text with the on-screen-keyboard, rather than select different keyboard buttons. This restores the behavior previously seen when "Remote sends keyboard presses" was turned off.

Remotes with only a few buttons

See: Alternative keymaps for low button remotes

HOW-TO:Use SMS-style text entry for remotes

See: HOW-TO:Use SMS-style text entry for remotes