Custom (python) windows in keymap.xml
#1
Hi everyone!

I'd like to adapt my keymap to have a better mythbox integration.
Mythbox adds a few windows (id 13000-13007) and i would like to use them in the keymap file to specify special actions when mythbox is active.

The documentation says, that it is possible using the windows ids:
Quote:A list of the available window names can be seen here Window IDs. The WINDOW can also be a custom window formatted as <windowId#> (e. g. <window1113>).

I tried the following entry (also with relative id 3000) but xbmc always falls back to the global section.
Code:
<window13000><remote><start>Fullscreen</start><back>XBMC.ActivateWindow(Home)</back></remote></window13000>

Should it work for addons or only for "build-in" windows?
Any ideas?

Thanks,
Christian
Reply
#2
As far as I know this should work for any window. Have you checked in the debug log to see what window XBMC thinks is active?

JR
Reply
#3
I checked the log

Code:
23:36:41 T:139806820157376   DEBUG: Activating window ID: 13000
23:36:41 T:139806820157376   DEBUG: ------ Window Deinit (Home.xml) ------
23:36:41 T:139806820157376   DEBUG: ------ Window Init (/home/htpc/.xbmc/addons/script.mythbox/resources/skins/Default/720p/mythbox_splash.xml) ------

Looks ok to me.
Any ideas?
Reply
#4
I've just tried installing the MythTV add-on. It doesn't do anything useful since I don't have a MySQL server, but the window mapping does work. I used the mapping:

Code:
<window13002>
    <keyboard>
      <two>Notification(Rat, Window 13002, 2)</two>
    </keyboard>
  </window13002>

Since I end up in the settings window that has ID 13002, and when I press "2" the log shows (I've removed a few irrelevant lines):

Code:
DEBUG: ------ Window Init (DialogKaiToast.xml) ------
DEBUG: Activating window ID: 13002
DEBUG: Checking if window ID 13002 is locked.
DEBUG: ------ Window Deinit (C:\Users\renniej\AppData\Roaming\XBMC\addons\script.mythbox\resources\skins\Default\720p\mythbox_home.xml) ------
DEBUG: ------ Window Init (C:\Users\renniej\AppData\Roaming\XBMC\addons\script.mythbox\resources\skins\Default\720p\mythbox_settings.xml) ------
INFO: Loading skin file: C:\Users\renniej\AppData\Roaming\XBMC\addons\script.mythbox\resources\skins\Default\720p\mythbox_settings.xml
DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
...
DEBUG: SDLKeyboard: scancode: 3, sym: 50, unicode: 50, modifier: 0
DEBUG: CApplication::OnKey: 61538 pressed, action is Notification(Rat, Window 13002, 2)

This is with v10.1 running on Windows.

JR
Reply
#5
Got it :-)
I had a typo in the config
Unfortunately when i use Fullscreen in mythbox and restart it
they get higher window ids. So i'm not sure if it makes sense to use it like this.

Thanks
Christian
Reply
#6
cfetzer Wrote:Unfortunately when i use Fullscreen in mythbox and restart it they get higher window ids. So i'm not sure if it makes sense to use it like this.

I found this too. I simply added the mappings multiple times for window13000, window13001 and so on. It means you get the same key mappings for all the MythTV windows, but this may not be a problem.

JR
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Custom (python) windows in keymap.xml00