[BUG] Pressing shift+space inserts the word "space" instead of adding a space

Status Fixed / completed
Reported on v2.0.76
Maintainer reply ✓ Yes — blois
Activity 11 comments · opened Jan 7, 2026 · closed Jan 9, 2026
💡 Likely answer: A maintainer (blois, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Pressing shift+space when typing inserts the word "space"

What Should Happen?

Pressing shift+space should insert a space.

I never realized how often I still have the shift key pressed after typing "I" then pressing space until I could no longer type into claude code with seeing "Ispace [...] Ispace".

Error Messages/Logs

Steps to Reproduce

Open claude code. Press shift+space. You will see "space" printed in the input area.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.76

Claude Code Version

2.1.1

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other (ghostty)

Additional Information

<img width="1279" height="966" alt="Image" src="https://github.com/user-attachments/assets/868f1e76-5011-4a6a-832a-c24bede71cbb" />

View original on GitHub ↗

11 Comments

apenney · 7 months ago

I am also suffering this, so just to confirm that it's reproducible. It doesn't occur with konsole, but does with ghostty, if that helps to trace this down. Ghostty alone doesn't emit space, only when claude is run.

em · 7 months ago

Temporary workaround if you use ghostty:

``~/.config/ghostty/config``

``keybind = shift+space=text:\x20``

What's actually happening: Claude Code's TUI library (likely Ink) is receiving the Kitty keyboard protocol's enhanced key event for Shift+Space and dumping the key name "space" as literal text instead of translating it to the space character. This is a Claude Code bug that started in 2.1.1, not a Ghostty bug.

adamkdean · 7 months ago

For anyone wanting to fix this but not using ghostty, you can use Karabiner (https://karabiner-elements.pqrs.org/) with a custom modification to change it to a regular space:

{
  "description": "Map Shift+Space to literal space",
  "manipulators": [
    {
      "type": "basic",
      "from": {
        "key_code": "spacebar",
        "modifiers": {
          "mandatory": ["shift"],
          "optional": ["any"]
        }
      },
      "to": [
        {
          "key_code": "spacebar"
        }
      ]
    }
  ]
}
donovan-duplessis · 7 months ago

I am having this same issue on ghostty, and the solution by @em does not work for me

correction: The solution did work after a reboot, thank you @em

mark-keaton · 7 months ago

I am having the same issue on Mac with iTerm2. I have not tried a reboot yet.

johnflavin · 7 months ago

I was able to work around the issue in iTerm2 with a key binding.

Open iTerm2 → Settings → Profiles → Keys → Key Mappings

Create a new binding for Shift+Space to send text, and type a in the field.

mackcoding · 7 months ago

I am using Ghostty, and I'm impressed with this bug. Hopefully it gets fixed quickly.

shawnyeager · 7 months ago

Can confirm in Ghostty on Linux.

Teo-Asinari · 7 months ago

I can confirm it also happens on MacOS, iTerm.app, vim mode, Amethyst WM.

My closed (duplicate) issue: https://github.com/anthropics/claude-code/issues/16927

blois collaborator · 7 months ago

Fix should be in 2.1.3.

github-actions[bot] · 7 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.