v19 An addon script that creates its own keyboard mapping?
#2
(2020-07-06, 00:05)ThumbOne Wrote: The question is, given how cumbersome this extra install effort is, can the addon use a setting (in settings.xml) that defines a key, to add it to the keymap itself (and change it if the setting changes)?

If you mean, can the addon be modified to use a setting to define a key and then place that keymapping into the keymap file then my answer would be yes, that's possible.  You would need to translate the path from a Kodi internal path to a system path (so as to stay cross-platfrom) with something like xbmc.translatePath('special://userdata/keymaps/keyboard.xml') then use xbmc.vfs to check if the file exists, open it, parse the xml and see if your keymap already exists.  If yes, has setting changed?  Add keymap to file if necessary and re-write the file out.

Probably more work than editing the keymap file directly though Wink
Learning Linux the hard way !!
Reply


Messages In This Thread
RE: An addon script that creates its own keyboard mapping? - by black_eagle - 2020-07-06, 12:03
Logout Mark Read Team Forum Stats Members Help
An addon script that creates its own keyboard mapping?0