AutoKey as a Linux alternative to AutoHotkey (Linux port)
Updated
Our verdict
AutoKey is a solid replacement for AutoHotkey (Linux port) for users focused on text expansion, hotkey-driven scripting, and basic desktop automation under Linux. It works well on both X11 and Wayland, supports Python scripting, and handles common tasks like remapping keys, triggering actions with hotkeys, and inserting text snippets. While it lacks some of AutoHotkey’s advanced GUI automation and window manipulation depth, it’s reliable for typical desktop automation needs. Best suited for users who prioritize simplicity and native Linux integration over complex scripting capabilities.
- License
- GPL-3.0
- Price
- Free
- Latest version
- 0.96.0
- Rating
- —
What works the same
- Both support global hotkeys to trigger scripts
- Enable text expansion and automated typing
- Allow creation of custom scripts for task automation
- Can remap keys and run commands on demand
- Support persistent scripting environments with startup execution
What is different
- AutoKey uses Python scripts, while AutoHotkey uses its own domain-specific language
- AutoKey has limited mouse button remapping compared to AutoHotkey
- Window control (resize, move, focus) is less flexible in AutoKey, especially on Wayland
- AutoHotkey offers deeper GUI automation, such as interacting with control elements in windows
- AutoKey lacks direct support for compiling scripts into standalone executables
Opening your AutoHotkey (Linux port) files
AutoKey cannot open or import AutoHotkey (.ahk) script files directly. There is no built-in converter or compatibility layer. Users must manually rewrite AutoHotkey scripts in Python using AutoKey’s API. While the logic (e.g., hotkeys, text insertion) can usually be translated, complex GUI automation or window messages require significant adaptation. Community tools or scripts for conversion are not widely documented or maintained.
Switching from AutoHotkey (Linux port) to AutoKey, step by step
- Install AutoKey via your package manager (e.g., apt install autokey-gtk)
- Organize your AutoHotkey scripts by function (text expansion, hotkeys, etc.)
- Rewrite key scripts in Python using AutoKey’s API and built-in dialogs
- Set up hotkeys and abbreviations to mirror your original AutoHotkey triggers
- Test scripts under both X11 and Wayland if applicable, adjusting window commands as needed
- Enable AutoKey autostart in your desktop environment’s session settings
Key features of AutoKey
- Python-based scripting engine
- Global hotkeys and key sequences
- Text expansion and clipboard management
- Script grouping and tagging
- Integration with X11 and Wayland
- Run scripts on startup or on demand
How to install AutoKey on Linux
sudo apt install autokeysudo apt install autokeysudo dnf install autokeyFrequently asked questions
Can AutoKey run on Wayland?
Yes, AutoKey supports Wayland, but some features like precise window manipulation and global mouse hooks may be limited due to Wayland’s security model.
Does AutoKey support mouse button remapping?
It can bind scripts to mouse buttons in X11 via external tools like xbindkeys, but native mouse button remapping is not built in and requires additional setup.
Is Python knowledge required to use AutoKey?
Basic use for text expansion doesn’t require coding, but automation beyond simple inserts needs Python scripting, so familiarity helps.