Platform Support

The parser, compiler and general runtime operate on Windows, Linux and macOS. Features which integrate with windows, input devices, the screen, desktop services or native APIs can require platform-specific backends or permissions.

Note: This page describes shared platform requirements. Each function page describes the observable contract and limitations specific to that function.

Windows

Windows currently has the broadest AutoHotkey v2 compatibility. Windows integrations use native Windows APIs and WinForms.

The main general differences are:

COM and Registry functions are available only on Windows.

Linux

Linux support varies by display server, compositor and whether the privileged helpers were installed. The Linux installer can install keysharp-inputd, keysharp-helper and desktop extensions.

Backend Without root-installed helpers Helpers add or enable Remarks
X11 Window management and screen capture; partial X11 input hooks, synthesis and hotkeys/hotstrings. Full input hooks and synthesis, BlockInput, and reliable hotkeys/hotstrings through keysharp-inputd. Root installation primarily upgrades input control.
Wayland — GNOME Window management and mouse synthesis through the GNOME Shell extension. Keyboard synthesis, hooks, BlockInput and hotkeys/hotstrings through keysharp-inputd; authorized screen capture through keysharp-helper. The shell extension requires a logout after installation. The helper is required for capture authorization.
Wayland — Cinnamon Window management, mouse synthesis and push window events through the Cinnamon extension, with an Eval fallback if the extension is absent. Keyboard synthesis, hooks, BlockInput and hotkeys/hotstrings through keysharp-inputd. The installer asks a running Cinnamon session to load or reload the extension. A manual installation can require a Cinnamon restart or logout.
Wayland — KWin/KDE Plasma Window management through KWin scripting and mouse synthesis through FakeInput. Screen capture through keysharp-helper; keyboard synthesis, hooks, BlockInput and hotkeys/hotstrings through keysharp-inputd. The capture helper must be root-owned and setuid, with its desktop file installed.
Other Wayland compositors
Sway, Hyprland, COSMIC, Wayfire, labwc and others
Protocol-dependent window listing, active-window detection, activation and screen capture. Input synthesis, hooks, BlockInput and hotkeys/hotstrings through keysharp-inputd. Window and capture behavior depends on foreign-toplevel and screencopy protocol support.

Controls and accessibility automation

Control functions operate on controls belonging to windows created by the current script. Linux desktops do not expose foreign application controls through the same model as Windows.

For cross-process inspection and automation, use AtSpi.ks. Running it directly opens AtSpiViewer; the library also provides APIs similar to Windows accessibility and UI Automation libraries.

Registry functions are unavailable on Linux. GUI support is broadly implemented, although individual control pages identify missing or differing behavior.

macOS

macOS support requires macOS 15 or later. Native input, screen and foreign-window features can prompt for privacy permissions.

FeatureAvailabilityRequirement or limitation
Script executionAvailableThe parser, compiler and runtime are functional.
Hotkeys and hotstringsAvailableRequires Input Monitoring. #/Win maps to Command and !/Alt maps to Option.
Keyboard and mouse sendingAvailableRequires Accessibility.
Global keyboard and mouse hooksAvailableRequires Input Monitoring.
Cursor confinementPartialClipCursor suppresses out-of-bounds movement and requires Input Monitoring and Accessibility.
GUI windowsAvailableUses Eto.Forms; some controls differ from Windows.
Screen capture and pixel functionsAvailableRequires Screen Recording.
Window managementPartialUses Accessibility APIs; controlling foreign applications requires permission.
Registry APIsUnavailableWindows-only.
COM APIsUnavailableWindows-only.

Permissions

PermissionRequired forCapability name
Input MonitoringHotkeys, hotstrings and reading keyboard or mouse input.InputMonitoring
AccessibilitySending input and controlling or querying other application windows.InputInjection or AccessibilityAutomation, according to the operation.
Screen RecordingPixelGetColor, ImageSearch and Image capture.ScreenCapture

Permissions are requested automatically when first needed. A script can request them before hotkeys are registered with #Requires capability, or query/request them at runtime with RequestCapabilities.

#Requires capability InputMonitoring, ScreenCapture

Grant requested permissions in System Settings → Privacy & Security. The runtime waits up to 60 seconds for a grant, but the script usually needs to be restarted after a permission is first enabled.

Installing Keysharp, Using Keysharp, Changes from AutoHotkey to Keysharp