Skip to content

Instantly share code, notes, and snippets.

@hensg
Forked from trashhalo/ghostty-shortcuts.md
Created February 5, 2025 17:47
Show Gist options
  • Save hensg/43bc71c21d1f79385892352a390aa2ca to your computer and use it in GitHub Desktop.
Save hensg/43bc71c21d1f79385892352a390aa2ca to your computer and use it in GitHub Desktop.

Ghostty Keyboard Shortcuts

Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.

Window Management

Action Windows/Linux macOS
New window Ctrl+Shift+N Cmd+N
Close window Alt+F4 Cmd+Shift+W
Close all windows - Cmd+Shift+Option+W
Toggle fullscreen Ctrl+Enter Cmd+Enter or Cmd+Ctrl+F
Quit application Ctrl+Shift+Q Cmd+Q

Tab Management

Action Windows/Linux macOS
New tab Ctrl+Shift+T Cmd+T
Close tab/surface Ctrl+Shift+W Cmd+W
Previous tab Ctrl+Shift+Tab, Ctrl+Shift+Left, Ctrl+Page Up Cmd+Shift+[
Next tab Ctrl+Tab, Ctrl+Shift+Right, Ctrl+Page Down Cmd+Shift+]
Go to tab 1-8 Alt+[1-8] Cmd+[1-8]
Go to last tab Alt+9 Cmd+9
Move tab - -

Split Management

Action Windows/Linux macOS
New split (right) Ctrl+Shift+O Cmd+D
New split (down) Ctrl+Shift+E Cmd+Shift+D
Focus previous split Ctrl+Super+[ Cmd+[
Focus next split Ctrl+Super+] Cmd+]
Focus split up Ctrl+Alt+Up Cmd+Option+Up
Focus split down Ctrl+Alt+Down Cmd+Option+Down
Focus split left Ctrl+Alt+Left Cmd+Option+Left
Focus split right Ctrl+Alt+Right Cmd+Option+Right
Toggle split zoom Ctrl+Shift+Enter Cmd+Shift+Enter
Resize split up Ctrl+Super+Shift+Up Cmd+Ctrl+Up
Resize split down Ctrl+Super+Shift+Down Cmd+Ctrl+Down
Resize split left Ctrl+Super+Shift+Left Cmd+Ctrl+Left
Resize split right Ctrl+Super+Shift+Right Cmd+Ctrl+Right
Equalize splits Ctrl+Super+Shift+= Cmd+Ctrl+=

Copy & Paste

Action Windows/Linux macOS
Copy Ctrl+Shift+C Cmd+C
Paste Ctrl+Shift+V Cmd+V
Paste from selection Shift+Insert -

Text Navigation

Action Windows/Linux macOS
Scroll to top Shift+Home Cmd+Home
Scroll to bottom Shift+End Cmd+End
Scroll page up Shift+Page Up Cmd+Page Up
Scroll page down Shift+Page Down Cmd+Page Down
Jump to previous prompt Ctrl+Shift+Page Up Cmd+Up
Jump to next prompt Ctrl+Shift+Page Down Cmd+Down
Clear screen - Cmd+K

Font Size

Action Windows/Linux macOS
Increase font size Ctrl++/Ctrl+= Cmd++/Cmd+=
Decrease font size Ctrl+- Cmd+-
Reset font size Ctrl+0 Cmd+0

Configuration

Action Windows/Linux macOS
Open config Ctrl+, Cmd+,
Reload config Ctrl+Shift+, Cmd+Shift+,

Inspector

Action Windows/Linux macOS
Toggle inspector Ctrl+Shift+I Cmd+Option+I

Scrollback

Action Windows/Linux macOS
Write scrollback to file (paste) Ctrl+Shift+J Cmd+Shift+J
Write scrollback to file (open) Ctrl+Shift+Alt+J Cmd+Shift+Option+J

Note: These are the default keybindings. All keybindings can be customized through the configuration file using the keybind option.

@qu8n
Copy link

qu8n commented Apr 6, 2025

@Samk13 Search is not yet supported. As a temporary solution, I added this line in the config on my macOS:

keybind = "ctrl+f=write_scrollback_file:open"

Pressing Ctrl + F now opens up a textedit file containing the content of the current terminal's output, and you can Cmd + F to search in that file. Not elegant but a fine stopgap solution for me.

@Samk13
Copy link

Samk13 commented Apr 6, 2025

@qu8n, cool workaround! I later noticed the limitation too, and I'm currently using tmux to get by while the issue gets sorted out using Ctrl-b [ / foo b n. I’ll give your method a try though. Appreciate you sharing it!

@jenil777007
Copy link

Thanks. This is much helpful.

BTW, how do we close a split?

@sudip-poudel
Copy link

@jenil777007 Ctrl + Alt + D in linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment