The "Ultimate" low button remote keymap
#31
I was using Kodi with the XBMC Launcher. This way I had Kodi as the Launcher, not using the standard Leanback Launcher (Android TV Homescreen) anymore. So pressing the "home" button would bring me back into main menu and thereby automatically stop the currently playing media. That was kind of a workaround for the lost functionality of the longpress back button. However, meanwhile I switched from Kodi to SPMC (also the Launcher-Version), because SPMC has some advantages for Android boxes (especially the Shield TV Box, like the voice search function etc.). Unfortunately in SPMC Launcher the home button has lost its functionality as well. So now there is no button for me left I can use to end the currently playing media. I always have to enter the onscreen media and select the "stop" function there. That is quiet annoying.

Shield TV is a great box. But it needs some "fine tuning" for daily usage as a media player. E.g. you can use CEC to wake your TV and AVR, but you cannot use it to put them asleep. Therefore you always have to use the respective remote controls. And since you might have different TV sets in different rooms it's all different remote controls. Hence, to have my TVs and AVRs turn on and off together with the shield TV box I was trying to use a master/slave socket line, But the power consumption of the Shield TV box is too low to trigger the required threshold of the socket line. Then I tried a USB master/slave socket line (being turned on and off by USB power). But Shield TV's USB-Ports are staying in power when the box is put into sleep mode. So sleep mode does also not trigger this socket line. The only thing you can do is turn the box off - then USB is without power and the USB master/slave socket will be triggered. But then you cannot turn it on again using the remote control, just the button on the front of the box. That's all not very user friendly.
Reply
#32
@ned Scott:

Hi everybody
I stumble across this thread because i am searching since 2 days for a usefull idea to use my shield remote usefull with kodi!
First of all thank you for the wiki and the tips! But it seems that this keymap don´t work for me on my shield!
I put your first keymap from the wiki and save it in the correct folder named as keyboard.xml.
But sadly it won´t work correctly.
In home menu only the favourites come up with back butten, the longpress function don´t work.
Shield and kodi are updatet to newest versions.

For me it is usefull to come up in home by longpress to systeminfo
in fullscreen video i would like to add toggle audio language by longpress right, osd by longpress up and some other functions.
Is there a tip why it won´t work in my case?
Would be a usefull feature because the shield remote is a nice tool!
Greetz Stealth
System : openelec 3.2.3 | Aeon Nox | Intel i3-3225 @3,3Ghz | Intel Graphic integrated | 4Gb Ram | 128 SSD
Remotes : Harmony One+ | MCE-Remote | xbmc IPhone Remote | Yatse on Asus Transformer Prime
TV : Sony Bravia over Hdmi | TV Server : 3xTechnotrend Cable Tuner | DVBViewer 5.0+RecService 1.25
Sound : Logitech Z5500 over optical
Storage : Qnap 412 4x3TB Raid5
Reply
#33
Just longpress on "back" or others? A recent update to the Shield now steals all long-presses on "back" for some kind of power menu.
Reply
#34
Thx mate
I ve seen it now a few posts before [GRINNING FACE WITH SMILING EYES]
I give it a try later but i think the other longpress actions work.
Greets Stealth

Gesendet von meinem LG-D855 mit Tapatalk
System : openelec 3.2.3 | Aeon Nox | Intel i3-3225 @3,3Ghz | Intel Graphic integrated | 4Gb Ram | 128 SSD
Remotes : Harmony One+ | MCE-Remote | xbmc IPhone Remote | Yatse on Asus Transformer Prime
TV : Sony Bravia over Hdmi | TV Server : 3xTechnotrend Cable Tuner | DVBViewer 5.0+RecService 1.25
Sound : Logitech Z5500 over optical
Storage : Qnap 412 4x3TB Raid5
Reply
#35
Hi guys,

I found an addon named "commands" that might be of interest in this context. It is rather old (2013) but still working with Kodi 16 Jarvis and probably also 17 Krypton.

The addon is available here: https://github.com/AddonScriptorDE/script.commands

This is the corresponding thread in the German kodinerds-forum: http://www.kodinerds.net/index.php/Threa.../?pageNo=1

You just need to copy the addon into the addons-folder and start with "RunPlugin(plugin://script.commands)" (if you just want to use one configuration) or "RunPlugin(plugin://script.commands/?key=ANYNAME)" (if you want to use several configurations, where ANYNAME is just any name to identify this configuration). The Best thing you can do is assign a key to that command in the keyboard.xml.

When executed the addon brings up a list of commands that you can execute. You can add and modify those commands as you want. There also is a pre-defined list you can chose from. But you can also enter your own commands for the menu. Those commands are the classic "builtin"-functions that you find here: http://kodi.wiki/view/List_of_Built_In_Functions

The commands-addon also provides for attaching more than one builtin-function to one command. When starting that command all the attached builtin-functions will be getting executed in row. Usually the addon itself closes after the execution of a command. But of course you can use the runscript-command for the command-addon itself again as the last of the builtin-functions of a command-row so the addon pops up again after the execution of this command.

To add or edit the commands you can just start the addon (as mentioned before) and do it from the menu. Or you can manualle edit the config-file under addon_data/script.commands. The logic of the config-file is as follows: Every line is a new command. It starts with the name of the command, then "###", then the actual builtin-function. If you want more than one builtin-function to be executed by such command you may add another "#" and then the next builtin-function.

