Map keys to SHUTDOWN XBMC
#1
Hi all,

I´m using Rapier skin on my iMac and a ATV 2 and I want to map a shutdown key since I don't see a button in the Home Rapier screen.

I know I can use the "S" key to toggle the shutdown menu but my intention is to just Quit XMBC with a single hit of a key.

Now for the Apple TV 2 I have the same issue but, I want to map a key or a combination of keys to quit XBMC.

I´m really new to this and I can´t find a way to do it.

Any help please.

Thank you.
Reply
#2
Welcome to the XBMC forums.

You can map a keyboard key to perform an action via a keyboard.xml (wiki) file. In the <global>/<keyboard> section of the file, assign the desired XBMC action to the desired keyboard key:
Code:
<some-key1>XBMC.Quit</some-key1>       <!-- Quits XBMC application -->
<some-key2>XBMC.Shutdown</some-key2>   <!-- Performs "Shutdown", as defined in XBMC System Settings -->
<some-key3>XBMC.Powerdown</some-key3>  <!-- Powers off your system -->

For the sake of completeness, I'm including the following example even though it may not be an option you desire:
Code:
<some-key4>XBMC.ActivateWindow(shutdownmenu)</some-key4>  <!-- Displays Shutdown menu  -->

See List_of_XBMC_keynames (wiki) (use key names from column 1 of this list)
See List_of_built-in_functions (wiki) for these and other functions you may want to assign to keys

Caveat: These should work in theory, but I'm not a Mac user, so I can't verify if they do for that platform.
Reply
#3
Thank you artrafael for your quick answer.

I´m following your instructionns. I will let you know tomorrow.

Thank you.

Reply
#4
It works perfectly, thank you!
Reply
#5
I still have the problem of XBMC not shutting down properly (stuck in task manager) when hitting the Close button on my remote (VRC-1100) on the latest nightlies. This has been a long standing problem looking at previous posts. I'm trying to map the close button on my remote to the XBMC.Shutdown function but can't get it to work. This is what I have:

Code:
<keymap>
  <global>
    <keyboard>
      <numpadtimes>contextmenu</numpadtimes>
      <numpadfive mod="alt">info</numpadfive>
      <f4 mod="alt">XBMC.Shutdown</f4>
    </keyboard>
  </global>
</keymap>

That doesn't work, it still force closes to task manager. Any ideas?
Reply
#6
The XBMC.ShutDown triggers the default shutdown function defined in the system settings under power saving.

XBMC.Powerdown powers down your system.

XBMC.Quit shuts down XBMC.

Are you trying to shut down you computer or only XBMC?

The Rapier update for Frodo has a POWER Menu, which features all the shutdown functions.
Reply
#7
I'm trying to Shutdown XBMC. XBMC.Shutdown works fine on another key but not the close button, that's what I'm trying to figure out.
Reply
#8
Did you verify from your debug log (wiki) that the Close button on your remote actually sends the Alt-F4 keystrokes?
Reply
#9
I don't see anywhere in the debug log that has that info, but ShowKey says close key is

<f4 mod="alt">Notification(Key, f4, 3)</f4>
Reply
#10
Sending ALT/F4 command to XBMC doesn't shut down the program properly. I just tried the same and it sort of force quits XBMC, but the application still runs in the background of the system. It does not have the time to turn off all the services etc.

It's definately the ALT/F4 command conflicting with the XBMC.ShutDown or XBMC.Quit.
Reply

Logout Mark Read Team Forum Stats Members Help
Map keys to SHUTDOWN XBMC0