For anyone who wants ESC keycode when CTRL is tapped, but wants to keep standard modifier behavior on CTRL. (Macbook Pro Touchbar + Vim?)
The implementation is based on event listening and non-blocking run loops (as opposed to timers and polling current state). It should not adversely affect keyboard or processor performance in any measurable fashion.
Based on Activity Monitor, it typically shows 0% CPU Utilization and ~3MB of RAM.
Usage:
- Auto runs on install and restart.
- Tap CTRL to fire ESC command.
- Any additional key down or modifier change will cancel ESC action and act as normal CTRL modifier.
Installation:
- Download/Clone package
- Execute
./scripts/bootstrap.sh
- (Sometimes Required) Accessbility permissions - If prompted, open accessibilty preferences and check the box next to EscapeArtist to allow ESC keycode globally. Feel free to test without installing permissions to see if necessary on your system. If not required, feel free to remove the permission check from main.swift and rebuild/replace the bin in /usr/local/bin
Uninstallation:
- Execute
./scripts/uninstall.sh
- (Optional) Remove Downloaded/Cloned package
- (Optional) If permissions were granted, feel free to remove the entry in System Preferences -> Privacy -> Accessibility
Note: This program does not use any network or disk I/O. It does not log/save/report any information regarding user data, keystroke history, or storage filesystem. Feel free to read the (very short) source code to confirm for yourself.
Feel free to modify the source code for your own needs, but I ask that you please do not use this software or any modification of it for the purpose of spying, stealing, or otherwise compromising the security of any computer or network.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.