Ghostty Cheatsheet

Keybinds

Use this Ghostty reference while you build software engineering projects, review code, or refresh the syntax you reach for most.

Grammar

keybind = trigger=action
keybind = ctrl+shift+t=new_tab
keybind = cmd+opt+r=reload_config
keybind = ctrl+a>n=new_window        # a two-key sequence

A trigger is zero or more modifiers plus exactly one key. Valid modifiers:

ModifierAliases
shift—
ctrlcontrol
altopt, option
supercmd, command

The fn or globe key cannot be a modifier, an OS and toolkit limitation. Keys not in the named key list can be given as a literal Unicode codepoint, which is how you bind layout-specific keys such as keybind = ö=text:foo on a German keyboard.

Trigger prefixes

Prefixes go in front of the whole trigger and can be combined, for example global:unconsumed:ctrl+a=reload_config.

PrefixEffect
all:Apply to every terminal surface, not just the focused one
global:Fire even when Ghostty is not focused. macOS only, needs Accessibility permission, implies all:
unconsumed:Also send the key encoding through to the running program
performable:Only consume the key if the action can actually run, for example copy_to_clipboard with no selection

Triggers are not unique per prefix. ctrl+a and global:ctrl+a are the same keybind, and the one defined later wins. global: and all: binds always consume input regardless of unconsumed:, and they cannot use sequences. performable: binds do not show as menu shortcuts, because menu items force the action.

Sequences

Separate triggers with > to build a leader-key sequence.

keybind = ctrl+a>n=new_window
keybind = ctrl+a>t=new_tab
keybind = ctrl+a>ctrl+a=text:\x01     # send the prefix itself

- Ghostty waits indefinitely for the next key. There is no timeout setting. - Binding a prefix directly unbinds every sequence under it. Bind ctrl+a>n and ctrl+a>t, then bind ctrl+a alone, and both sequences are gone. - Conversely, if ctrl+a was bound and you define ctrl+a>n, plain ctrl+a stops doing anything. - On the CLI, quote it, because > is a shell redirect: ghostty --keybind='ctrl+a>n=new_window'.

Special actions

ActionMeaning
ignoreSwallow the key. No action, no encoding sent to the program
unbindRemove the binding so the key passes through to the child process
text:...Send a string using Zig string literal syntax, so text:\x15 sends ctrl+u
csi:...Send a CSI sequence without the ESC [ header, so csi:A is cursor up
esc:...Send an escape sequence, so esc:d deletes the next word
resetFull terminal reset, the equivalent of running reset

ghostty +list-actions prints every available action, and ghostty +list-keybinds --default prints the shipped bindings for your platform.

macOS defaults

TriggerAction
cmd+, / cmd+shift+,open_config / reload_config
cmd+c / cmd+vcopy_to_clipboard / paste_from_clipboard
cmd+shift+vpaste_from_selection
cmd+n / cmd+tnew_window / new_tab
cmd+wclose_surface
cmd+opt+w / cmd+shift+wclose_tab / close_window
cmd+shift+opt+wclose_all_windows
cmd+1–cmd+8 / cmd+9goto_tab:1–8 / last_tab
cmd+shift+[ / cmd+shift+]previous_tab / next_tab
cmd+d / cmd+shift+dnew_split:right / new_split:down
cmd+[ / cmd+]goto_split:previous / goto_split:next
cmd+opt+arrowgoto_split in that direction
cmd+ctrl+arrowresize_split by 10px
cmd+ctrl+=equalize_splits
cmd+enter / cmd+shift+entertoggle_fullscreen / toggle_split_zoom
cmd+shift+ptoggle_command_palette
cmd+kclear_screen
cmd+f / cmd+shift+fstart_search / end_search
cmd+g / cmd+shift+gnavigate_search:next / :previous
cmd+esearch_selection
cmd+aselect_all
cmd+z / cmd+shift+zundo / redo
cmd+up / cmd+downjump_to_prompt back / forward
cmd+jscroll_to_selection
cmd+= cmd+- cmd+0font size up, down, reset
cmd+opt+iinspector:toggle
cmd+qquit

macOS also maps cmd+left, cmd+right, and cmd+backspace to text: sequences for start of line, end of line, and delete line, plus alt+left / alt+right to esc:b / esc:f for word motion.

Linux defaults

TriggerAction
ctrl+, / ctrl+shift+,open_config / reload_config
ctrl+shift+c / ctrl+shift+vcopy / paste
ctrl+insert / shift+insertcopy / paste
ctrl+shift+n / ctrl+shift+tnew_window / new_tab
ctrl+shift+wclose_tab
alt+f4close_window
alt+1–alt+8 / alt+9goto_tab:1–8 / last_tab
ctrl+tab / ctrl+shift+tabnext_tab / previous_tab
ctrl+page_down / ctrl+page_upnext_tab / previous_tab
ctrl+shift+o / ctrl+shift+enew_split:right / new_split:down
ctrl+super+[ / ctrl+super+]goto_split:previous / goto_split:next
ctrl+alt+arrowgoto_split in that direction
super+ctrl+shift+arrowresize_split by 10px
ctrl+enter / ctrl+shift+entertoggle_fullscreen / toggle_split_zoom
ctrl+shift+ptoggle_command_palette
shift+page_up / shift+page_downscroll_page_up / scroll_page_down
shift+home / shift+endscroll_to_top / scroll_to_bottom
ctrl+shift+page_up / page_downjump_to_prompt back / forward
ctrl+shift+f / escapestart_search / end_search
ctrl+shift+aselect_all
ctrl+shift+iinspector:toggle
ctrl+shift+qquit
ctrl+= ctrl+- ctrl+0font size up, down, reset

Cross-platform defaults on both: shift+arrow and shift+page_up / page_down / home / end extend the selection, and the dedicated media copy and paste keys work if your keyboard has them.