KevinFonda Posted March 6, 2015 Report Share Posted March 6, 2015 Hi all, I have an idea and I'm not sure where to get started. My idea is to create a linux daemon that would intercept keyboard combinations (ctrl-shift-1 for example) and toggle a GPIO pin on the raspberry Pi or increase/decrease PWM. I would like to use it to control LED light strings and close motor driven curtains while running Kodi. With this kind of daemon I could use any button on any remote to issue the keyboard combinations through my Flirc. Any way, what I would like to know is does this sound feasable and how hard would it be? Kevin Fonda Quote Link to comment Share on other sites More sharing options...
yawor Posted March 6, 2015 Report Share Posted March 6, 2015 Hi, You should take a look at triggerhappy daemon. It can take any input event (keyboard included) and the run any script or executable you want. 1 Quote Link to comment Share on other sites More sharing options...
KevinFonda Posted March 6, 2015 Author Report Share Posted March 6, 2015 Thanks, that looks like exectly what I was looking to do...only much easier because somebody else already did it. :-) Since I posted I did some more reading and found out the Kodi can run pyton scripts from the keyboard.xml file and managed to get it to do What I wanted from there, but trigger happy looks like it will be better since it is at the system level and doesn't count on kodi running. Quote Link to comment Share on other sites More sharing options...
yawor Posted March 6, 2015 Report Share Posted March 6, 2015 Using Kodi keymaps and python scripts is also a nice idea. It may depend on Kodi being running correctly but it also gives ability to change keymaps depending on current app state: for example you can run different scripts (or with different arguments) for fullscreen player and different for main menu. Every method is good as long as it does what it needs to do :). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.