Archive:Sample MCE remote keyboard.xml: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Jhsrennie
mNo edit summary
mNo edit summary
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This is an example of a keyboard.xml file you might create in your
This is an example of a keyboard.xml file you might create in your
userdata/keymaps folder to map MCE shortcut keys to XBMC actions.
userdata/keymaps folder to map MCE shortcut keys to Kodi actions.
The basic operations of Play, Pause, Stop etc are already included
The basic operations of Play, Pause, Stop etc are already included
in the system keyboard.xml. I've included all the MCE shortcuts from
in the system keyboard.xml. I've included all the MCE shortcuts from
http://msdn.microsoft.com/en-us/library/bb189249.aspx even though some
http://msdn.microsoft.com/en-us/library/bb189249.aspx even though some
don't have an obvious action in XBMC. All the keys that don't have an
don't have an obvious action in XBMC.
obvious function are mapped to <i>Stop</i>.


<pre>
<pre>&lt;keymap&gt;
&lt;keymap&gt;
   &lt;global&gt;
   &lt;global&gt;
     &lt;keyboard&gt;
     &lt;keyboard&gt;
       &lt;!-- Transport controls --&gt;
       &lt;!-- Windows button: mapped to ctrl-shift-W by MSRemote.reg --&gt;
      &lt;p mod="ctrl,shift"&gt;Play&lt;/p&gt;
       &lt;w mod="ctrl,shift"&gt;Notification(Key, Windows button, 3)&lt;/w&gt;
      &lt;s mod="ctrl,shift"&gt;Notification(MCEKeypress, MCEKeypress, 3)&lt;/s&gt;
 
      &lt;p mod="ctrl"&gt;Pause&lt;/p&gt;
       &lt;!-- Details: ctrl-D: displays Info. Labelled as "More" on the MS remote --&gt;
      &lt;f mod="ctrl,shift"&gt;FastForward&lt;/f&gt;
      &lt;b mod="ctrl,shift"&gt;Rewind&lt;/b&gt;
      &lt;f mod="ctrl"&gt;SkipNext&lt;/f&gt;
      &lt;b mod="ctrl"&gt;SkipPrevious&lt;/b&gt;
      &lt;!-- Top level menus --&gt;
      &lt;!-- MyTV ctrl-shift-T --&gt;
       &lt;t mod="ctrl,shift"&gt;Notification(MCEKeypress, My TV ctrl-shift-t, 3)&lt;/t&gt;
      &lt;!-- MyMusic ctrl-M --&gt;
      &lt;m mod="ctrl"&gt;ActivateWindow(MyMusic)&lt;/m&gt;
       &lt;!-- MyVideos ctrl-E --&gt;
      &lt;e mod="ctrl"&gt;ActivateWindow(MyVideos)&lt;/e&gt;
      &lt;!-- MyPictures ctrl-I --&gt;
      &lt;i mod="ctrl"&gt;ActivateWindow(MyPictures)&lt;/i&gt;
      &lt;!-- TV and DVD menus --&gt;
      &lt;!-- Guide ctrl-G --&gt;
      &lt;g mod="ctrl"&gt;Notification(MCEKeypress, Guide ctrl-G, 3)&lt;/g&gt;
      &lt;!-- Record ctrl-R --&gt;
      &lt;r mod="ctrl"&gt;Notification(MCEKeypress, Record ctrl-R, 3)&lt;/r&gt;
      &lt;!-- Details ctrl-D --&gt;
       &lt;d mod="ctrl"&gt;Info&lt;/d&gt;
       &lt;d mod="ctrl"&gt;Info&lt;/d&gt;
      &lt;!-- DVD Menu ctrl-shift-M --&gt;
 
      &lt;m mod="ctrl,shift"&gt;Notification(MCEKeypress, DVD menu ctrl-shift-M, 3)&lt;/m&gt;
       &lt;!-- MCE uses F10 for vol up, F9 for vol down and F8 for mute --&gt;
       &lt;!-- Recorded TV ctrl-O --&gt;
       &lt;f10&gt;VolumeUp&lt;/f10&gt;
      &lt;o mod="ctrl"&gt;Notification(MCEKeypress, MyTV ctrl-O, 3)&lt;/o&gt;
       &lt;f9&gt;VolumeDown&lt;/f9&gt;
      &lt;!-- DVD Audio --&gt;
       &lt;a mod="ctrl,shift"&gt;Notification(MCEKeypress, DVD Audio ctrl-shift-A, 3)&lt;/a&gt;
       &lt;!-- DVD Subtitle --&gt;
      &lt;u mod="ctrl"&gt;Notification(MCEKeypress, DVD Subtitles ctrl-U, 3)&lt;/u&gt;
      &lt;!-- Volume controls --&gt;
       &lt;f8&gt;Mute&lt;/f8&gt;
       &lt;f8&gt;Mute&lt;/f8&gt;
       &lt;f9&gt;VolumeDown&lt;/f9&gt;
 
       &lt;f10&gt;VolumeUp&lt;/f10&gt;
      &lt;!-- MCE uses equals (plus) for channel up, minus for channel down --&gt;
      &lt;equals&gt;PageUp&lt;/equals&gt;
      &lt;minus&gt;PageDown&lt;/minus&gt;
 
      &lt;!-- These are the four buttons below the arrows on the MS remote --&gt;
 
      &lt;!-- Recorded TV: ctrl-O: there isn't an obvious function in Kodi --&gt;
      &lt;o mod="ctrl"&gt;Notification(Key, Recorded TV, 3)&lt;/o&gt;
      &lt;!-- Guide: ctrl-G: displays the OSD --&gt;
      &lt;g mod="ctrl"&gt;OSD&lt;/g&gt;
      &lt;!-- Live TV: ctrl-T: there isn't an obvious function in Kodi --&gt;
      &lt;t mod="ctrl"&gt;Notification(Key, Live TV, 3)&lt;/t&gt;
      &lt;!-- DVD menu: ctrl-shift-M: there isn't an obvious function in Kodi --&gt;
      &lt;m mod="ctrl,shift"&gt;Notification(Key, DVD menu, 3)&lt;/m&gt;
      &lt;!-- Radio: ctrl-A: there isn't an obvious function in Kodi --&gt;
      &lt;a mod="ctrl"&gt;Notification(Key, Radio, 3)&lt;/a&gt;
 
      &lt;!-- Some MS remotes have the four coloured buttons. These are mapped --&gt;
      &lt;!-- to ctrl-alt-1 to 4 by MSRemote.reg. --&gt;
 
      &lt;!-- Red button: ctrl-alt-1: this is a placeholder --&gt;
      &lt;one mod="ctrl,alt"&gt;Notification(Key, Red button, 3)&lt;/one&gt;
      &lt;!-- Green button: ctrl-alt-2: this is a placeholder --&gt;
       &lt;two mod="ctrl,alt"&gt;Notification(Key, Green button, 3)&lt;/two&gt;
      &lt;!-- Yellow button: ctrl-alt-3: this is a placeholder --&gt;
      &lt;three mod="ctrl,alt"&gt;Notification(Key, Yellow button, 3)&lt;/three&gt;
      &lt;!-- Blue button: ctrl-alt-4: this is a placeholder --&gt;
      &lt;four mod="ctrl,alt"&gt;Notification(Key, Blue button, 3)&lt;/four&gt;
 
      &lt;!-- These buttons aren't on the MS remote but are on many clone remotes --&gt;
 
      &lt;!-- My TV: ctrl-shift-T: there isn't an obvious function in Kodi --&gt;
      &lt;t mod="ctrl,shift"&gt;Notification(Key, My TV, 3)&lt;/t&gt;
      &lt;!-- My Music: ctrl-M --&gt;
      &lt;m mod="ctrl"&gt;ActivateWindow(music)&lt;/m&gt;
      &lt;!-- My Pictures: ctrl-I --&gt;
      &lt;i mod="ctrl"&gt;ActivateWindow(pictures)&lt;/i&gt;
      &lt;!-- My Movies: ctrl-E --&gt;
       &lt;e mod="ctrl"&gt;ActivateWindow(video)&lt;/e&gt;
     &lt;/keyboard&gt;
     &lt;/keyboard&gt;
   &lt;/global&gt;
   &lt;/global&gt;
