Kodi Community Forum
Send command from Harmony remote to exit XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56)
+---- Thread: Send command from Harmony remote to exit XBMC (/showthread.php?tid=175466)



Send command from Harmony remote to exit XBMC - yanathin - 2013-10-11

I'm trying to get my Harmony remote (the Smart Control one) to exit XBMC by pressing a key on the remote, much like pressing the menu button opens it up. I could have sworn I was able to do this before but I can't find the option now. Basically, I need the "Shutdown" command to be sent, because in XBMC I have that set to exit the app rather than power down the machine. Does anybody know how to get this to work? I tried making a keyboard.xml file but failed to get it to do what I wanted.


RE: Send command from Harmony remote to exit XBMC - artrafael - 2013-10-11

Try adding in the <global> section of your keyboard.xml:
Code:
<some-remote-key>XBMC.ShutDown()</some-remote-key>



RE: Send command from Harmony remote to exit XBMC - yanathin - 2013-10-11

Thanks! The problem, though, is that I have no idea what "some remote key" would be. I can't find a list of harmony remote keys anywhere.


RE: Send command from Harmony remote to exit XBMC - User 34959 - 2013-10-11

If you use Plex Player device profile you should be able to map F1, F2 etc. so use those. To make sure, go to myharmony(it's programmed there, right?) and check which buttons are available.


RE: Send command from Harmony remote to exit XBMC - artrafael - 2013-10-11

You could also try enabling debug logging in XBMC, pressing an unused button on your remote and then examing your debug log (wiki) to see if the keypress was recognized by XBMC and by what key name.


RE: - yanathin - 2013-10-12

Here's what my keyboard.xml looks like:

Code:
<keymap>
    <global>
        <keyboard>
            <F13>XBMC.ShutDown()</F13>
            <F14>XBMC.ShutDown()</F14>
        </keyboard>
    </global>
</keymap>

I have it placed in User/Library/Application Support/XBMC/userdata/keymaps/keyboard.xml. In the harmony remote setup, I can have F13 and F14 commands set to a button on the remote, but when I press it, nothing happens.

Am I doing something incorrectly?


RE: Send command from Harmony remote to exit XBMC - yanathin - 2013-10-21

Bump - anybody able to help with this? I'd really appreciate it!


RE: Send command from Harmony remote to exit XBMC - Glorious1 - 2013-10-23

By default, the Exit button should take you to the shutdown menu from the home screen. So if you're somewhere else, just hit exit several times till you're at the shutdown menu. If you have one button that directly shuts it down, you're likely to hit it by accident and regret it. At least I would be.


RE: Send command from Harmony remote to exit XBMC - yanathin - 2013-10-25

What I'm trying to do is have XBMC automatically exit when I hit the universal "off" button on the remote. I can make it start by itself when I turn everything on without any issue. The reason I want to do this is so that it eliminates any standing problems from memory leaks and also automatically updates the XBMC library every time I turn on TV.


RE: Send command from Harmony remote to exit XBMC - Glorious1 - 2013-10-26

That would be cool. Please let us know if you figure out how to do it.
Also, how do you start XBMC when you start the activity on the remote?
Does it also wake up the computer or whatever?
I just hit the menu button and it does both (after I start the activity).


RE: Send command from Harmony remote to exit XBMC - Evergreen4 - 2014-05-18

(2013-10-12, 20:08)yanathin Wrote: Here's what my keyboard.xml looks like:

Code:
<keymap>
    <global>
        <keyboard>
            <F13>XBMC.ShutDown()</F13>
            <F14>XBMC.ShutDown()</F14>
        </keyboard>
    </global>
</keymap>

I have it placed in User/Library/Application Support/XBMC/userdata/keymaps/keyboard.xml. In the harmony remote setup, I can have F13 and F14 commands set to a button on the remote, but when I press it, nothing happens.

Am I doing something incorrectly?

Hi yanathin,

It's been a long time since you posted this, but I have just mapped a key (F12 in my case) to exit XBMC and I just wanted to let you know how I did it.

Actually you are almost done, but I am afraid you are placing the keyboard.xml file in the wrong folder: I am running Windows 7 and the correct folder to copy the edited keyboard file is: C:\Users\[your name here]\AppData\Roaming\XBMC\userdata
Please note that the appdata folder might be hidden by default.

Once you copy the edited keyboard file into the correct folder you should be able to exit XBMC using whatever key you want to use.

Cheers


RE: Send command from Harmony remote to exit XBMC - Glorious1 - 2014-05-18

Nope, he put it in exactly the right place for a mac. But I wonder if it is the right kind of file. Mine is named joystick.Harmony.xml, and the commands are in
Code:
<keymap>
  <global>
    <joystick name="Harmony">
and the commands are of the form
Code:
<button id="1">Up</button>