2014-03-15, 22:44
Added a new version to my repository: 0.0.17
Repo
Added a custom keymap, installable from settings::Install Keymap
Keymap adds F1 (repeat item text) and F2 (say extra text)
Currently F2 only works in the addon information window
Fix eSpeak to encode to unicode to UTF-8 string before speaking
Changed lib file in addon.xml to main.py which starts the service or other functions depending on the calling args
For now in the addon info window, with the keymap installed, pressing F2 will say the author, version and description. This is sort of a proof of concept at the moment.
In the future, the keys could be changed, more keys could be added, and the keys could be made configurable.
I used a little trick I figured out in the past with one of my other addons. I made the TTSService class a subclass of xbmc.Monitor. This allows the keymap to run the script which actually just saves a special 'command' setting, which in turn triggers the xbmc.Monitor.onSettingsChanged, and the service can then react to the 'command' setting. A ad-lib form of inter-thread communication. Just in case you are wondering what is going on in the code there
Repo
Added a custom keymap, installable from settings::Install Keymap
Keymap adds F1 (repeat item text) and F2 (say extra text)
Currently F2 only works in the addon information window
Fix eSpeak to encode to unicode to UTF-8 string before speaking
Changed lib file in addon.xml to main.py which starts the service or other functions depending on the calling args
For now in the addon info window, with the keymap installed, pressing F2 will say the author, version and description. This is sort of a proof of concept at the moment.
In the future, the keys could be changed, more keys could be added, and the keys could be made configurable.
I used a little trick I figured out in the past with one of my other addons. I made the TTSService class a subclass of xbmc.Monitor. This allows the keymap to run the script which actually just saves a special 'command' setting, which in turn triggers the xbmc.Monitor.onSettingsChanged, and the service can then react to the 'command' setting. A ad-lib form of inter-thread communication. Just in case you are wondering what is going on in the code there