mirror of https://github.com/xbmc/xbmc
[input/remote] Add buttons "favorites" and "last"
Two buttons from CEC are mapped to other existing buttons: "favorites" to "menu" and "last channel" to "teletext". Plumb them into the xbmc/input/remote translations, so that they can be given their own meaning in the keymaps, and add the same buttons to the LIRC map for non-CEC remotes.
This commit is contained in:
parent
953b28eb12
commit
50cbf0481e
|
|
@ -600,6 +600,8 @@
|
|||
<blue>KEY_BLUE</blue>
|
||||
<recordedtv>KEY_PVR</recordedtv>
|
||||
<liveradio>KEY_RADIO</liveradio>
|
||||
<favorites>KEY_FAVORITES</favorites>
|
||||
<last>KEY_LAST</last>
|
||||
</remote>
|
||||
|
||||
<remote device="devinput-32">
|
||||
|
|
@ -660,6 +662,8 @@
|
|||
<blue>KEY_BLUE</blue>
|
||||
<recordedtv>KEY_PVR</recordedtv>
|
||||
<liveradio>KEY_RADIO</liveradio>
|
||||
<favorites>KEY_FAVORITES</favorites>
|
||||
<last>KEY_LAST</last>
|
||||
</remote>
|
||||
|
||||
<remote device="devinput-64">
|
||||
|
|
@ -720,5 +724,7 @@
|
|||
<blue>KEY_BLUE</blue>
|
||||
<recordedtv>KEY_PVR</recordedtv>
|
||||
<liveradio>KEY_RADIO</liveradio>
|
||||
<favorites>KEY_FAVORITES</favorites>
|
||||
<last>KEY_LAST</last>
|
||||
</remote>
|
||||
</lircmap>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
<eight>JumpSMS8</eight>
|
||||
<nine>JumpSMS9</nine>
|
||||
<print>Screenshot</print>
|
||||
<favorites>ActivateWindow(FavouritesBrowser)</favorites>
|
||||
</remote>
|
||||
</global>
|
||||
<Home>
|
||||
|
|
@ -712,4 +713,9 @@
|
|||
<title>PlayerProcessInfo</title>
|
||||
</remote>
|
||||
</PlayerProcessInfo>
|
||||
<FullScreenLiveTV>
|
||||
<remote>
|
||||
<last>Number0</last>
|
||||
</remote>
|
||||
</FullScreenLiveTV>
|
||||
</keymap>
|
||||
|
|
|
|||
|
|
@ -299,6 +299,10 @@ uint32_t CIRTranslator::TranslateString(std::string strButton)
|
|||
buttonCode = XINPUT_IR_REMOTE_DVD_MENU;
|
||||
else if (strButton == "print")
|
||||
buttonCode = XINPUT_IR_REMOTE_PRINT;
|
||||
else if (strButton == "favorites")
|
||||
buttonCode = XINPUT_IR_REMOTE_FAVORITE_MENU;
|
||||
else if (strButton == "last")
|
||||
buttonCode = XINPUT_IR_REMOTE_LAST;
|
||||
else
|
||||
CLog::Log(LOGERROR, "Remote Translator: Can't find button {}", strButton);
|
||||
return buttonCode;
|
||||
|
|
|
|||
|
|
@ -86,6 +86,9 @@
|
|||
|
||||
#define XINPUT_IR_REMOTE_PRINT 240
|
||||
|
||||
#define XINPUT_IR_REMOTE_FAVORITE_MENU 241
|
||||
#define XINPUT_IR_REMOTE_LAST 242
|
||||
|
||||
// Reserved 256 -> ...
|
||||
// Key.h
|
||||
// KEY_BUTTON_*
|
||||
|
|
|
|||
|
|
@ -926,7 +926,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const cec_keypress& key)
|
|||
PushCecKeypress(xbmcKey);
|
||||
break;
|
||||
case CEC_USER_CONTROL_CODE_FAVORITE_MENU:
|
||||
xbmcKey.iButton = XINPUT_IR_REMOTE_MENU;
|
||||
xbmcKey.iButton = XINPUT_IR_REMOTE_FAVORITE_MENU;
|
||||
PushCecKeypress(xbmcKey);
|
||||
break;
|
||||
case CEC_USER_CONTROL_CODE_EXIT:
|
||||
|
|
@ -946,7 +946,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const cec_keypress& key)
|
|||
PushCecKeypress(xbmcKey);
|
||||
break;
|
||||
case CEC_USER_CONTROL_CODE_PREVIOUS_CHANNEL:
|
||||
xbmcKey.iButton = XINPUT_IR_REMOTE_TELETEXT;
|
||||
xbmcKey.iButton = XINPUT_IR_REMOTE_LAST;
|
||||
PushCecKeypress(xbmcKey);
|
||||
break;
|
||||
case CEC_USER_CONTROL_CODE_SOUND_SELECT:
|
||||
|
|
|
|||
Loading…
Reference in New Issue