Win Remote control power-toggle issue with Kodi.
#1
Hi all .. been using XBMC for a couple of years now ... when I originally configured my HTPC using a Wesena ITX5 case, I noticed that the IR sensor is presented to windows as a keyboard & mouse HID device... I configured my Harmony remote as a 'Windows Media Center PC' - and noticed that when I send the 'power toggle' command XBMC receives a key-press of 'S'.

What I had done at the time was add the following to the keyboard.xml file

Code:
<keymap>
    <global>
        <keyboard>
            <s>XBMC.Shutdown()</s>
        </keyboard>
    </global>
</keymap>

This has worked since day 1 for both v12 and v13 of XBMC.

Today I updated to Kodi (stable), and now power-toggle exits to desktop rather than performing xbmc.shutdown().

I enabled debug to confirm what's being received when I press power-toggle - and things have changed:

Code:
23:31:01 T:1752   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
23:31:01 T:1752   DEBUG: CApplication::OnKey: alt-leftalt (0x4f0d4) pressed, action is

As you can see - now power-toggle sends alt-leftalt (0x4f0d4) with no action assigned - perfect I thought so I added a keymap for 0x4f0d4 (323796 in decimal).

Code:
<keyboard>
    <s>XBMC.Shutdown()</s>
    <key id="323796">XBMC.Shutdown()</key>
</keyboard>

But .... no joy!

Code:
23:32:10 T:3484   DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
23:32:10 T:3484   DEBUG: CApplication::OnKey: alt-leftalt (0x4f0d4) pressed, action is XBMC.Shutdown()

The 'key' is now assigned to shutdown - as can be seen in log above - but Kodi still exits to desktop; even thou it seems to be processing it - something seems to be taking precedence?

So - can anyone help please? Can this be related to the now defunct "Remote control sends keyboard presses" option which is missing in Kodi? If so - can this be forced in advancedsettings.xml somehow? In any case - I would rather sort this out properly as I have sometimes (albeit rarely) hit S on the actual keyboard resulting in an unwanted shutdown.

Cheers all!
Reply
#2
Any ideas appreciated ... please!?
Reply
#3
SniperZoz,

XBMC.Shutdown() doesn't seem to be in the Kodi function set any longer.

Try:

<keyboard>
<key id="323796">XBMC.ActivateWindow(shutdownmenu)</key>
</keyboard>

AF
Reply
#4
Did you get this figured out? Sort of annoying if I forget to turn it off before I shut down the TV.
Reply

Logout Mark Read Team Forum Stats Members Help
Remote control power-toggle issue with Kodi.0