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:
| Modifier | Aliases |
|---|---|
shift | — |
ctrl | control |
alt | opt, option |
super | cmd, 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.
| Prefix | Effect |
|---|---|
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
| Action | Meaning |
|---|---|
ignore | Swallow the key. No action, no encoding sent to the program |
unbind | Remove 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 |
reset | Full 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
| Trigger | Action |
|---|---|
cmd+, / cmd+shift+, | open_config / reload_config |
cmd+c / cmd+v | copy_to_clipboard / paste_from_clipboard |
cmd+shift+v | paste_from_selection |
cmd+n / cmd+t | new_window / new_tab |
cmd+w | close_surface |
cmd+opt+w / cmd+shift+w | close_tab / close_window |
cmd+shift+opt+w | close_all_windows |
cmd+1–cmd+8 / cmd+9 | goto_tab:1–8 / last_tab |
cmd+shift+[ / cmd+shift+] | previous_tab / next_tab |
cmd+d / cmd+shift+d | new_split:right / new_split:down |
cmd+[ / cmd+] | goto_split:previous / goto_split:next |
cmd+opt+arrow | goto_split in that direction |
cmd+ctrl+arrow | resize_split by 10px |
cmd+ctrl+= | equalize_splits |
cmd+enter / cmd+shift+enter | toggle_fullscreen / toggle_split_zoom |
cmd+shift+p | toggle_command_palette |
cmd+k | clear_screen |
cmd+f / cmd+shift+f | start_search / end_search |
cmd+g / cmd+shift+g | navigate_search:next / :previous |
cmd+e | search_selection |
cmd+a | select_all |
cmd+z / cmd+shift+z | undo / redo |
cmd+up / cmd+down | jump_to_prompt back / forward |
cmd+j | scroll_to_selection |
cmd+= cmd+- cmd+0 | font size up, down, reset |
cmd+opt+i | inspector:toggle |
cmd+q | quit |
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
| Trigger | Action |
|---|---|
ctrl+, / ctrl+shift+, | open_config / reload_config |
ctrl+shift+c / ctrl+shift+v | copy / paste |
ctrl+insert / shift+insert | copy / paste |
ctrl+shift+n / ctrl+shift+t | new_window / new_tab |
ctrl+shift+w | close_tab |
alt+f4 | close_window |
alt+1–alt+8 / alt+9 | goto_tab:1–8 / last_tab |
ctrl+tab / ctrl+shift+tab | next_tab / previous_tab |
ctrl+page_down / ctrl+page_up | next_tab / previous_tab |
ctrl+shift+o / ctrl+shift+e | new_split:right / new_split:down |
ctrl+super+[ / ctrl+super+] | goto_split:previous / goto_split:next |
ctrl+alt+arrow | goto_split in that direction |
super+ctrl+shift+arrow | resize_split by 10px |
ctrl+enter / ctrl+shift+enter | toggle_fullscreen / toggle_split_zoom |
ctrl+shift+p | toggle_command_palette |
shift+page_up / shift+page_down | scroll_page_up / scroll_page_down |
shift+home / shift+end | scroll_to_top / scroll_to_bottom |
ctrl+shift+page_up / page_down | jump_to_prompt back / forward |
ctrl+shift+f / escape | start_search / end_search |
ctrl+shift+a | select_all |
ctrl+shift+i | inspector:toggle |
ctrl+shift+q | quit |
ctrl+= ctrl+- ctrl+0 | font 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.