Kodi Community Forum
Custom (python) windows in keymap.xml - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
---- Thread: Custom (python) windows in keymap.xml (/showthread.php?tid=108949)

Custom (python) windows in keymap.xml - fetzerch - 2011-08-30

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.

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


- jhsrennie - 2011-08-30

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?


- fetzerch - 2011-08-31

I checked the log

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?

- jhsrennie - 2011-09-01

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:

      <two>Notification(Rat, Window 13002, 2)</two>

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):

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.


- fetzerch - 2011-09-02

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.


- jhsrennie - 2011-09-03

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.