What Are the Key AutoKey Terms and How Is AutoKey Organized?

Updated

AutoKey organizes automation into a small set of building blocks—phrases, scripts, folders, and abbreviations—that you arrange in a tree inside the main window. You create an item, attach a trigger (a hotkey or an abbreviation), and AutoKey runs it in whatever application has focus. The official 0.96.0 documentation covers these concepts in its Introduction and "Glossary of AutoKey Terms" pages, and the API reference shows what scripts can call.

The core terms

Term What it is How it is triggered
Phrase Stored text that AutoKey types out for you Hotkey or abbreviation
Script A Python script that runs when triggered Hotkey (or called from another script)
Folder A container for grouping phrases and scripts Not triggered itself
Abbreviation A short string that expands into a phrase or script Typed text, optionally followed by a trigger character
Hotkey A key combination assigned to a phrase or script Keyboard shortcut
Trigger The general term for whatever starts an item (hotkey or abbreviation) —

The distinction that matters most for new users: a phrase is content, a script is code, and a hotkey or abbreviation is the trigger. A phrase or script can have a hotkey, an abbreviation, or both; the item type and the trigger type are separate choices.

How items are organized

AutoKey presents everything as a tree in its main window:

  • Top-level folders hold your items. The documentation's "How are things organized?" section describes this structure, and the "How to 'source' settings on a new computer?" page explains that your configuration lives in a folder you can copy to another machine.
  • Phrases and scripts sit inside folders. Folders exist purely for grouping, so you can keep, for example, one folder for email snippets and another for window-management scripts.
  • Abbreviations are attached to phrases or scripts rather than living as separate top-level objects.

This means the same phrase can be reached two ways—say, a hotkey for quick insertion and an abbreviation for typing—without duplicating the content.

What scripts can do

Scripts are where AutoKey goes beyond text expansion. The API reference lists the modules available to script authors:

  • Keyboard — send_keys(), send_key(), press_key(), release_key(), fake_keypress(), and the wait functions wait_for_keypress() and wait_for_keyevent(). The SendMode values (KEYBOARD, CB_CTRL_V, CB_CTRL_SHIFT_V, CB_SHIFT_INSERT, SELECTION) control how text is delivered—useful when an application ignores simulated keystrokes but accepts paste.
  • Mouse — clicking, moving, scrolling, selecting an area, and waiting for a click, with absolute, relative, and "relative to self" variants.
  • Store — persistent values via set_value()/get_value() and global values via set_global_value()/get_global_value(), so a script can remember state between runs.
  • QtDialog — dialogs such as calendar() and choose_... for asking the user for input mid-script.
  • Keys and Buttons — named constants (Key.ENTER, Key.F1 through Key.F35, Mouse.Button.LEFT, and so on) so you don't hard-code key names.

For example, a script triggered by a hotkey could read a stored value, open a dialog to let you pick a date, then type a formatted line into the focused window—combining Store, QtDialog, and Keyboard in one action.

Where to start reading

If you are new, read the Introduction, then the Glossary of AutoKey Terms, then "Common actions" (which includes adding abbreviations). Move to the API pages only when a phrase is not enough and you need a script. The documentation is versioned as 0.96.0, so check that page's version label if you are running a different release.