cmux-workspace
cmux workspace
cmux-keyboard-shortcuts
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.
Full skill instructions
Turn a user's workflow preferences into cmux shortcut bindings in ~/.config/cmux/cmux.json: guide, propose compact templates, apply the selected changes, and confirm the config parses with recognized keys.
Every new cmux-owned keyboard shortcut must be added to Sources/KeyboardShortcutSettings.swift, visible and editable in Settings > Keyboard Shortcuts, supported as shortcuts.bindings.<actionId> in ~/.config/cmux/cmux.json, and documented in web/app/[locale]/(landing)/docs/keyboard-shortcuts/page.tsx and the configuration docs. All four, not a subset.
skills/cmux-settings/scripts/cmux-settings for every read/write. It reads JSONC, writes atomically, and validates JSON plus recognized settings keys.skills/cmux-settings/references/shortcut-actions.md. Current defaults: web/data/cmux-shortcuts.ts or Sources/KeyboardShortcutSettings.swift.if [[ -z "${CMUX_SETTINGS:-}" ]]; then
root="$(git 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
[[ -x "$candidate" ]] && CMUX_SETTINGS="$candidate" && break
done
[[ -n "${CMUX_SETTINGS:-}" ]] || {
echo "cmux-settings helper not found; run from a cmux checkout or install cmux-settings" >&2
exit 1
}
fi
shortcuts.bindings.<actionId>."cmd+b".["ctrl+b","c"]. The first stroke needs a modifier unless the key is Space. The second stroke can be bare.null for explicit unbinds. "", "none", "clear", "unbound", and "disabled" are accepted aliases, but null is the clearest JSON value and matches the templates below.selectSurfaceByNumber and selectWorkspaceByNumber must use a digit from 1 to 9. cmd+1 means the full cmd+1 through cmd+9 family.showHideAllWindows is the only system-wide shortcut. It cannot be a chord, requires modifiers, and may be rejected by macOS if reserved.globalSearch is application-scoped and only fires while cmux is active.showHideAllWindows also requires Settings > Global Hotkey > Enable System-Wide Hotkey. The binding can validate in cmux.json while the feature is disabled, so warn the user to enable that setting before reporting the shortcut as usable.unset deletes a cmux.json override. 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. For showHideAllWindows, use Settings > Global Hotkey to restore the shortcut to ctrl+opt+cmd+. because Keyboard Shortcuts > Reset Default Shortcuts intentionally skips the global hotkey.cmux.json live reloads. Never tell the user to restart cmux.Classify the request:
unset rule above).Inspect existing config:
"$CMUX_SETTINGS" path
"$CMUX_SETTINGS" get shortcuts.bindings 2>/dev/null || printf '{}\n'
"$CMUX_SETTINGS" validate
Snapshot prior values for every action you will change. A path that was absent reverts with unset; a path with an existing custom value reverts with set <same-json-value>.
"$CMUX_SETTINGS" get shortcuts.bindings.focusLeft 2>/dev/null || printf '<absent>\n'
Apply only the chosen action paths, then "$CMUX_SETTINGS" validate.
"$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
Read back each changed action: "$CMUX_SETTINGS" get shortcuts.bindings.newSurface.
Finish with the template name, changed actions, and exact revert commands from the snapshot.
Settings > Keyboard Shortcuts > Base Keymap (also "Base Keymap: ..." in the Command Palette) ships cmux, iTerm2, Terminal.app, and tmux-style presets. It previews the change, then writes only the overrides that differ from cmux defaults, keeps bindings the user set by hand (in cmux.json or legacy Settings UserDefaults), and lists macOS shortcut conflicts. Detection is stateless: a binding typed by hand that equals a preset's value for that action is treated as the preset's, so switching presets (including back to cmux) replaces or removes it. Point users there for those styles; use the templates below for the others.
Apply action by action, never by overwriting the whole shortcuts.bindings object.
One terminal-style namespace; ctrl+b starts a cmux chord instead of reaching 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","="]'
These actions already match cmux built-in defaults, so clear file overrides rather than writing default values.
for a in newSurface closeTab nextSurface prevSurface selectSurfaceByNumber \
splitRight splitDown toggleSplitZoom toggleTerminalCopyMode renameTab; do
"$CMUX_SETTINGS" unset "shortcuts.bindings.$a"
done
Prefix-free pane movement with no 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+=
Unread handling on one key family. toggleUnread stays on cmd+opt+u so this composes 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
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+['
For people who drive the terminal like a browser text field. Ctrl+W closes the surface at the shell prompt and still reaches vim, less, or tmux, because terminalAlternateScreen is true only while a full-screen app has the terminal. terminalFocus keeps Ctrl+W from closing a browser or sidebar surface, where terminalAlternateScreen reads false. Word and line motion come from two terminal settings rather than bindings.
"$CMUX_SETTINGS" set shortcuts.bindings.closeTab ctrl+w
"$CMUX_SETTINGS" set shortcuts.when.closeTab '"terminalFocus && !terminalAlternateScreen"'
"$CMUX_SETTINGS" set terminal.textEditingGestures true
"$CMUX_SETTINGS" set terminal.textEditingCommandMovesByWord true
With both terminal settings on, Command and Option arrows move by word, Command and Option Delete delete by word, and Control+Left/Right move to line start and end. Warn that macOS reserves Control+Left/Right for switching Spaces until they are turned off in System Settings > Keyboard > Keyboard Shortcuts > Mission Control, that Ctrl+W no longer deletes a word at the prompt (Option+Delete still does), and that Cmd+Tab belongs to the macOS app switcher and cannot be rebound in cmux. Also warn that textEditingCommandMovesByWord gives up the line kill: Cmd+Delete becomes the word kill (Ctrl+W) and nothing is left bound to Ctrl+U, so set terminal.textEditingCommandMovesByWord false is the layout to use if deleting to the start of the line matters more than deleting by word. If the user works inside tmux, add "$CMUX_SETTINGS" set terminal.textEditingGesturesInFullScreenApps true, because tmux keeps the terminal on the alternate screen and gestures otherwise pass through; !terminalAlternateScreen likewise reads tmux as a full-screen app, so Ctrl+W reaches tmux instead of closing the surface.
Return embedded-browser behavior to common macOS browser shortcuts. unset keeps future cmux defaults applying.
for a in openBrowser focusBrowserAddressBar browserBack browserForward browserReload \
browserZoomIn browserZoomOut browserZoomReset toggleBrowserDeveloperTools \
showBrowserJavaScriptConsole find findNext findPrevious; do
"$CMUX_SETTINGS" unset "shortcuts.bindings.$a"
done
Fewer app-level shortcuts. Prefer unbinding only the actions the user names; this is a starting proposal.
for a in renameTab renameWorkspace editWorkspaceDescription triggerFlash sendFeedback; do
"$CMUX_SETTINGS" set "shortcuts.bindings.$a" null
done
~/.config/cmux/settings.json unless the user explicitly asks; it is legacy fallback config.shortcuts.bindings unless the user wants a full replacement.shortcut-actions.md.cmux-settings validate. It validates JSON and supported keys, not shortcut syntax, macOS reservation, or focus-context conflicts.cmd+[ or cmd+] to application-scoped actions, warn that they collide with browser Back/Forward unless the browser actions are also changed or unbound.unset clears file-managed overrides for one action. Do not call that a built-in default reset unless Settings UI/UserDefaults values were also reset.cmux workspace
cmux customization
cmux diagnostics
cmux testing rules for Swift Testing, test target compilation, test wiring, and package/refactor validation. Use when adding or changing tests, touching package/refactor code, or deciding whether reload.sh is enough validation.
Contributor workflow rules for cmux setup, Xcode project normalization, tagged sidebar ExtensionKit development, and dev builds. Use when setting up the cmux repo, changing Xcode project files, adding sidebar extensions, or working with tagged debug builds.
cmux package architecture, refactor layering, dependency inversion, file organization, DocC documentation, package design discipline, testability, and Swift 6 concurrency rules. Use before adding or meaningfully rewriting Swift files, Swift packages, coordinators, services, repositories, or public package APIs.
Debug logging, Debug menu, runtime pitfalls, typing-latency-sensitive paths, SwiftUI list snapshot boundaries, OS-version repros, and local visual iteration for cmux. Use when adding debug probes, diagnosing UI/runtime issues, touching terminal rendering, tab/sidebar list views, drag/drop UTTypes, or using the Debug menu.
Build a custom cmux sidebar from a plain-language request. Use when the user asks for a custom sidebar, a sidebar that shows their workspaces/tabs/PRs/clock, a vibe-coded sidebar, or anything involving files in ~/.config/cmux/sidebars/. Covers authoring the interpreted SwiftUI-style file, enabling the beta flag, selecting it, and iterating with hot reload.
Backend TypeScript and Cloud VM development rules for cmux. Use when editing web/app/api, web/services, backend scripts, Cloud VM lifecycle, provider integrations, Postgres, Stack Auth pricing gates, migrations, or provider image build scripts.
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.
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.
Ghostty submodule and GhosttyKit workflow rules for cmux. Use when modifying the ghostty submodule, rebuilding GhosttyKit.xcframework, updating the parent submodule pointer, or documenting fork conflict notes.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience