Skip to content

Commit

Permalink
Merge pull request xbmc#8411 from OpenELEC/new_keymappings
Browse files Browse the repository at this point in the history
New keymappings for keyboard-like remotes
  • Loading branch information
MartijnKaijser committed Nov 21, 2015
2 parents 7f70035 + 6da8abe commit 49a2f4e
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2 deletions.
42 changes: 42 additions & 0 deletions system/keymaps/keyboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,22 @@
<j>ActivateWindow(RadioChannels)</j>
<k>ActivateWindow(TVRecordings)</k>
<b>ActivateWindow(TVTimers)</b>
<!-- PVR -->
<red>ActivateWindow(TVChannels)</red>
<green>ActivateWindow(MyVideos)</green>
<yellow>ActivateWindow(MyMusic)</yellow>
<blue>ActivateWindow(MyPictures)</blue>
<!-- Multimedia keyboard keys -->
<browser_back>Back</browser_back>
<browser_forward/>
<browser_refresh/>
<browser_stop/>
<browser_search/>
<browser_favorites>ActivateWindow(Favourites)</browser_favorites>
<favorites>ActivateWindow(Favourites)</favorites>
<config>ActivateWindow(Settings)</config>
<browser_home>ActivateWindow(Home)</browser_home>
<homepage>ActivateWindow(Home)</homepage>
<volume_mute>Mute</volume_mute>
<volume_down>VolumeDown</volume_down>
<volume_up>VolumeUp</volume_up>
Expand Down Expand Up @@ -151,6 +159,8 @@
<f mod="ctrl">SkipNext</f> <!-- Skip -->
<b mod="ctrl">SkipPrevious</b> <!-- Replay -->
<d mod="ctrl">Info</d> <!-- MCE Details -->
<r mod="ctrl">Record</r> <!-- Record -->
<f4 mod="alt">PreviousMenu</f4> <!-- Exit -->
<f10>VolumeUp</f10> <!-- MCE Vol up -->
<f9>VolumeDown</f9> <!-- MCE Vol down -->
<f8>Mute</f8> <!-- MCE mute -->
Expand Down Expand Up @@ -211,13 +221,21 @@
<delete>Delete</delete>
<r>Rename</r>
<k>PreviousMenu</k>
<red>Red</red>
<green>Green</green>
<yellow>Yellow</yellow>
<blue>Blue</blue>
</keyboard>
</MyTVRecordings>
<MyTVTimers>
<keyboard>
<delete>Delete</delete>
<r>Rename</r>
<b>PreviousMenu</b>
<red>Red</red>
<green>Green</green>
<yellow>Yellow</yellow>
<blue>Blue</blue>
</keyboard>
</MyTVTimers>
<MyRadioChannels>
Expand All @@ -230,12 +248,20 @@
<keyboard>
<delete>Delete</delete>
<r>Rename</r>
<red>Red</red>
<green>Green</green>
<yellow>Yellow</yellow>
<blue>Blue</blue>
</keyboard>
</MyRadioRecordings>
<MyRadioTimers>
<keyboard>
<delete>Delete</delete>
<r>Rename</r>
<red>Red</red>
<green>Green</green>
<yellow>Yellow</yellow>
<blue>Blue</blue>
</keyboard>
</MyRadioTimers>
<TVGuide>
Expand Down Expand Up @@ -302,6 +328,7 @@
<i>Info</i>
<o>CodecInfo</o>
<z>AspectRatio</z>
<zoom>AspectRatio</zoom>
<t>ShowSubtitles</t>
<t mod="ctrl">SubtitleAlign</t>
<l>NextSubtitle</l>
Expand All @@ -313,6 +340,7 @@
<escape>Fullscreen</escape>
<c>Playlist</c>
<v>ActivateWindow(Teletext)</v>
<text>ActivateWindow(Teletext)</text>
<up mod="ctrl">SubtitleShiftUp</up>
<down mod="ctrl">SubtitleShiftDown</down>
<pageup>SkipNext</pageup>
Expand Down Expand Up @@ -361,6 +389,7 @@
<i>Info</i>
<p>ActivateWindow(VisualisationPresetList)</p>
<v>Addon.Default.OpenSettings(xbmc.player.musicviz)</v>
<text>Addon.Default.OpenSettings(xbmc.player.musicviz)</text>
<n>ActivateWindow(MusicPlaylist)</n>
<left>StepBack</left>
<right>StepForward</right>
Expand All @@ -385,6 +414,7 @@
<o>CodecInfo</o>
<p>ActivateWindow(VisualisationPresetList)</p>
<v>Addon.Default.OpenSettings(xbmc.player.musicviz)</v>
<text>Addon.Default.OpenSettings(xbmc.player.musicviz)</text>
<n>ActivateWindow(MusicPlaylist)</n>
</keyboard>
</MusicOSD>
Expand All @@ -399,6 +429,7 @@
<o>CodecInfo</o>
<p>ActivateWindow(VisualisationPresetList)</p>
<v>Back</v>
<text>Back</text>
<n>ActivateWindow(MusicPlaylist)</n>
</keyboard>
</VisualisationSettings>
Expand All @@ -413,6 +444,7 @@
<o>CodecInfo</o>
<p>Back</p>
<v>Back</v>
<text>Back</text>
<n>ActivateWindow(MusicPlaylist)</n>
</keyboard>
</VisualisationPresetList>
Expand Down Expand Up @@ -472,6 +504,7 @@
<i>Info</i>
<o>CodecInfo</o>
<z>AspectRatio</z>
<zoom>AspectRatio</zoom>
<t>ShowSubtitles</t>
<l>NextSubtitle</l>
<a>AudioDelay</a>
Expand Down Expand Up @@ -561,6 +594,11 @@
<Teletext>
<keyboard>
<v>Back</v>
<text>Back</text>
<red>Red</red>
<green>Green</green>
<yellow>Yellow</yellow>
<blue>Blue</blue>
</keyboard>
</Teletext>
<Favourites>
Expand Down Expand Up @@ -649,9 +687,13 @@
<Addon>
<keyboard>
<f1>Red</f1>
<red>Red</red>
<f2>Green</f2>
<green>Green</green>
<f3>Yellow</f3>
<yellow>Yellow</yellow>
<f4>Blue</f4>
<blue>Blue</blue>
</keyboard>
</Addon>
</keymap>
7 changes: 7 additions & 0 deletions system/keymaps/mouse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@
<wheeldown>NextPicture</wheeldown>
</mouse>
</SlideShow>
<FullscreenVideo>
<mouse>
<rightclick>Info</rightclick>
</mouse>
</FullscreenVideo>


</keymap>
5 changes: 5 additions & 0 deletions xbmc/input/XBMC_keysym.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ typedef enum {
XBMCK_GREEN = 0x148,
XBMCK_YELLOW = 0x149,
XBMCK_BLUE = 0x14a,
XBMCK_ZOOM = 0x14b,
XBMCK_TEXT = 0x14c,
XBMCK_FAVORITES = 0x14d,
XBMCK_HOMEPAGE = 0x14e,
XBMCK_CONFIG = 0x14f,

// Add any other keys here

Expand Down
5 changes: 5 additions & 0 deletions xbmc/input/XBMC_keytable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ static const XBMCKEYTABLE XBMCKeyTable[] =
, { XBMCK_GREEN, 0, 0, XBMCVK_GREEN, "green" }
, { XBMCK_YELLOW, 0, 0, XBMCVK_YELLOW, "yellow" }
, { XBMCK_BLUE, 0, 0, XBMCVK_BLUE, "blue" }
, { XBMCK_ZOOM, 0, 0, XBMCVK_ZOOM, "zoom" }
, { XBMCK_TEXT, 0, 0, XBMCVK_TEXT, "text" }
, { XBMCK_FAVORITES, 0, 0, XBMCVK_FAVORITES, "favorites" }
, { XBMCK_HOMEPAGE , 0, 0, XBMCVK_HOMEPAGE, "homepage" }
, { XBMCK_CONFIG, 0, 0, XBMCVK_CONFIG, "config" }
};

static int XBMCKeyTableSize = sizeof(XBMCKeyTable)/sizeof(XBMCKEYTABLE);
Expand Down
5 changes: 5 additions & 0 deletions xbmc/input/XBMC_vkeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ typedef enum {
XBMCVK_GREEN = 0xE4,
XBMCVK_YELLOW = 0xE5,
XBMCVK_BLUE = 0xE6,
XBMCVK_ZOOM = 0xE7,
XBMCVK_TEXT = 0xE8,
XBMCVK_FAVORITES = 0xE9,
XBMCVK_HOMEPAGE = 0xEA,
XBMCVK_CONFIG = 0xEB,

XBMCVK_LAST = 0xFF
} XBMCVKey;
Expand Down
15 changes: 13 additions & 2 deletions xbmc/input/linux/LinuxInputDevices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,24 @@ KeyMap keyMap[] = {
{ KEY_PRINT , XBMCK_PRINT },
{ KEY_QUESTION , XBMCK_HELP },
{ KEY_BACK , XBMCK_BACKSPACE },
{ KEY_ZOOM , XBMCK_ZOOM },
{ KEY_TEXT , XBMCK_TEXT },
{ KEY_FAVORITES , XBMCK_FAVORITES },
{ KEY_RED , XBMCK_RED },
{ KEY_GREEN , XBMCK_GREEN },
{ KEY_YELLOW , XBMCK_YELLOW },
{ KEY_BLUE , XBMCK_BLUE },
{ KEY_HOMEPAGE , XBMCK_HOMEPAGE },
{ KEY_MAIL , XBMCK_LAUNCH_MAIL },
{ KEY_SEARCH , XBMCK_BROWSER_SEARCH},
{ KEY_FILE , XBMCK_LAUNCH_FILE_BROWSER},
{ KEY_SELECT , XBMCK_RETURN },
{ KEY_CONFIG , XBMCK_CONFIG },
// The Little Black Box Remote Additions
{ 384 , XBMCK_LEFT }, // Red
{ 378 , XBMCK_RIGHT }, // Green
{ 381 , XBMCK_UP }, // Yellow
{ 366 , XBMCK_DOWN }, // Blue
// Rii i7 Home button / wetek openelec remote (code 172)
{ KEY_HOMEPAGE , XBMCK_HOME },
};

typedef enum
Expand Down

0 comments on commit 49a2f4e

Please sign in to comment.