Example:
In the keyboard.xml under "<FullscreenVideo>" and "<FullscreenLiveTV>" I call the addon with "<down mod="longpress">RunPlugin(plugin://script.commands/?key=Menu1)</down>". So its attached to longpress of the "down"-Button. The commands I have assigned to it are for Stop, Pause, Mute, Cycle Audio Streams, Cycle Subtitles, Cycle Aspect Ratio, Cycle View Modes, Cycle Repeat, Set Alarm Timer, Set Sleep Timer and Show Favorites. Of Course you may assign whatever you want and even start other addons or scripts
So my aforementioned configuration-file for the commands-addon looks like this:

Stop###PlayerControl(Stop)
Pause-Play###PlayerControl(Play)#RunPlugin(plugin://script.commands/?key=Menu1)
Mute-Unmute###Mute#RunPlugin(plugin://script.commands/?key=Menu1)
Cycle Audio Stream###Action(audionextlanguage)#RunPlugin(plugin://script.commands/?key=Menu1)
Cycle Subtitles###Action(nextsubtitle)#RunPlugin(plugin://script.commands/?key=Menu1)
Cycle Aspect Ratios###Action(aspectratio)#RunPlugin(plugin://script.commands/?key=Menu1)
Cycle View Modes###Container.NextViewMode#RunPlugin(plugin://script.commands/?key=Menu1)
Cycle Repeat###PlayerControl(Repeat)#RunPlugin(plugin://script.commands/?key=Menu1)
Set Alarm Timer###AlarmClock(Alarm Timer,Notification(Alarm Timer,This is your Alarm,15000))
Set Sleep Timer###AlarmClock(Sleep Timer,PlayerControl(Stop))
Show Favourites###ActivateWindow(10134)


So, the commands-addon provides for way to have kind of a self-made context-menu popup and thereby have much more than only one command being executeable by the press of a button. That may be very helpful if you are using a low button remote. :-)

Regards,

FantasticN

Btw: The background of the addon is transparent. Therefore the text is sometimes hard to read, especially if you are running a fullscreen-video. So If anybody finds out how to edit the addon to have a solid background please let me know. :-)
Reply
#36
This is what I am using for the Shield TV remote

Code:
<keymap>
  <Global>
    <keyboard>
      <left mod="longpress">PrevLetter</left>
      <right mod="longpress">NextLetter</right>
      <up mod="longpress">PageUp</up>
      <down mod="longpress">PageDown</down>
    </keyboard>
  </Global>
  <FullscreenVideo>
    <keyboard>
      <backspace>Stop</backspace>
      <left mod="longpress">CodecInfo</left>
      <right mod="longpress">Info</right>
      <return>PlayPause</return>
      <return mod="longpress">OSD</return>
    </keyboard>
  </FullscreenVideo>
  <FullScreenInfo>
    <keyboard>
      <backspace>Back</backspace>
    </keyboard>
  </FullScreenInfo>
</keymap>

What I would like to know is, how can I make the back button only exit out of the info screen (longpress right) or codecinfo screen (longpress left)? It still stops the playback if I hit it. I tried VideoOSD and FullScreenInfo and neither worked. I am guessing that the only way to exit is to call another info or codecinfo to clear it out? Is there a way to do that without losing the back button being a stop button?

J_K_M_A_N
Reply
#37
CodecInfo is actually an "overlay" rather than a window, so it can only be dismissed by using the CodecInfo action a second time, regardless of the remote or map.

FullScreenInfo should work the way you have it, though. I'm not sure why that one is stopping the video.
Reply
#38
(2016-05-27, 05:47)Ned Scott Wrote: CodecInfo is actually an "overlay" rather than a window, so it can only be dismissed by using the CodecInfo action a second time, regardless of the remote or map.

FullScreenInfo should work the way you have it, though. I'm not sure why that one is stopping the video.

It must not be tied to that. I just tried to change FullScreenInfo to <backspace>CodecInfo</backspace> and that did not work either. Oh well. Not that big of a deal. I don't use either one that often. I do like the Info overlay though to know how much time is left. Maybe there will be enough info when paused on the newer skin coming.

J_K_M_A_N
Reply
#39
My grandfather has a firestick and the long press return really frustrates him. I have tried and tried to disable it with no avail. Any ideas?

These are the settings I have tried so far:

<keymap>
<global>
<keyboard>
<return mod="longpress"></return>
<backspace mod="longpress"></backspace>
<browser_back mod="longpress"></browser_back>
<escape mod="longpress"></escape>
<browser_home mod="longpress"></browser_home>
</keyboard>
</global>
</keymap>
Reply
#40
(2016-06-01, 12:23)bobbyburns Wrote: My grandfather has a firestick and the long press return really frustrates him. I have tried and tried to disable it with no avail. Any ideas?

These are the settings I have tried so far:

<keymap>
<global>
<keyboard>
<return mod="longpress"></return>
<backspace mod="longpress"></backspace>
<browser_back mod="longpress"></browser_back>
<escape mod="longpress"></escape>
<browser_home mod="longpress"></browser_home>
</keyboard>
</global>
</keymap>

Since this isn't really related to this thread, let's take this over here: http://forum.kodi.tv/showthread.php?tid=...pid2349392
Reply
#41
Thumbs Up 
Thanks for a great keymap.
Works great on the Nvidia Shield TV Smile
Reply

Logout Mark Read Team Forum Stats Members Help
The "Ultimate" low button remote keymap1