Add Generic support for external programs to interact
is a new version (first alpha of it): Who is interested can try it out. Download
Works great. I would have liked for the settings page to open by default the first time the application is run though... Had to search through the system tray to find those :v
Anyway, if you'd also like and have any time, you could check my own release fork of your program ^^ It basically redirects all the actions to Autohotkey which I also used to handle the passthrough issues (now any unassigned key would just be passthrough by default).
https://github.com/TarkanV/macroMyKBD-AHK/releases/tag/ahkv2.1
You would just need to install autohotkey v2.1, configure a keyboard with the actions.yml (it is still needed here for now x) ) and then open kb-server.ahk to, wait for the confirmation Tooltip and then the keyboard can be used.
For assigning hotkeys, all the instructions are in kb-config.ahk (just need to open it in some text editor :v)
If you find it interesting, then I would wonder if we could merge both variants somehow, or at least give it as an option... Most of the changes are basically just setting up a tcp server and sending the input info to ahk through that server.
Originally posted by @TarkanV in #10
Preferably I would offer a generic interface for other services to interact with MMKBD.
So ideally I would open a websocket server, where other programs can connect to and subscribe to the keyboard events. This should be authenticated with a password, to prevent keylogging. Even though I do not recommend using MMKBD on the users normal typing keyboard.
So the question is: Can AHK also connect to a TCP server and act as a client? Can AHK connect to a Websocket? Can AHK parse and stringify JSON?
ping @TarkanV
Yes, AHK can connect to a TCP server via libraries like _socket.ahk. It can be difficult to find a version of socket.ahk that works for Autohotkey V2.0+ but here's one that worked out for me : _socket.ahk.
I don't know for WebSockets specifically, since I didn't use those, but AHK seem to have library for that too : WebSockets.ahk
For JSON, you can use jsongo.v2.ahk or if you prefer, there's also JSON.ahk made by the same person who made that WebSockets.ahk library that I linked above, but I never tested this one (he seem to also have his own Socket.ahk so you could maybe just use this guy's collection of libraries alone for the whole set ^^ I mean it needs to be imported by WebSockets anyway so either way...)