cmux-keyboard-shortcuts
manaflow-ai/cmux
Customize cmux keyboard shortcuts with templates and one-off rebinds.
What is cmux-keyboard-shortcuts?
Guide and apply cmux keyboard shortcut customization through templates (tmux-style, Vim, iTerm, etc.) or individual rebinds. Use when the user asks to customize, rebind, unbind, reset, audit, or create shortcut layouts for cmux.
- Propose and apply preset shortcut templates (Tmux Prefix, macOS Terminal/iTerm, Vim Pane Navigation, and others)
- Rebind or unbind individual actions with validation against recognized action IDs
- Audit current shortcut bindings and identify overrides or unbound shortcuts
- Reset file-managed overrides or guide users to built-in defaults via Settings
- Generate exact revert commands to undo template changes
- Validate JSON and recognized settings keys after every change
How to install cmux-keyboard-shortcuts
npx skills add null --skill cmux-keyboard-shortcuts- cmux checkout or worktree root (recommended)
- cmux-settings helper script available in skills or agent home
- macOS system (cmux is macOS-only)
How to use cmux-keyboard-shortcuts
- 1.Describe your shortcut preference (one-off rebind, template adoption, audit, or reset)
- 2.The skill will propose templates or inspect current bindings
- 3.Review the proposed changes and any potential key collisions
- 4.Confirm to apply the changes; the skill will use cmux-settings to write and validate
- 5.Receive exact revert commands if you need to undo the changes later
Use cases
- Switch from default cmux shortcuts to tmux-style prefix chords (ctrl+b) for terminal familiarity
- Adopt Vim-style pane navigation (cmd+opt+h/j/k/l) for fast movement without a prefix
- Restore macOS Terminal or iTerm-like behavior for surface and tab management
- Unbind or rebind a single action (e.g., change newSurface from cmd+n to a custom chord)
- Audit which shortcuts have been customized and generate rollback commands
- Terminal power users migrating from tmux or Vim
- macOS users wanting iTerm or Terminal.app-like shortcuts
- Developers building custom cmux workflows
- Anyone auditing or resetting keyboard shortcut overrides
cmux-keyboard-shortcuts FAQ
Most actions support chords. However, showHideAllWindows and globalSearch are system-wide shortcuts and cannot be chords; they require modifiers and may be rejected by macOS if reserved.
null explicitly unbinds an action in cmux.json. unset removes the file override entirely, allowing the built-in default to take effect. Use unset when reverting a template that modified file-managed overrides.
No. Saving cmux.json live reloads shortcuts in the app immediately.
Remove file-managed overrides with unset, then use Settings > Keyboard Shortcuts > Reset Default Shortcuts in the app. For showHideAllWindows, also use Settings > Global Hotkey to restore ctrl+opt+cmd+. and re-enable the system-wide hotkey toggle.
The skill will snapshot your current binding before applying the template and provide an exact revert command to restore it if needed.
Full instructions (SKILL.md)
Source of truth, from manaflow-ai/cmux.
name: cmux-keyboard-shortcuts description: "Guide and apply cmux keyboard shortcut customization. Use when the user asks to customize, rebind, unbind, reset, audit, or create shortcut templates for cmux, including tmux-style, Vim-style, terminal-first, browser-heavy, iTerm/Terminal-like, or agent-triage layouts."
cmux-keyboard-shortcuts
Use this skill to turn a user's workflow preferences into cmux shortcut bindings in ~/.config/cmux/cmux.json. It should guide the user, propose compact templates, apply selected changes, and confirm the config parses with recognized keys.
Prerequisites
- Work from a cmux checkout or worktree root when possible.
- Use
skills/cmux-settings/scripts/cmux-settingsfor every read/write. It reads JSONC, writes atomically, and validates JSON plus recognized settings keys. - For action IDs, read
skills/cmux-settings/references/shortcut-actions.md. - For current defaults, read
web/data/cmux-shortcuts.tsorSources/KeyboardShortcutSettings.swift.
find_cmux_settings() {
local root
root="$(git -C "$(pwd)" rev-parse --show-toplevel 2>/dev/null || pwd)"
for candidate in \
"$root/skills/cmux-settings/scripts/cmux-settings" \
"${CODEX_HOME:-$HOME/.codex}/skills/cmux-settings/scripts/cmux-settings" \
"$HOME/.agents/skills/cmux-settings/scripts/cmux-settings"; do
if [[ -x "$candidate" ]]; then
printf '%s\n' "$candidate"
return 0
fi
done
return 1
}
if [[ -z "${CMUX_SETTINGS:-}" ]]; then
CMUX_SETTINGS="$(find_cmux_settings)" || {
echo "cmux-settings helper not found; run from a cmux checkout or install cmux-settings" >&2
exit 1
}
fi
Shortcut Model
- Setting path:
shortcuts.bindings.<actionId>. - Single stroke:
"cmd+b". - Chord:
["ctrl+b","c"]. The first stroke needs a modifier unless the key is Space. The second stroke can be bare. - Unbind: prefer
nullfor explicit unbinds."","none","clear","unbound", and"disabled"are accepted aliases, butnullis the clearest JSON value and matches the templates below. selectSurfaceByNumberandselectWorkspaceByNumbermust use a digit from 1 to 9.cmd+1means the fullcmd+1throughcmd+9family.showHideAllWindowsandglobalSearchare system-wide shortcuts. They cannot be chords, require modifiers, and may be rejected by macOS if reserved.showHideAllWindowsalso requires Settings > Global Hotkey > Enable System-Wide Hotkey. The binding can validate incmux.jsonwhile the feature is disabled, so warn the user to enable that setting before reporting the shortcut as usable.unsetdeletes acmux.jsonoverride. It does not clear shortcut changes saved through the Settings UI/UserDefaults. If the user asks for true built-in defaults, tell them to use Settings > Keyboard Shortcuts > Reset Default Shortcuts after clearing file-managed overrides, then verify in the app. ForshowHideAllWindows, use Settings > Global Hotkey to restore the shortcut toctrl+opt+cmd+.because Keyboard Shortcuts > Reset Default Shortcuts intentionally skips the global hotkey.- Saving
cmux.jsonlive reloads. Do not tell the user to restart cmux.
Workflow
-
Classify the request:
- One-off rebind or unbind: map the phrase to an action ID, apply it, validate, and report the previous and new binding.
- Audit-only request: inspect current bindings, validate, and summarize overrides/unbound shortcuts without writing.
- Reset request: clarify whether the user means file-managed overrides or true built-in defaults. For file-managed resets, use
unsetfor named actions. For true built-in defaults, remove file overrides and direct the user to Settings > Keyboard Shortcuts > Reset Default Shortcuts; do not report built-in defaults restored fromcmux-settingsalone. IfshowHideAllWindowsis included, also direct them to Settings > Global Hotkey to restorectrl+opt+cmd+.and the enable toggle. - Broad customization request: propose 3 to 5 templates from "Preset Templates" and ask the user to choose.
- Named style such as tmux, Vim, iTerm, browser, or agent triage: select the closest template, show the changed actions and likely collisions, and ask before a bulk apply unless the user explicitly said to apply it.
-
Inspect existing config:
"$CMUX_SETTINGS" path "$CMUX_SETTINGS" get shortcuts.bindings 2>/dev/null || printf '{}\n' "$CMUX_SETTINGS" validate -
Before applying a template, snapshot prior values for every action you will change. A path that is absent must revert with
unset; a path with an existing custom value must revert withset <same-json-value>."$CMUX_SETTINGS" get shortcuts.bindings.focusLeft 2>/dev/null || printf '<absent>\n' -
Apply only the chosen action paths:
"$CMUX_SETTINGS" set shortcuts.bindings.newSurface '["ctrl+b","c"]' "$CMUX_SETTINGS" set shortcuts.bindings.focusLeft cmd+opt+h "$CMUX_SETTINGS" set shortcuts.bindings.sendFeedback null "$CMUX_SETTINGS" validate -
Verify readback for changed actions:
"$CMUX_SETTINGS" get shortcuts.bindings.newSurface -
Finish with the template name, changed actions, and exact revert commands from the snapshot. Use
unsetonly for actions that were absent before the template; usesetto restore previous custom bindings.
Preset Templates
Use these as proposal templates. Apply them action by action, not by overwriting the whole shortcuts.bindings object.
Tmux Prefix
For users who want one terminal-style shortcut namespace and accept that ctrl+b starts a cmux chord instead of going directly to the shell.
"$CMUX_SETTINGS" set shortcuts.bindings.newSurface '["ctrl+b","c"]'
"$CMUX_SETTINGS" set shortcuts.bindings.closeTab '["ctrl+b","x"]'
"$CMUX_SETTINGS" set shortcuts.bindings.nextSurface '["ctrl+b","n"]'
"$CMUX_SETTINGS" set shortcuts.bindings.prevSurface '["ctrl+b","p"]'
"$CMUX_SETTINGS" set shortcuts.bindings.selectSurfaceByNumber '["ctrl+b","1"]'
"$CMUX_SETTINGS" set shortcuts.bindings.splitRight '["ctrl+b","v"]'
"$CMUX_SETTINGS" set shortcuts.bindings.splitDown '["ctrl+b","s"]'
"$CMUX_SETTINGS" set shortcuts.bindings.focusLeft '["ctrl+b","h"]'
"$CMUX_SETTINGS" set shortcuts.bindings.focusDown '["ctrl+b","j"]'
"$CMUX_SETTINGS" set shortcuts.bindings.focusUp '["ctrl+b","k"]'
"$CMUX_SETTINGS" set shortcuts.bindings.focusRight '["ctrl+b","l"]'
"$CMUX_SETTINGS" set shortcuts.bindings.toggleSplitZoom '["ctrl+b","z"]'
"$CMUX_SETTINGS" set shortcuts.bindings.toggleTerminalCopyMode '["ctrl+b","["]'
"$CMUX_SETTINGS" set shortcuts.bindings.equalizeSplits '["ctrl+b","="]'
macOS Terminal/iTerm Restore
For users who want surface, split, and tab behavior to feel like common macOS terminals again. These actions already match cmux built-in defaults when no Settings UI override exists, so unset file overrides instead of writing default values.
"$CMUX_SETTINGS" unset shortcuts.bindings.newSurface
"$CMUX_SETTINGS" unset shortcuts.bindings.closeTab
"$CMUX_SETTINGS" unset shortcuts.bindings.nextSurface
"$CMUX_SETTINGS" unset shortcuts.bindings.prevSurface
"$CMUX_SETTINGS" unset shortcuts.bindings.selectSurfaceByNumber
"$CMUX_SETTINGS" unset shortcuts.bindings.splitRight
"$CMUX_SETTINGS" unset shortcuts.bindings.splitDown
"$CMUX_SETTINGS" unset shortcuts.bindings.toggleSplitZoom
"$CMUX_SETTINGS" unset shortcuts.bindings.toggleTerminalCopyMode
"$CMUX_SETTINGS" unset shortcuts.bindings.renameTab
Vim Pane Navigation
For users who want fast pane movement without a prefix and do not want to depend on arrow keys.
"$CMUX_SETTINGS" set shortcuts.bindings.focusLeft cmd+opt+h
"$CMUX_SETTINGS" set shortcuts.bindings.focusDown cmd+opt+j
"$CMUX_SETTINGS" set shortcuts.bindings.focusUp cmd+opt+k
"$CMUX_SETTINGS" set shortcuts.bindings.focusRight cmd+opt+l
"$CMUX_SETTINGS" set shortcuts.bindings.splitRight cmd+opt+v
"$CMUX_SETTINGS" set shortcuts.bindings.splitDown cmd+opt+s
"$CMUX_SETTINGS" set shortcuts.bindings.toggleSplitZoom cmd+opt+z
"$CMUX_SETTINGS" set shortcuts.bindings.equalizeSplits cmd+opt+=
Agent Triage
For users who live in notifications and want unread handling on one key family. This keeps toggle unread on cmd+opt+u so it can be combined with Vim Pane Navigation without colliding with cmd+opt+j.
"$CMUX_SETTINGS" set shortcuts.bindings.showNotifications cmd+u
"$CMUX_SETTINGS" set shortcuts.bindings.jumpToUnread cmd+j
"$CMUX_SETTINGS" set shortcuts.bindings.markOldestUnreadAndJumpNext cmd+shift+j
"$CMUX_SETTINGS" set shortcuts.bindings.toggleUnread cmd+opt+u
"$CMUX_SETTINGS" set shortcuts.bindings.triggerFlash cmd+shift+h
"$CMUX_SETTINGS" set shortcuts.bindings.focusRightSidebar cmd+shift+e
Workspace And Surface Lanes
For users who want workspaces and surfaces on distinct number and bracket lanes.
"$CMUX_SETTINGS" set shortcuts.bindings.selectWorkspaceByNumber cmd+1
"$CMUX_SETTINGS" set shortcuts.bindings.selectSurfaceByNumber cmd+opt+1
"$CMUX_SETTINGS" set shortcuts.bindings.nextSidebarTab 'cmd+opt+]'
"$CMUX_SETTINGS" set shortcuts.bindings.prevSidebarTab 'cmd+opt+['
"$CMUX_SETTINGS" set shortcuts.bindings.nextSurface 'cmd+shift+]'
"$CMUX_SETTINGS" set shortcuts.bindings.prevSurface 'cmd+shift+['
Browser Defaults Restore
For users who changed too much and want embedded-browser behavior to match common macOS browser shortcuts again. Use unset to clear file overrides so future cmux defaults still apply when no Settings UI override exists.
"$CMUX_SETTINGS" unset shortcuts.bindings.openBrowser
"$CMUX_SETTINGS" unset shortcuts.bindings.focusBrowserAddressBar
"$CMUX_SETTINGS" unset shortcuts.bindings.browserBack
"$CMUX_SETTINGS" unset shortcuts.bindings.browserForward
"$CMUX_SETTINGS" unset shortcuts.bindings.browserReload
"$CMUX_SETTINGS" unset shortcuts.bindings.browserZoomIn
"$CMUX_SETTINGS" unset shortcuts.bindings.browserZoomOut
"$CMUX_SETTINGS" unset shortcuts.bindings.browserZoomReset
"$CMUX_SETTINGS" unset shortcuts.bindings.toggleBrowserDeveloperTools
"$CMUX_SETTINGS" unset shortcuts.bindings.showBrowserJavaScriptConsole
"$CMUX_SETTINGS" unset shortcuts.bindings.find
"$CMUX_SETTINGS" unset shortcuts.bindings.findNext
"$CMUX_SETTINGS" unset shortcuts.bindings.findPrevious
Terminal-First Cleanup
For users who want fewer app-level shortcuts. Prefer unbinding only the actions they name, but this is a reasonable starting proposal.
"$CMUX_SETTINGS" set shortcuts.bindings.renameTab null
"$CMUX_SETTINGS" set shortcuts.bindings.renameWorkspace null
"$CMUX_SETTINGS" set shortcuts.bindings.editWorkspaceDescription null
"$CMUX_SETTINGS" set shortcuts.bindings.triggerFlash null
"$CMUX_SETTINGS" set shortcuts.bindings.sendFeedback null
Rules
-
Do not edit
~/.config/cmux/settings.jsonunless the user explicitly asks. It is legacy fallback config. -
Do not overwrite all of
shortcuts.bindingsunless the user explicitly wants a full replacement. -
Do not invent action IDs. Validate against the schema or
shortcut-actions.md. -
Do not apply a broad template without showing the changed actions first unless the user explicitly said to apply that named template.
-
Do not promise conflict detection from
cmux-settings validate; it validates JSON and supported keys, not shortcut syntax, macOS reservation, or every focus-context conflict. -
Before assigning
cmd+[orcmd+]to application-scoped actions, warn that they collide with common browser Back/Forward behavior unless the browser actions are also changed or unbound. -
Prefer
unsetto clear file-managed overrides for individual actions. Do not call this a built-in default reset unless Settings UI/UserDefaults values have also been reset:"$CMUX_SETTINGS" unset shortcuts.bindings.focusLeft "$CMUX_SETTINGS" validate
Related skills
More from manaflow-ai/cmux and the wider catalog.
cmux-localization
Localization rules and audit workflow for cmux UI strings, settings rows, menus, shortcuts, schema/config text, docs, command/help text, alerts, tooltips, and web messages. Use whenever changing user-facing text.
cmux-markdown
Display markdown files in a formatted panel with live reload alongside your terminal.
cmux-release
cmux release workflow, version bumping, changelog updates, pretag guard, release tags, and release asset expectations. Use when preparing or troubleshooting a cmux release.
cmux-settings
View and edit cmux settings in ~/.config/cmux/cmux.json with validation and live reload.
cmux-shared-behavior
Shared behavior and mutation-path rules for cmux. Use when a behavior is exposed through multiple entrypoints such as keyboard shortcuts, command palette, context menu, CLI, settings, debug menu, optimistic UI, or tests that previously missed a bug.
cmux-socket-policy
Socket command threading and focus policy for cmux CLI/socket work. Use when adding or changing socket commands, CLI commands, telemetry commands, focus/select/open/close/send-key behavior, or automation that could steal app focus.