This documentation explains how to configure hotkeys in your configuration file. Hotkeys can be defined using various modifiers and keys, allowing you to create custom keyboard shortcuts for different actions.
| Symbol | Alternative Names | Description |
|---|---|---|
^ |
ctrl, control |
Control key |
! |
alt, option |
Option (Alt) key |
* |
shift, shft |
Shift key |
# |
cmd, command, start |
Command key |
fn |
fun, function |
Function key |
| Category | Keys |
|---|---|
| Function Keys | f1 through f20 |
| Navigation | home, end, pageup, pagedown |
| Arrow Keys | left, right, up, down (or with arrow suffix) |
| Common Keys | space, tab, return/enter, escape/esc |
| Editing | delete/backspace, forwarddelete |
Numpad keys are prefixed with numpad, for example: numpad0 through numpad9, numpadplus, numpadminus, numpadmultiply, numpaddivide, numpadenter, numpadclear
Display a simple dialog:
f1: display dialog "Hello, World!" buttons {"OK"} default button "OK"
Shows a dialog box when F1 is pressed
Launch applications using different methods:
^f1: runApp("AppCode.app") # Using internal runApp method
f3: open XCode.app # Using shell command
Control + F1 launches AppCode, F3 launches XCode
Execute commands based on active window:
f5:
currentAppChrome():
openMenuItem("Google Chrome", "View", "Reload This Page")
When in Chrome, F5 triggers the reload menu item
Android Emulator specific command:
f2:
currentWindowAndroidEmulator: APPADB -e shell input keyevent KEYCODE_APP_SWITCH
F2 sends a special keycode when Android Emulator is active
Single-line AppleScript:
f4: osascript -e 'display dialog "Hello world"'
Executes a simple AppleScript command
Multi-line AppleScript with context:
f9:
currentApp("com.apple.dt.Xcode"):
appleScript: |
tell application id "com.jetbrains.fleet"
activate
end tell
When in Xcode, F9 activates Fleet using AppleScript
Using else operator:
f6:
CURRENT_APP_XCODE: osascript -e 'display dialog "Hello world"'
else: runApp("AppCode.app")
If Xcode is active, show dialog; otherwise launch AppCode
Switch between keyboard layouts:
!*: switchKeyboardLayout("com.apple.keylayout.US", "com.apple.keylayout.LatinAmerican")
Option + Shift switches between US and Latin American layouts
Display available layouts:
control-alt-command-l: displayAvailableKeyboardInputSources()
Control + Option + Command + L shows all available keyboard layouts
Execute shell scripts and system commands:
#f7: ~/utl/shell-script-filename.sh # Run shell script
f10: openConfig() # Open configuration
^#o: runApp("System Preferences") # Open System Preferences
Various system-level integrations
Hotkeys are defined in YAML format with the following structure:
hotkeys:
# Single line command
^f1: runApp("AppCode.app")
# Multi-line command
f5:
currentAppChrome():
openMenuItem("Google Chrome", "View", "Reload This Page")
macros:
# Define reusable macros
MACRO_NAME: replacement_value
f1: display dialog "Hello, World!" buttons {"OK"} default button "OK"
Shows a simple dialog box when F1 is pressed
# Using internal runApp method
^f1: runApp("AppCode.app")
# Using shell command
f3: open XCode.app
Two different methods to launch applications
f2:
currentWindowAndroidEmulator: APPADB -e shell input keyevent KEYCODE_APP_SWITCH
Sends special keycode when Android Emulator is active
f5:
currentAppChrome():
openMenuItem("Google Chrome", "View", "Reload This Page")
Triggers Chrome's reload command when Chrome is active
f4: osascript -e 'display dialog "Hello world"'
Executes a simple AppleScript command
f9:
currentApp("com.apple.dt.Xcode"):
appleScript: |
tell application id "com.jetbrains.fleet"
activate
end tell
Activates Fleet when Xcode is active
f6:
CURRENT_APP_XCODE: osascript -e 'display dialog "Hello world"'
else: runApp("AppCode.app")
Shows dialog in Xcode, otherwise launches AppCode
# Switch between US and Latin American layouts
!*: switchKeyboardLayout("com.apple.keylayout.US", "com.apple.keylayout.LatinAmerican")
# Display available layouts
control-alt-command-l: displayAvailableKeyboardInputSources()
Commands for managing keyboard layouts
# Run shell script
#f7: ~/utl/shell-script-filename.sh
# Open config
f10: openConfig()
# Reload config - useful after making changes
#f10: reloadConfig()
# Open System Preferences
^#o: runApp("System Preferences")
Various system-level commands and tools. Use reloadConfig() to apply changes without restarting the app.
| Category | Key Names |
|---|---|
| Numbers | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Letters | a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z |
| Special Characters |
section/ยง,
tilde/grave/`,
minus/-,
equal/=,
leftbracket/[,
rightbracket/],
semicolon/;,
quote/',
comma/,,
period/dot/.,
slash//,
backslash/\\
|
| Numpad |
numpad0 through numpad9,
numpaddecimal,
numpadmultiply,
numpadplus,
numpaddivide,
numpadminus,
numpadequals,
numpadclear,
numpadenter
|
| Control Keys |
space,
return/enter,
tab,
delete/backspace,
forwarddelete,
linefeed,
escape/esc
|
| Modifier Keys |
command/cmd/start,
shift,
capslock/caps,
option/alt,
control/ctrl,
rightshift,
rightoption/rightalt,
rightcontrol,
function/fn
|
| Function Keys |
f1 through f20,
f13/printscreen
|
| Media Keys |
volumeup,
volumedown,
mute
|
| Navigation |
help/insert,
home,
end,
pageup,
pagedown,
leftarrow/left,
rightarrow/right,
downarrow/down,
uparrow/up
|
| Symbol | Alternative Names | Description |
|---|---|---|
^ |
control, ctrl |
Control modifier |
! |
option, alt |
Option/Alt modifier |
* |
shift, shft |
Shift modifier |
# |
command, cmd, start |
Command modifier |
fn |
function, fun |
Function modifier |
caps |
capslock |
Caps Lock modifier |
numpad |
numericpad |
Numeric Pad modifier |
help |
- | Help modifier |