mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #380] bug: shift+space doesn't insert a space on wezterm #862
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#862
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fareesh on GitHub (Dec 4, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/380
Summary
Input components do not accept shift+space key combinations when using the "wezterm" terminal. The key combination works correctly in other terminals like Ghostty. Often times when in the flow of typing, the shift key can sometimes remain pressed for longer than expected, resulting in a missed space.
Environment
Steps to Reproduce
Expected Behavior
shift+space should insert a space character in the input field, just like regular space.
Actual Behavior
shift+space is ignored and no character is inserted.
Root Cause
wezterm sends the ModifyOtherKeys escape sequence
\u001b[27;2;32~for shift+space, which the Input component's text insertion logic does not handle. The component only checks for single-character sequences, but ModifyOtherKeys sequences are multi-character escape sequences.Technical Details
\u001b[27;2;32~(ModifyOtherKeys protocol){ name: "space", sequence: "\u001b[27;2;32~", shift: true }keySequence.length === 1, which fails for escape sequences\u001b[32;2u(Kitty protocol) which works correctlyPossible Fix
Update the Input component's
handleKeyPressmethod to handle ModifyOtherKeys sequences for printable characters, specifically the space character case:but this feels like an ugly hack so idk! I suppose the other workaround would be to just change the wezterm config and handle shift+space differently.
@kommander commented on GitHub (Dec 5, 2025):
I works in the text area though? The Editor Demo in the examples uses the text area. I want to replace the input component to underneath use the text area, that should fix this. @msmps had something for this.
@fareesh commented on GitHub (Dec 6, 2025):
Seems like the same issue exists with
TextareaRenderable. When I run it with theelseI added torenderables/Inputthe Input Demo processes shift+space correctly but the Editor demo has the same problem.