Action URI Reference
KeyPath uses a URI scheme (keypath://) to trigger actions. This is the technical reference for integrating KeyPath with external tools like Raycast, Alfred, Shortcuts.app, or your own scripts.
If you just want to set up app launching through KeyPath’s UI, see the Launching Apps guide instead.
Deep link format
Trigger any KeyPath action from Terminal or any tool that can open URLs:
open "keypath://launch/Safari"
open "keypath://window/snap/left"
open "keypath://notify?title=Deployed&body=Build complete"
Supported actions
keypath://launch/{app}
Launch an application by name or bundle identifier.
KeyPath resolves app names in this order:
- Bundle identifier lookup (e.g.,
com.apple.Safari) /Applications//System/Applications/~/Applications/
open "keypath://launch/Safari"
open "keypath://launch/com.apple.Safari"
open "keypath://launch/Visual Studio Code"
keypath://window/snap/{position}
Tile the current window to a screen position.
Positions: left, right, top, bottom, topleft, topright, bottomleft, bottomright, maximize, center
open "keypath://window/snap/left"
open "keypath://window/snap/maximize"
keypath://layer/{name}
Signal a layer change for UI feedback.
Subpaths: /activate, /deactivate, /toggle
open "keypath://layer/nav/activate"
open "keypath://layer/vim/toggle"
keypath://notify
Show a system notification.
Query parameters:
title(required) — notification titlebody(optional) — notification body textsound(optional, default:true) — play notification sound
open "keypath://notify?title=Build%20Complete&body=Ready%20to%20deploy"
open "keypath://notify?title=Saved&sound=false"
keypath://fakekey/{name}
Trigger a virtual key press.
Subpaths: /press, /release, /tap
open "keypath://fakekey/vk1/tap"
Integration examples
Raycast
Create a Raycast script command:
#!/bin/bash
# @raycast.title Launch Safari
# @raycast.mode silent
open "keypath://launch/Safari"
Alfred
Use an Alfred workflow “Open URL” action with keypath://launch/{query}.
Shortcuts.app
Add a “Run Shell Script” action:
open "keypath://launch/Safari"
Shell scripts
Chain multiple actions:
#!/bin/bash
open "keypath://window/snap/left"
sleep 0.5
open "keypath://launch/Terminal"
open "keypath://window/snap/right"
Security
Action URIs are only processed from local sources:
- KeyPath’s own remapping engine (via the internal message system)
- Local system processes (via the
opencommand)
No network access is required or used. Actions execute with your normal user permissions.
Error handling
If an action fails (e.g., app not found), KeyPath logs the error but doesn’t crash. Check File → View Logs for details. Invalid URIs are silently ignored.
Related guides
- Launching Apps — Set up app launching through KeyPath’s UI
- Windows & App Shortcuts — App-specific keymaps and window snapping
- From Kanata — Using Action URIs in your Kanata config
- Back to Docs — See all available guides
External resources
- Kanata configuration reference — For using Action URIs in raw Kanata configs
- Raycast — Pairs well with KeyPath’s deep link system
- Alfred — Another launcher that integrates with KeyPath deep links