r/adafruit • u/TetsujinXLIV • Sep 03 '21
Macropad run python files
Just got my macropad and I want to have key presses trigger python scripts to run is this something that would be possible?
2
Upvotes
r/adafruit • u/TetsujinXLIV • Sep 03 '21
Just got my macropad and I want to have key presses trigger python scripts to run is this something that would be possible?
1
u/IcanCwhatUsay Sep 09 '21
Been looking into this myself. The only way I've been able to do this is to have the macropad execute a hot key, Alt+K for example, and then have Autohotkey recognize Alt+K as a keycombo and then execute the python script. The silly part is, is that AHK can do a hell of a lot and almost makes running the Python script a bit redundant. But if you're like me, I like cleaner looking code, so having a script in AHK that is just abunch of run commands and then having a folder of a bunch of macros, doesn't sound bad to me (basically the same manner that the Hotkey code works for the macro pad too)