A free, open-source text expander for macOS.
Lightweight alternative to TextExpander.
Install • Usage • Migrate from TextExpander • Build
Hotkey is a native macOS menu bar app that expands text abbreviations as you type — anywhere on your system. Define shortcuts like ;email → you@example.com or ;sig → your full email signature, and Hotkey replaces them instantly.
No account required. No subscription. Just a single JSON file with your snippets.
- Download
Hotkey.dmgfrom the latest Release - Open the
.dmgand drag Hotkey into Applications - Launch Hotkey from Applications
On first launch, macOS will ask you to grant Accessibility permission:
- Open System Settings > Privacy & Security > Accessibility
- Click + and add Hotkey.app
- Restart the app
osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Hotkey.app", hidden:false}'Hotkey lives in your menu bar with a keyboard icon. It monitors your keystrokes and expands abbreviations from your snippets.json file.
Hotkey looks for snippets.json in this order:
~/.config/hotkey/snippets.json(recommended)- Next to the
.appbundle - Current working directory
The format is a flat JSON object — abbreviation keys mapped to expansion values:
{
";email": "you@example.com",
";addr": "123 Main St\nSpringfield, IL 62701",
";sig": "Best regards,\nJane Doe\nCEO, Acme Corp",
":shrug:": "\\_(ツ)_/",
";date": "2024-01-15"
}Edit the file with any text editor. Hotkey watches for changes and reloads automatically — no restart needed.
| Action | Shortcut |
|---|---|
| Pause / Resume | P |
| Reload Snippets | R |
| Edit Snippets (opens in default editor) | E |
| Quit | Q |
- Use a prefix like
;or:for your abbreviations to avoid accidental expansions - Longest match wins — if you have both
;addrand;addressb2, the longer one takes priority when both match - Multi-line text works — use
\nin your JSON values - Clipboard is preserved — Hotkey saves and restores your clipboard during expansions
If you have an existing TextExpander installation, the included extract_snippets.py script can pull your snippets directly from TextExpander's local database:
python3 extract_snippets.pyThis reads from TextExpander's WebKit IndexedDB storage and outputs a snippets.json file you can use directly with Hotkey.
Requires macOS 13+ and Xcode Command Line Tools (xcode-select --install).
git clone https://github.com/kevinyun/hotkey.git
cd hotkey
./build.sh
open Hotkey.appThe build script compiles a single Swift file into a native .app bundle — no Xcode project needed.
To create a distributable .dmg:
./create_dmg.shHotkey uses a low-level CGEvent tap to monitor keystrokes system-wide. When it detects a typed abbreviation, it:
- Deletes the abbreviation with simulated backspace keys
- Saves your current clipboard
- Pastes the expanded text via Cmd+V
- Restores your clipboard
The entire app is a single 300-line Swift file with no dependencies beyond Cocoa and Carbon.
MIT
