Kodi Community Forum

Full Version: xbmc.ejecttray() first call displays Settings screen, second call ejects tray, why?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all

running svn 22528 on gentoo x86.

mapped a remote button to XBMC.EjectTray(). when i press the button from main menu, it is seen correctly:

22:34:32 T:3048761168 M:2569797632 DEBUG: LIRC: Update - NEW at 115894:29b195b700000201 00 KEY_OPEN Antec_Veris_RM200 (KEY_OPEN)
22:34:32 T:3048761168 M:2569797632 DEBUG: OnKey: 41 pressed, action is 122

but instead of ejecting the dvd tray, for some reason Settings screen is displayed.

if i press remote button inside Settings screen, dvd tray opens and closed as expected.

shouldnt the dvd tray open from the main menu as well?
It depends on what that button is mapped as for that screen. In the keymap.xml there are sections for each screen and the buttons can change depending on which screen is currently on top.
Maxim Wrote:It depends on what that button is mapped as for that screen. In the keymap.xml there are sections for each screen and the buttons can change depending on which screen is currently on top.

Code:
media@htpc ~ $ cat .xbmc/userdata/keymaps/antec_veris_rm200.xml
<keymap>
  <Global>
    <remote>
      <mytv>XBMC.ActivateWindow(favourites)</mytv>
      <power>XBMC.ActivateWindow(ShutdownMenu)</power>
      <livetv>ShowSubtitles</livetv>
      <clear>Close</clear>
      <hash>XBMC.EjectTray()</hash>
    </remote>
  </Global>
</keymap>

edit: aha, ok i think i found the culprit:

File: /usr/share/xbmc/system/keymaps/remote.xml has

Code:
<hash>XBMC.ActivateWindow(Settings)</hash>
Snap, I wasn't aware of individual keymaps like that. Good find. I learn something new everyday. Smile

I believe you should be able to override that setting by creating a remote.xml in your userdata/keymaps directory with just the hash settings and the appropriate headers. Just like you have for your other xml settings file.