Lurker News
Hello HN,

this is the first functional reimplementation of AutoHotkey [1] for Unix-like systems, as far as I am aware. Half the commands are still missing, but everything important is done, as I have worked a lot on it over the past two months. Converting scripts into stand alone binaries is also supported. Hope this will find some adoption eventually. :-) - This implementation focuses on v1.0-like classic syntax from 2004 (!). This is a significant subset of the popular current v1.1 syntax from Windows (AHK_L). The reason this does not (yet?) target the full Windows spec is how complex it is. Notably, there's also another ongoing project which targets v2 called KeySharp [2].
If you are not aware of what AHK is, it is an easy but capable scripting language for automation and Hotkeys, and all sorts of visual things like GUIs.
If you want to learn more, there plenty of info on the repo, the docs html, and there's an active AHK Discord too, and I am personally also checking the forums and HN of course.
[1] https://www.autohotkey.com/ [2] https://bitbucket.org/mfeemster/keysharp/

Comments (183) 43 threads

Show all comments

Showing thread 35 of 43

chillpenguin4 replies#
Anyone know of a comparable program for macOS?
akerr#
Keyboard Maestro? The built-in AppleScript, Services and Keyboard shortcuts support?
rattt1 reply#
BetterTouchTool has a lot of overlap with AHK I believe. Lets you remap keyboard/mouse actions globally and/or per application and perform actions or run scripts on keyboard/mouse input ands lots of features of that kind.

(Never used AHK myself but the couple times I looked for something similar to BetterTouchTool on Windows I got recommended AHK)

jasomill#
As someone who has used both, that's not entirely off-base, though the details are very different: AHK is better at lower-level keyboard remapping and related I/O — you really need to combine BTT with something like Karabiner-Elements for more than rough equivalence here — but BTT is much better than AHK for out-of-box support for non-keyboard event triggers, with native support for mouse button-press events[1], trackpad and Magic Mouse gestures, touch bar, Siri remote, MIDI messages, hot corners, BT LE proximity events, all manner of system events (battery status, lock/unlock, Apple Events, distributed notifications, etc.), scheduled and recurring timer events, and the list goes on.

[1] Including support for all buttons on n-button mice for all values of n supported by USB standards, something that, last I checked, Windows itself was incapable of handling at the driver level without dropping down to low-level HID event processing that's a bit of a stretch, though not technically impossible, for AHK.
This, incidentally, is why many-buttoned Logitech gaming mice come preconfigured to send keyboard events for all but the first few buttons.