[GH-ISSUE #434] bug: e.shift is false when press Shift+Enter in textarea #110

Open
opened 2026-03-02 23:44:37 +03:00 by kerem · 3 comments
Owner

Originally created by @nanokind on GitHub (Dec 20, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/434

Image

press Shift+D in textarea, e.shift=true

Image

But when pressing Shift+Enter, the current behavior is e.shift = false, the expected behavior is e.shift = true

Here is the code snippet to reproduce this

<textarea
  onKeyDown={e => {
    if (e.name === 'd') {
      console.log('d pressed', e)
    }
    if (e.name === 'return') {
      console.log('Enter pressed', e)
    }
  }}
/>
Originally created by @nanokind on GitHub (Dec 20, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/434 <img width="382" height="215" alt="Image" src="https://github.com/user-attachments/assets/0d3bbdc2-e638-44ae-ad94-308351a2e837" /> press Shift+D in textarea, `e.shift=true` <img width="388" height="197" alt="Image" src="https://github.com/user-attachments/assets/978efbde-fd6e-42e5-a9e1-009689416cdb" /> But when pressing Shift+Enter, the current behavior is `e.shift = false`, the expected behavior is `e.shift = true` Here is the code snippet to reproduce this ```tsx <textarea onKeyDown={e => { if (e.name === 'd') { console.log('d pressed', e) } if (e.name === 'return') { console.log('Enter pressed', e) } }} /> ```
Author
Owner

@kommander commented on GitHub (Dec 20, 2025):

That is a widespread issue with terminals. What terminal are you using on what OS and with or without tmux?

<!-- gh-comment-id:3677177644 --> @kommander commented on GitHub (Dec 20, 2025): That is a widespread issue with terminals. What terminal are you using on what OS and with or without tmux?
Author
Owner

@nanokind commented on GitHub (Dec 20, 2025):

@kommander I'm using Warp in MacOS 15.5 without tmux

<!-- gh-comment-id:3677482565 --> @nanokind commented on GitHub (Dec 20, 2025): @kommander I'm using Warp in MacOS 15.5 without tmux
Author
Owner

@nanokind commented on GitHub (Dec 20, 2025):

I also tried the builtin terminal in MacOS, and this issue exists as well

Image
<!-- gh-comment-id:3677488289 --> @nanokind commented on GitHub (Dec 20, 2025): I also tried the builtin terminal in MacOS, and this issue exists as well <img width="344" height="213" alt="Image" src="https://github.com/user-attachments/assets/b38b8349-b40d-42b9-a33a-f62dd515163c" />
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#110
No description provided.