[PR #532] Add support for PuTTY ALT+arrow key sequences #602

Open
opened 2026-03-02 23:47:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/532
Author: @tobwen
Created: 1/16/2026
Status: 🔄 Open

Base: mainHead: fix/putty-escape-sequence


📝 Commits (1)

  • 9e45a56 Add support for PuTTY ALT+arrow key sequences

📊 Changes

3 files changed (+81 additions, -0 deletions)

View changed files

📝 packages/core/src/lib/parse.keypress.test.ts (+54 -0)
📝 packages/core/src/lib/parse.keypress.ts (+11 -0)
📝 packages/core/src/lib/stdin-buffer.ts (+16 -0)

📄 Description

Adds recognition for double ESC sequences generated by PuTTY terminal when ALT+arrow keys are pressed (format: ESC ESC [A-D).

Updates the keypress parser to properly identify these sequences and mark them with meta/option flags while ensuring regular arrow keys still work correctly.

Enhances terminal compatibility for users of PuTTY in default mode.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/532 **Author:** [@tobwen](https://github.com/tobwen) **Created:** 1/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/putty-escape-sequence` --- ### 📝 Commits (1) - [`9e45a56`](https://github.com/anomalyco/opentui/commit/9e45a56da38fc31b0d78321727d7e141e3436b7b) Add support for PuTTY ALT+arrow key sequences ### 📊 Changes **3 files changed** (+81 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/lib/parse.keypress.test.ts` (+54 -0) 📝 `packages/core/src/lib/parse.keypress.ts` (+11 -0) 📝 `packages/core/src/lib/stdin-buffer.ts` (+16 -0) </details> ### 📄 Description Adds recognition for double ESC sequences generated by PuTTY terminal when ALT+arrow keys are pressed (format: ESC ESC [A-D). Updates the keypress parser to properly identify these sequences and mark them with meta/option flags while ensuring regular arrow keys still work correctly. Enhances terminal compatibility for users of PuTTY in default mode. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#602
No description provided.