Potential internal restructuring
Author: asmvikCreated Jul 22, 2020Updated May 29, 2025
Labelsenhancement
I have had the following thoughts for some time now, and am debating whether I should do the changes listed below:
- Implement support to differentiate between commands that run on key-down, repeat, and release events.
- Implement mouse-down, up events.
- Add IPC mechanism to query current state and/or all state. This includes current available hotkeys (based on the active mode), or all modes with the hotkeys they provide. Probably json output for best integration with external tools.
- Utilize above IPC mechanism to synthesize hotkeys so that we don't need to take the overhead of process startup to simply synthesize a key. This will also allow the option to pass some kind of flag that makes skhd not capture the event it posted, so that key-remapping becomes more feasible than it currently is.
- I want to revise the syntax used to define hotkeys.
This might end up with me just starting from scratch and replacing the current files in the repo with a new version, eventually, as the planned changes pretty much call for a complete rewrite. The plan is to persist all current features somehow, but the syntax is probably going to be somewhat different.
Source: asmvik/skhd