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

themodelplumber#
You did this? Nice job!

> Please also check out Keysharp, a WIP fork of IronAHK, another complete rewrite of AutoHotkey in C# that tries to be compatible with multiple OSes and support modern, v2-like AHK syntax with much more features than this one. In comparison, AHK_X11 is a lot less ambitious and more compact, and Linux only.
Fascinating, lots to check out here. Thank you.
BTW this kind of work falls into poweruser tools IMO, which is an important area for cultivation of Linux Desktop focus. Traditionally in the Linux community this has been more of a distro-maintainer's support choice (offer poweruser tweaks and tools, or not) so it's always nice to see new distro-independent, non-dev-poweruser options coming into being.

BiteCode_dev4 replies#
I see the benefit in this, having one script that works everywhere.

It's also good to know linux has autokey (https://github.com/autokey/autokey) for the same result. The name is close, but it's a different project.
It's not compatible with autohotkey, but you can script using python. I used it to enter dates, emails and automatize dynalist.io actions.

Ldorigo#
Autokey is "good enough" but unmaintained and really rough around the edges. I really wish someone picked it up because it's 85% of the way to being a great automation tool.
delusional#
There's also sxhkd and xbindkeys, for anyone looking for alternatives.
endymi0n4 replies#
Nice! I used to love AHK to death, incidentally it also got me my first paid programming job.

It‘s about the only software I dearly missed after switching to Mac, but recently I found Hammerspoon and couldn‘t have been happier.
Yep, Lua is a bit weird and exotic, but hey, so is AHK. In the end, you trade in some of AHKs terseness for better modularity and compatibility with existing packages.
https://github.com/Hammerspoon/hammerspoon

smirgel#
Love hammerspoon! It would be nice if it supported Linux as well.
Ldorigo#
You might also want to check KeyboardMaestro on Mac. It's honestly the only programme I miss after switching to Linux desktop. 40€ but worth every cent.
spidersouris#
> incidentally it also got me my first paid programming job

How?

erikcw#
I’ve been using hammerspoon for several years and it has really become integral to my workflow.

You may want to check out the extension package spacehammer[0]. It includes a bunch of workflows and shortcuts that I’ve found extremely useful.
Interestingly (for me at least), it’s authored in Fennel [1], a lisp that compiles to lua. I actually found spacehammer originally when I was working on converting my personal hammerspoon config to Fennel.
[0] https://github.com/agzam/spacehammer
[1] https://fennel-lang.org/

geocrasher1 reply#
AHK is GOLD for me. Power user? Sure. But it ties me to Windows only, and so I'm VERY keen to see a version for another OS. AutoKey failed miserably in my testing, and I have so much tied directly to AHK that I'm okay with choosing Windows to run it. There's a lot of other things that are Windows-only for me, so it's not a big deal. I actually LIKE W10 and W11. But it's great to have options!
AeroNotix1 reply#
I'm interested in hearing what you've built with AHK such that you're so closely tied to it, and by extension windows.
anotheryou#
I have plenty of uses:

---
Keyboard layout:
my whole keyboard layout used to be a remapping with AHK :)
not done by me though and the new implementation of the layout is something else (https://www.neo-layout.org/)
---
Complicated Shortcuts:
I still use it for generating and filling site specific mail addresses with a shortcut. My keyboard types "shortcut_site_specific_mailaddress" and ahk replaces it with news.ycombinator.com+is_allowed_to_pass_catch_all@mydomain.com.
For some time it was also the one tool that could dim my dell desktop screen by hotkeys with some shady dll someone provided.
---
Usability:
I also used it for alt+drag for a while (but now have a more native tool with exactly that name).
Capslock lights up if I am not in my native input language
---
Stress Relieve:
When mobile testing a lot in the emulator I got slight inflammation from clicking the mouse too much. If that happens I remap the left mouse key to the keyboard.

Load more comments