Show HN: AutoHotkey for Linux (opens in a new tab)github.com
500 pointsthis 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
> 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.
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.
[0] https://en.wikipedia.org/wiki/AutoKey
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
How?
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/
---
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.
All comments shown.
Couldn't load more comments. Check your connection and try again.