mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 21:15:52 +03:00
[PR #487] [MERGED] fix(keypress): convert to uppercase when shift pressed without shifted codepoint #1353
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#1353
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?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/487
Author: @Stranmor
Created: 1/7/2026
Status: ✅ Merged
Merged: 1/11/2026
Merged by: @kommander
Base:
main← Head:fix/shift-uppercase-kitty📝 Commits (5)
a490d41fix(keypress): convert to uppercase when shift pressed without shifted codepoint1a02e17test: update expectations for shift+key sequences to uppercase6bc7f3cMerge branch 'main' into fix/shift-uppercase-kitty345b6c6Merge branch 'main' into fix/shift-uppercase-kitty9bcacb4prettier📊 Changes
3 files changed (+25 additions, -3 deletions)
View changed files
📝
packages/core/src/lib/parse.keypress-kitty.test.ts(+18 -0)📝
packages/core/src/lib/parse.keypress-kitty.ts(+4 -0)📝
packages/core/src/tests/renderer.input.test.ts(+3 -3)📄 Description
Summary
When terminals send Kitty keyboard protocol sequences with shift modifier but without the shifted codepoint (e.g.,
\x1b[97;2uinstead of\x1b[97:65;2u), the parser now correctly converts the character to uppercase.Problem
Some terminals (like WezTerm) may send Kitty keyboard sequences with the shift modifier set but without providing the shifted codepoint in the CSI u sequence. In these cases, pressing Shift+a would result in lowercase 'a' being inserted instead of uppercase 'A'.
This affects both Latin and Unicode characters (including Cyrillic).
Solution
When
key.shiftis true but noshiftedCodepointis provided, usetoLocaleUpperCase()to convert the character. This works correctly for all Unicode scripts including Cyrillic.Changes
parse.keypress-kitty.tsto handle shift+letter without shifted codepointTesting
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.