detect button press and use it in a Python script?
#4
You could create a service addon that listens to all the incoming notifications and does something if the notification is about a key press (and specifically the correct key press).

Here's a little bit about service addons:

https://kodi.wiki/view/Service_add-ons

And specifically the onNotification hook:

https://codedocs.xyz/xbmc/xbmc/group__py...7a8a9a8dc7

I don't remember off hand what notification event you need to listen for, so you might need to just create the service addon and have it log the messages to see if you can figure out which one will correspond to a keypress.

One last option. I've never used it, but there is an addon called Kodi Callbacks that might let you configure an event using a keypress as a trigger.

https://kodi.wiki/view/Add-on:Kodi_Callbacks
Reply


Messages In This Thread
RE: detect button press and use it in a Python script? - by pkscout - 2020-07-26, 20:58
Logout Mark Read Team Forum Stats Members Help
detect button press and use it in a Python script?0