AutoHotkey v2 Linux Port

This documentation set accompanies the AutoHotkey v2.0.26 Linux port (MonoEven/Autohotkey_Linux). The pages in this site are the official AutoHotkey v2 documentation, adapted for the Linux port. Only AutoHotkey v2 syntax is supported; the AutoHotkey v1 language, the v1-to-v2 migration material, and all Windows-specific behavior are not part of this port.

Language and syntax

Examples in this documentation

These pages mirror the official AutoHotkey v2 documentation, so their examples fall into three groups on Linux:

Complete Linux catalog: FUNCTION_COVERAGE.md maps all 370 IMPL entries to exact Linux-executed source lines and environment profiles; examples/generated/ contains one function page each (case-insensitive filenames included), and 230 pages also retain an upstream code example. CI rejects omissions and generator drift and runs every unattended curated example. Interactive and destructive operations have explicit interaction/safety-boundary examples.

What works on Linux

The generated worklist records 370 implemented functions and three explicit unavailable Windows COM boundaries (ComObjArray/Connect/Query); TrayTip is a desktop notification and TraySetIcon a StatusNotifierItem tray icon. 1170 doc-check assertions pass under Xvfb (including 29 for DllCall against native .so libraries and migration errors, and 20 for the D-Bus COM layer). The port has two display backends:

Differences from Windows AutoHotkey

See CHECK_REPORT.md for the complete per-module report.

Latest release

The project is in technology-preview status: the language coverage is broad and the X11/XWayland backend is usable for real automation, but native-Wayland global hotkeys, cross-app control automation, and parts of Unicode input remain young; treat new installs accordingly. Release policy (check0820): all releases since v2.0.26-linux.15 remain published on the GitHub Releases page, each with a CKSUMS.txt (SHA-256) alongside the .tar.gz and .deb, so ahk --update <VER> can genuinely upgrade or downgrade (rollback) to any published release. Releases before linux.15 were removed when the new installer line shipped; their source remains on the v2.0.26-linux.* git tags. The latest release is v2.0.26-linux.23. Highlights of this release:

Compatibility matrix and roadmap

What works where (verified environments in parentheses):

CapabilityX11 / XWayland (Xvfb suites, Xorg on Debian/Ubuntu)GNOME 49 Wayland (Ubuntu 25.10) wlroots Wayland, e.g. sway (headless suites)KDE/other Wayland
Global hotkeysFull: XGrabKey/XGrabButton, ~ passthrough, * wildcard, left/right modifiers, key-up, a & b combos, BadAccess conflict reportingExclusive only: 1::/^1::/ F12:: (zero-confirm, suppression, auto re-register after reload)Global hotkeys via Portal or the XWayland fallback Portal (may require an app identity; see above)
Send / Mouse simulationFull XTEST, Unicode keysym transmissionNew (check0820): uinput virtual-keyboard lane (needs /dev/uinput access, e.g. input group) delivers keys/buttons/pointer on GNOME; non-ASCII via the clipboard-paste fallback (better: waits for the target to consume, restores an empty original to empty, AHK_WAYLAND_PASTE=0 disables it) or the virtual-keyboard protocolVirtual keyboard/pointer protocols; non-ASCII via clipboard-paste fallback Depends on compositor support for the virtual protocols (usually absent; uinput lane applies)
Hotstrings / InputHookFull capture engine, Unicode trigger words, OnChar/OnKeyDown/OnKeyUp notifications Not available (the capture engine requires the X11 grab machinery; use an XWayland/Xorg session)
Window/control automation (Win*, Control*, Gui) Full (GTK3 Gui included)Via XWayland fallback for X11 windows; native-Wayland apps are driven through the AT-SPI bus for text read/set and click (round-37)
Cross-app accessibility control automation (AT-SPI) Via at-SPI too (any GTK/Qt/Electron app with accessibility on) Yes (check0820, round-37): ControlGetText/ ControlSetText/ControlClick (read text, editable-text set, Action.DoAction("click")) over the org.a11y.atspi bus; GTK3 app verified end-to-end Via at-SPI bus (compositor-independent) Via at-SPI bus (compositor-independent)

Native input status and remaining environment gaps:

Contributors

The Linux port is written and maintained by MonoEven.

Related work and credits

This port is an independent implementation, but it stands on the work and support of the AutoHotkey, Linux and open-source communities:

Packaging formats — status (check0820)

Release artifacts and their evaluation:

Build and install

git clone --branch linux-port https://github.com/MonoEven/Autohotkey_Linux.git
cd Autohotkey_Linux
cmake -S . -B build-core
cmake --build build-core -j$(nproc)
build-core/source/linux/core/ahk_core your-script.ahk

Prebuilt packages (tar.gz / .deb) and an installer are published with each GitHub Release: releases.

After installation, ahk --check reports the install method and integrity plus the selected input backend, broker socket presence, and whether /dev/uinput is writable. These are diagnostics only: the broker still negotiates SUPPRESS/INJECT grants per client.

Version history

This port is based on AutoHotkey v2.0.26. The v1-to-v2 change documentation has been removed because v1 is not supported by this port.

Software License: GNU General Public License