mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #412] Console +/- resize keys unreliable across terminal protocols #876
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#876
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 @edlsh on GitHub (Dec 13, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/412
Description
The
+and-keys for resizing the console window do not work reliably. The issue is intermittent and depends on the terminal emulator and keyboard protocol in use.Root Cause Analysis
The key handling in
packages/core/src/console.ts(lines 480-485) checks:Issues identified:
Kitty keyboard protocol inconsistency: When Kitty protocol is enabled, terminals may send the base key codepoint (
=with shift modifier) rather than the shifted result (+). Inparse.keypress-kitty.ts,key.nameis set fromString.fromCodePoint(codepoint)and the shifted codepoint only updatestext, notkey.name.US keyboard layout assumption: The
+key requires Shift+= on US keyboards. Different terminals handle this differently:+character=) with shift flag, or codepoint 43 (+)No keypad support: Numeric keypad
+and-keys (codes 57413/57414 in Kitty) are mapped tokpminus/kpplusbut not handled by the console.Suggested Fix
Normalize key detection to handle all variants:
Environment
packages/core/src/console.tspackages/core/src/lib/parse.keypress.ts,packages/core/src/lib/parse.keypress-kitty.ts