[PR #477] [CLOSED] fix(keypress): set option flag for legacy terminal Option+Backspace #1346

Closed
opened 2026-03-14 09:31:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/477
Author: @paulbalaji
Created: 1/6/2026
Status: Closed

Base: mainHead: fix/modifier-backspace


📝 Commits (1)

  • 47622e7 fix(keypress): set option flag for legacy terminal Option+Backspace

📊 Changes

2 files changed (+20 additions, -1 deletions)

View changed files

📝 packages/core/src/lib/parse.keypress.test.ts (+16 -0)
📝 packages/core/src/lib/parse.keypress.ts (+4 -1)

📄 Description

Summary

  • Set option: true when parsing legacy terminal sequences for Option+Backspace (\x1b\x7f and \x1b\b)
  • This ensures consistency with modern escape sequences (modifyOtherKeys and Kitty keyboard protocol) which already set the option flag
  • Added tests for legacy terminal Option+Backspace parsing

Background

Legacy terminals (like Terminal.app on macOS) send \x1b\x7f (ESC + DEL) for Option+Backspace. Previously, only meta: true was set for this sequence, while the option flag was only set for modern escape sequences.

This change ensures consistent behavior across all terminal types.


🔄 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/477 **Author:** [@paulbalaji](https://github.com/paulbalaji) **Created:** 1/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/modifier-backspace` --- ### 📝 Commits (1) - [`47622e7`](https://github.com/anomalyco/opentui/commit/47622e737c7b5d4d9b89644e18167e7ec24621f7) fix(keypress): set option flag for legacy terminal Option+Backspace ### 📊 Changes **2 files changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/lib/parse.keypress.test.ts` (+16 -0) 📝 `packages/core/src/lib/parse.keypress.ts` (+4 -1) </details> ### 📄 Description ## Summary - Set `option: true` when parsing legacy terminal sequences for Option+Backspace (`\x1b\x7f` and `\x1b\b`) - This ensures consistency with modern escape sequences (modifyOtherKeys and Kitty keyboard protocol) which already set the option flag - Added tests for legacy terminal Option+Backspace parsing ## Background Legacy terminals (like Terminal.app on macOS) send `\x1b\x7f` (ESC + DEL) for Option+Backspace. Previously, only `meta: true` was set for this sequence, while the `option` flag was only set for modern escape sequences. This change ensures consistent behavior across all terminal types. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:31:43 +03:00
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#1346
No description provided.