Keyboard.xml power down kodi command
#1
Hi all

I have been using the suspend command In a keyboard.xml as I have the f12 key associated with it as I have a flirc which is linked to a ir remote command on a pc as I wanted the pc to be suspended. I want to be able to use my flirc with my new android box but want to add a keyboard.xml file that has the power off kodi command.

I know these commands where removed from the remotes for android boxes as they powered off the box hardware and could cause problems with kodi with corrupt files as the power off button on the remotes did not use kodi own shutdown command meaning u could corrupt.

But by using the flirc as a keyboard I can send a ir command that is assigned to the keyboard f12 key the create a keyboard.xml with the shutdown command meaning it will use kodi shutdown power down instead, shutting down Kodi correctly and then powering off the box.

Sorry for being abit long winded so the question is the command simply "shutdown" to close down kodi safely and correctly and then powers off the box so basically the same as the power menu which means no problems with kodi getting corrupt.

Thanks all

Thanks
Reply
#2
Anyone ? Is the command shutdown the right one to use in keyboard.xml for safe kodi shutdown then power off

Thanks
Reply
#3
This is the wiki https://kodi.wiki/view/Basic_controls#Power_Options

Not sure if you're trying to shutdown Kodi then the o/s or just the o/s; the keyboard command would be tagged to the o/s shutdown. I'm not sure there is a graceful way to shut down via IR but shutting Kodi down first would seem optimal, then the IR blaster would revert to o/s controller and in that would be your F12.
Reply
#4
(2024-05-07, 22:29)PatK Wrote: This is the wiki https://kodi.wiki/view/Basic_controls#Power_Options

Not sure if you're trying to shutdown Kodi then the o/s or just the o/s; the keyboard command would be tagged to the o/s shutdown. I'm not sure there is a graceful way to shut down via IR but shutting Kodi down first would seem optimal, then the IR blaster would revert to o/s controller and in that would be your F12.

I use the kodi menu and select Power off system using the remote so this shuts down kodi then powers of the system as this is the only way you can shutdown kodi and the system. But I want to be able to do the same thing using a keyboard command but i don’t know what the command is for the keyboard.xml to act the same way as the Power off system In the menu. I can then use the flirc to associate a ir command to the f12 key which then would run the command to shutdown kodi the power of the system just like how the power menu works when I select the Power off system option.

CoreELEC must shutdown kodi gracefully then send a power off command to the system when using the Power off system in the menu of the power

This is that same way as it works on a pc is it not ? closes kodi then turns off the pc

Something like this

<keymap>
<global>
<keyboard>
<f12 mod=>shutdown()</f12>
</keyboard>
</global>
</keymap>
Reply
#5
Might work for CoreElec, but windows & Kodi doesn't appreciate f12 that way. Might have a peek here https://github.com/xbmc/xbmc/blob/master...yboard.xml
Reply
#6
(2024-05-07, 23:35)PatK Wrote: Might work for CoreElec, but windows & Kodi doesn't appreciate f12 that way. Might have a peek here https://github.com/xbmc/xbmc/blob/master...yboard.xml

Yep on the pc I used suspend for years, the f12 key used an unused ir remote code to send a ir signal to the flirc which was assigned to the f12 and I then assigned a suspend code to f12 worked like a charm for years as it was faster coming out of wake than having to power up the pc.

Having an android box with a ssd installed with coreelec can boot within 10 sec from cold power of so wanted to use the same methods but using a true safe way to close Kodi then shut system down. Just needed to know the command

Looks like the to shutdown Kodi and power of system is the shutdown command according to the link you sent me

<end mod="ctrl">ShutDown()</end>

Have to put that in the keyboard.xml file to add it to the key map I want.
Reply

Logout Mark Read Team Forum Stats Members Help
Keyboard.xml power down kodi command0