claude-code - 💡(How to fix) Fix /terminal-setup falsely claims Shift+Enter is natively supported in WezTerm [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52683Fetched 2026-04-24 10:42:32
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Running /terminal-setup in WezTerm prints:

Shift+Enter is natively supported in WezTerm.

No configuration needed. Just use Shift+Enter to add newlines.

This is incorrect. WezTerm's default keybinding for Shift+Enter sends a plain \r, which Claude Code interprets as submit, not newline. A config entry is required.

Root Cause

Running /terminal-setup in WezTerm prints:

Shift+Enter is natively supported in WezTerm.

No configuration needed. Just use Shift+Enter to add newlines.

This is incorrect. WezTerm's default keybinding for Shift+Enter sends a plain \r, which Claude Code interprets as submit, not newline. A config entry is required.

Code Example

config.keys = {
  { key = \"Enter\", mods = \"SHIFT\", action = wezterm.action.SendString(\"\\x1b\\r\") },
}
RAW_BUFFERClick to expand / collapse

Summary

Running /terminal-setup in WezTerm prints:

Shift+Enter is natively supported in WezTerm.

No configuration needed. Just use Shift+Enter to add newlines.

This is incorrect. WezTerm's default keybinding for Shift+Enter sends a plain \r, which Claude Code interprets as submit, not newline. A config entry is required.

Repro

  1. Fresh WezTerm install (tested on Windows 11, WezTerm 20240203-xxx, default config).
  2. Launch Claude Code.
  3. Run /terminal-setup.
  4. Press Shift+Enter — message is submitted instead of a newline being inserted.

Expected

Either:

  • /terminal-setup detects WezTerm and writes the needed keybinding to ~/.wezterm.lua / ~/.config/wezterm/wezterm.lua (matching the behavior it has for iTerm2 / VS Code terminal), or
  • the message tells the user to add the binding manually instead of claiming native support.

Fix (for users hitting this)

Add to wezterm.lua:

config.keys = {
  { key = \"Enter\", mods = \"SHIFT\", action = wezterm.action.SendString(\"\\x1b\\r\") },
}

Environment

  • OS: Windows 11 (WezTerm launched against WSL2 Ubuntu)
  • WezTerm: current stable
  • Claude Code: latest

extent analysis

TL;DR

To fix the issue, add a custom keybinding to WezTerm's configuration file wezterm.lua to correctly handle Shift+Enter.

Guidance

  • Verify that the issue is specific to WezTerm's default keybinding for Shift+Enter, which sends a plain \r instead of a newline.
  • Check the wezterm.lua configuration file for any existing keybindings that may be overriding the default behavior.
  • Add the suggested keybinding to wezterm.lua to send the correct newline character: { key = "Enter", mods = "SHIFT", action = wezterm.action.SendString("\\x1b\\r") }.
  • After adding the keybinding, restart WezTerm or reload the configuration to apply the changes.

Example

The provided code snippet in the issue can be used as a reference:

config.keys = {
  { key = "Enter", mods = "SHIFT", action = wezterm.action.SendString("\\x1b\\r") },
}

Add this to the wezterm.lua file to enable the correct Shift+Enter behavior.

Notes

This fix assumes that the issue is specific to WezTerm's default keybinding and that the wezterm.lua configuration file is being used. If using a different configuration file or setup, adjustments may be necessary.

Recommendation

Apply the workaround by adding the custom keybinding to wezterm.lua, as this provides a direct solution to the issue and allows for correct Shift+Enter behavior in WezTerm.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix /terminal-setup falsely claims Shift+Enter is natively supported in WezTerm [1 comments, 2 participants]