&lt;/keymap&gt;
 
</pre>
  &lt;!-- ctrl-D needs to close any open Info screens --&gt;
  &lt;FullscreenInfo&gt;
    &lt;keyboard&gt;
      &lt;d mod="ctrl"&gt;Close&lt;/d&gt;
    &lt;/keyboard&gt;
  &lt;/FullscreenInfo&gt;
  &lt;MovieInformation&gt;
    &lt;keyboard&gt;
      &lt;d mod="ctrl"&gt;Close&lt;/d&gt;
    &lt;/keyboard&gt;
  &lt;/MovieInformation&gt;
  &lt;PictureInfo&gt;
    &lt;keyboard&gt;
      &lt;d mod="ctrl"&gt;Close&lt;/d&gt;
    &lt;/keyboard&gt;
  &lt;/PictureInfo&gt;
&lt;/keymap&gt;</pre>

Latest revision as of 02:36, 10 September 2020

This is an example of a keyboard.xml file you might create in your userdata/keymaps folder to map MCE shortcut keys to Kodi actions. The basic operations of Play, Pause, Stop etc are already included in the system keyboard.xml. I've included all the MCE shortcuts from http://msdn.microsoft.com/en-us/library/bb189249.aspx even though some don't have an obvious action in XBMC.

<keymap>
  <global>
    <keyboard>
      <!-- Windows button: mapped to ctrl-shift-W by MSRemote.reg -->
      <w mod="ctrl,shift">Notification(Key, Windows button, 3)</w>

      <!-- Details: ctrl-D: displays Info. Labelled as "More" on the MS remote -->
      <d mod="ctrl">Info</d>

      <!-- MCE uses F10 for vol up, F9 for vol down and F8 for mute -->
      <f10>VolumeUp</f10>
      <f9>VolumeDown</f9>
      <f8>Mute</f8>

      <!-- MCE uses equals (plus) for channel up, minus for channel down -->
      <equals>PageUp</equals>
      <minus>PageDown</minus>

      <!-- These are the four buttons below the arrows on the MS remote -->

      <!-- Recorded TV: ctrl-O: there isn't an obvious function in Kodi -->
      <o mod="ctrl">Notification(Key, Recorded TV, 3)</o>
      <!-- Guide: ctrl-G: displays the OSD -->
      <g mod="ctrl">OSD</g>
      <!-- Live TV: ctrl-T: there isn't an obvious function in Kodi -->
      <t mod="ctrl">Notification(Key, Live TV, 3)</t>
      <!-- DVD menu: ctrl-shift-M: there isn't an obvious function in Kodi -->
      <m mod="ctrl,shift">Notification(Key, DVD menu, 3)</m>
      <!-- Radio: ctrl-A: there isn't an obvious function in Kodi -->
      <a mod="ctrl">Notification(Key, Radio, 3)</a>

      <!-- Some MS remotes have the four coloured buttons. These are mapped -->
      <!-- to ctrl-alt-1 to 4 by MSRemote.reg. -->

      <!-- Red button: ctrl-alt-1: this is a placeholder -->
      <one mod="ctrl,alt">Notification(Key, Red button, 3)</one>
      <!-- Green button: ctrl-alt-2: this is a placeholder -->
      <two mod="ctrl,alt">Notification(Key, Green button, 3)</two>
      <!-- Yellow button: ctrl-alt-3: this is a placeholder -->
      <three mod="ctrl,alt">Notification(Key, Yellow button, 3)</three>
      <!-- Blue button: ctrl-alt-4: this is a placeholder -->
      <four mod="ctrl,alt">Notification(Key, Blue button, 3)</four>

      <!-- These buttons aren't on the MS remote but are on many clone remotes -->

      <!-- My TV: ctrl-shift-T: there isn't an obvious function in Kodi -->
      <t mod="ctrl,shift">Notification(Key, My TV, 3)</t>
      <!-- My Music: ctrl-M -->
      <m mod="ctrl">ActivateWindow(music)</m>
      <!-- My Pictures: ctrl-I -->
      <i mod="ctrl">ActivateWindow(pictures)</i>
      <!-- My Movies: ctrl-E -->
      <e mod="ctrl">ActivateWindow(video)</e>
    </keyboard>
  </global>

  <!-- ctrl-D needs to close any open Info screens -->
  <FullscreenInfo>
    <keyboard>
      <d mod="ctrl">Close</d>
    </keyboard>
  </FullscreenInfo>
  <MovieInformation>
    <keyboard>
      <d mod="ctrl">Close</d>
    </keyboard>
  </MovieInformation>
  <PictureInfo>
    <keyboard>
      <d mod="ctrl">Close</d>
    </keyboard>
  </PictureInfo>
</keymap>