[PR #526] [CLOSED] fix: add keypad Enter key (OM) mapping for application mode #598

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/526
Author: @alpacachen
Created: 1/15/2026
Status: Closed

Base: mainHead: fix/keypad-enter-key


📝 Commits (1)

  • d8658a7 fix: add keypad Enter key (OM) mapping for application mode

📊 Changes

2 files changed (+21 additions, -0 deletions)

View changed files

📝 packages/core/src/lib/parse.keypress.test.ts (+19 -0)
📝 packages/core/src/lib/parse.keypress.ts (+2 -0)

📄 Description

Summary

  • Adds OM -> return mapping to the keyName table in parse.keypress.ts
  • Adds test case for keypad Enter key parsing

Problem

When the numpad (keypad) is in application mode, pressing the numpad Enter key sends the escape sequence ESC O M (\x1bOM). This sequence was not being recognized, causing the numpad Enter key to not function in applications using opentui (such as opencode).

Solution

Added the OM: "return" mapping to the keyName object, similar to how other application mode keys (OA, OB, OC, OD, etc.) are mapped.

Testing

Added a test case that verifies \x1bOM is correctly parsed as a return key event.


🔄 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/526 **Author:** [@alpacachen](https://github.com/alpacachen) **Created:** 1/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/keypad-enter-key` --- ### 📝 Commits (1) - [`d8658a7`](https://github.com/anomalyco/opentui/commit/d8658a7fecc87b65f3f42e039399ff2fc0e8e02f) fix: add keypad Enter key (OM) mapping for application mode ### 📊 Changes **2 files changed** (+21 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/lib/parse.keypress.test.ts` (+19 -0) 📝 `packages/core/src/lib/parse.keypress.ts` (+2 -0) </details> ### 📄 Description ## Summary - Adds `OM` -> `return` mapping to the keyName table in `parse.keypress.ts` - Adds test case for keypad Enter key parsing ## Problem When the numpad (keypad) is in application mode, pressing the numpad Enter key sends the escape sequence `ESC O M` (`\x1bOM`). This sequence was not being recognized, causing the numpad Enter key to not function in applications using opentui (such as opencode). ## Solution Added the `OM: "return"` mapping to the keyName object, similar to how other application mode keys (OA, OB, OC, OD, etc.) are mapped. ## Testing Added a test case that verifies `\x1bOM` is correctly parsed as a return key event. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:47:17 +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#598
No description provided.