[Bug] Option+Delete (word deletion) not working in Ghostty

Status Fixed / completed
Reported on v2.1.1
Maintainer reply None cached
Activity 8 comments · opened Jan 8, 2026 · closed Apr 2, 2026

Option+Delete (for deleting word backwards) is not working within Claude Code. This keybinding works correctly in the regular Ghostty shell outside of Claude Code.

Environment:

  • Claude Code version: 2.1.1 (Homebrew)
  • Terminal: Ghostty
  • OS: macOS (Darwin 25.0.0)
  • Install method: Homebrew (/opt/homebrew/bin/claude)

Expected behavior:
Option+Delete should delete the word before the cursor (standard macOS text editing behavior).

Actual behavior:
The key combination does nothing or is being captured/ignored by Claude Code.

Workaround:
Alt+Backspace or Ctrl+W may work as alternatives.

Notes:

  • Option+Left/Right (word navigation) works correctly after 2.1.0 fix
  • Option+B/F also work for word navigation
  • /terminal-setup is not available in Ghostty (hidden because Ghostty has "native support")
  • The issue is specific to Claude Code - works fine in regular shell

View original on GitHub ↗

8 Comments

lior-airis · 7 months ago

Bug confirmed with CC 2.1.X on Macos with Ghostty

mekedron · 6 months ago

Actually, seems it works if you put it in ghostty config:

macos-option-as-alt = left
cercxtrova · 5 months ago
Actually, seems it works if you put it in ghostty config: `` macos-option-as-alt = left ``

Unfortunately this causes numerous problems; all special characters that require the Option key to type stop working afterward, forcing you to use Option-Right (or vice versa), which is really annoying on a daily basis.

stenet · 5 months ago
> Actually, seems it works if you put it in ghostty config: > `` > macos-option-as-alt = left > `` Unfortunately this causes numerous problems; all special characters that require the Option key to type stop working afterward, forcing you to use Option-Right (or vice versa), which is really annoying on a daily basis.
keybind = opt+backspace=text:\x1b\x7f

This worked for me, as it only sets a keybinding on opt+backspace.

mercxry · 5 months ago
`` keybind = opt+backspace=text:\x1b\x7f `` This worked for me, as it only sets a keybinding on opt+backspace.

Unfortunately this didn't work for me, but the following snippet does

keybind = option+backspace=text:\x17
minons1 · 5 months ago

I found out today that Option+Command+Delete works as delete word backward in Ghostty

Albeit this is not Option+Delete but the muscle memory doesn't differ that much and no configuration needed, hope this helps

funclosure · 5 months ago

@minons1
I found the solution here:

macos-option-as-alt = true

<img width="768" height="534" alt="Image" src="https://github.com/user-attachments/assets/ad9bce08-b971-4bb5-9fb6-a21fd33b31e9" />

https://github.com/anthropics/claude-code/issues/18157#issuecomment-3817884321

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.