Skip to content

Fix AZERTY Option+Delete word delete in Claude Code - #1639

Closed
austinywang wants to merge 1 commit into
manaflow-ai:mainfrom
austinywang:issue-1635-azerty-option-delete
Closed

austinywang wants to merge 1 commit into
manaflow-ai:mainfrom
austinywang:issue-1635-azerty-option-delete

Conversation

@austinywang

@austinywang austinywang commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • treat DEL (Option+Delete) as a non-text control key in the terminal key bridge
  • clear consumed text modifiers when a key event is forwarded without text so Option remains available as Meta for word-delete
  • add a regression test covering synthetic Option+Delete through the real keyDown path

Closes #1635.

Verification

  • built and launched with ./scripts/reload.sh --tag fix-1635-azerty-delete
  • did not run local tests per repo policy

Summary by cubic

Fixes Option+Delete on AZERTY by treating Delete (DEL) as a non-text key and not consuming Option, so Alt+Delete deletes a word again in the terminal. Adds a regression test that drives a synthetic Option+Delete through keyDown to ensure Alt is preserved and no DEL text is sent.

Written for commit e9db155. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced keyboard event text extraction for improved input reliability and consistency
    • Improved control character detection to prevent accidental text transmission
    • Added defensive modifier state reset to ensure correct behavior in edge cases
  • Tests

    • Added regression tests verifying Option+Delete correctly preserves the Alt modifier during word deletion

@vercel

vercel Bot commented Mar 18, 2026

Copy link
Copy Markdown

@austinywang is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Mar 18, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f5151ed-525b-418e-a295-142de63870a7

📥 Commits

Reviewing files that changed from the base of the PR and between a42e666 and e9db155.

📒 Files selected for processing (2)
  • Sources/GhosttyTerminalView.swift
  • cmuxTests/CJKIMEInputTests.swift

📝 Walkthrough

Walkthrough

The changes refine key event text extraction and control character handling in the terminal view. A new helper function validates control characters, text-sending logic filters derived text through textForKeyEvent(), and consumed modifiers are defensively reset when text isn't sent. A regression test validates that Option+Delete preserves the Alt modifier on non-US keyboard layouts.

Changes

Cohort / File(s) Summary
Key Event Text & Control Handling
Sources/GhosttyTerminalView.swift
Replaced direct event.characters extraction with textForKeyEvent(event) flow, added isControlCharacterScalar() helper for control character detection, updated control-character checks to use the new helper, extended shouldSendText to filter single-character control cases, and added defensive consumed_mods reset in non-sent-text branches.
Option+Delete Regression Test
cmuxTests/CJKIMEInputTests.swift
Added new test class GhosttyOptionDeleteRegressionTests with test verifying that Option+Delete preserves the Alt modifier on the raw key event without consuming it as text input, validating behavior for non-US keyboard layouts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 A rabbit hops with glee and cheer,
For Option+Delete, now crystal clear!
No matter AZERTY or the keys you choose,
Word-delete works—no more you'll lose!
Control chars sorted, modifiers preserved so neat,
This fuzzy friend made the fix complete! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main fix: addressing the AZERTY Option+Delete word delete issue in Claude Code, matching the primary objective from the linked issue.
Description check ✅ Passed The description covers the summary of changes and includes verification steps, though it lacks comprehensive details on testing performed and omits some optional sections like demo video and explicit bot review requests.
Linked Issues check ✅ Passed The code changes directly address issue #1635 by treating DEL as a non-text control key and preserving Option as Meta for word-delete on AZERTY keyboards, with added regression test coverage.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the AZERTY Option+Delete issue: control character detection refactoring, consumed modifier management, and a focused regression test.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel

vercel Bot commented Mar 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Mar 18, 2026 0:20am

@austinywang

Copy link
Copy Markdown
Contributor Author

Superseded by #1640, which uses the branch on manaflow-ai/cmux instead of the fork branch.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

This branch was successfully deployed

1 active deployment
Preview — e9db1559 Deployed Mar 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AZERTY keyboards: Option+Delete (word delete) doesn't work in Claude Code

1 participant