Re:In Praise of AutoHotKey
by battery_cowboy on Tuesday May 12, 2020 @08:21PM
(#23161886)
Using ; as a hyper key blew my mind, like the article recently about how a certain developer calls all of his scripts ',something' so if he want to run a cli command of his, pressing comma then tab will show only his scripts, so ',py(tab)' won't have 15 pythons in it.
Re:In Praise of AutoHotKey
by Noumenon72 on Tuesday May 12, 2020 @08:53PM
(#23162119)
I had almost used up all combinations of Ctrl, Alt, Shift, Win and letters at one point, and still never thought of making my own hyper key. It's genius.
At my new job I'm afraid to download AHK at all :(
Re:In Praise of AutoHotKey
by slightwinder on Wednesday May 13, 2020 @04:58AM
(#23164929)
There is a portable version of autohotkey, so you can run it without installation if this would ease your fear.
It's been a bit since I've last used AHK, but I believe you can also compile your script to .EXE and just take that to work with you.
Karabiner Elements is really popular for this use case. I have Caps set to be escape when pressed and Hyper in conjunction with pressing another key.
The downside is Karabiner Elements requires installing a kext, and macOS Catalina periodically shows warnings saying the kext is a legacy extension.
Man as someone who has been putting off the upgrade that's too bad, I figured their solution of creating kind of a virtual keyboard input would be pretty solid going forward.
Does Hammerspoon work just as well? Karabiner is so incredibly solid.
Hammerspoon is doing the stuff talked about here using event taps. I don't know if you can reliably use event taps to simulate different modifiers though, or to prevent a modifier from actually taking effect (e.g. if you wanted to remap one modifier to another).
I'm hoping Karabiner Elements figures out some solution going forward. It still works on Catalina but the expectation is the "legacy kext" will no longer function on 10.16.
For paste blockers I've been using an Alfred workflow that types keys using AppleScript. It doesn't work with characters that require special input like ü, which is annoying, but it's sufficient for passwords. The benefit here is I'm not using up a global hotkey for such an infrequent use-case (especially not one actually used by other apps, such as Terminal.app).