[GH-ISSUE #518] Feature request: select-all (Cmd+A) for Textarea #136

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

Originally created by @danolekh on GitHub (Jan 13, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/518

browser-like "select all" in textarea - press cmd+a to select everything

i have a working implementation:

  • Added "select-all" to TextareaAction
  • Added keybinding: { name: "a", super: true, action: "select-all" }
  • Added selectAll() method

i mostly used claude to navigate this repo. i don't have much terminal dev experience - i usually work in browsers - so I wanted this familiar behavior

What I tested (macOS only)

Terminal Works?
Kitty yes
Alacritty yes
Ghostty no - intercepts Cmd+A for terminal buffer selection

Questions

  1. Does this make sense for the project?
  2. On Windows/Linux, super+a maps to Win+A which is weird. So I'm not sure about this feature
  3. What's the tui philisophy regarding keybindings overall - I see some emcas bindings, and, in the same components browser-like bindings
Originally created by @danolekh on GitHub (Jan 13, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/518 browser-like "select all" in textarea - press cmd+a to select everything i have a working implementation: - Added `"select-all"` to TextareaAction - Added keybinding: `{ name: "a", super: true, action: "select-all" }` - Added `selectAll()` method i mostly used claude to navigate this repo. i don't have much terminal dev experience - i usually work in browsers - so I wanted this familiar behavior What I tested (macOS only) | Terminal | Works? | |----------|--------| | Kitty | ✅ yes | | Alacritty | ✅ yes | | Ghostty | ❌ no - intercepts Cmd+A for terminal buffer selection | Questions 1. Does this make sense for the project? 2. On Windows/Linux, `super+a` maps to Win+A which is weird. So I'm not sure about this feature 3. What's the tui philisophy regarding keybindings overall - I see some emcas bindings, and, in the same components browser-like bindings
kerem 2026-03-02 23:44:48 +03:00
Author
Owner

@kommander commented on GitHub (Jan 14, 2026):

  1. Totally
  2. Mappings can be overridden by applications, I'd add maybe another default mapping for windows? Not sure what it is there. The default mappings should maybe be platform dependent.
  3. People have all kinds of conflicting expectations, so it will work fine for some while others expect something else. There is no defacto standard for the terminal, it depends on the platform, terminal emulator and the philosophy the users comes from. Impossible to meet them all with a default. It's configurable/customizable, that's one philosophy I'd say.
<!-- gh-comment-id:3747080959 --> @kommander commented on GitHub (Jan 14, 2026): 1. Totally 2. Mappings can be overridden by applications, I'd add maybe another default mapping for windows? Not sure what it is there. The default mappings should maybe be platform dependent. 3. People have all kinds of conflicting expectations, so it will work fine for some while others expect something else. There is no defacto standard for the terminal, it depends on the platform, terminal emulator and the philosophy the users comes from. Impossible to meet them all with a default. It's configurable/customizable, that's one philosophy I'd say.
Author
Owner

@danolekh commented on GitHub (Jan 18, 2026):

@kommander
have a question regarding arrow keys behaviour when something is selected

in browsers, if something is selected, and you click arrow left / right you go to respective edges of that selection
in terminals, your selection doesn't affect this behiour - cursor just moves from the place it was at that moment

is this something we shouldn't modify?

https://github.com/user-attachments/assets/f26319af-96c9-4463-9e12-238ac74a2be2

<!-- gh-comment-id:3765306216 --> @danolekh commented on GitHub (Jan 18, 2026): @kommander have a question regarding arrow keys behaviour when something is selected in browsers, if something is selected, and you click arrow left / right you go to respective edges of that selection in terminals, your selection doesn't affect this behiour - cursor just moves from the place it was at that moment is this something we shouldn't modify? https://github.com/user-attachments/assets/f26319af-96c9-4463-9e12-238ac74a2be2
Author
Owner

@kommander commented on GitHub (Jan 18, 2026):

It could have a similar behaviour like that, yes.

<!-- gh-comment-id:3765310286 --> @kommander commented on GitHub (Jan 18, 2026): It could have a similar behaviour like that, yes.
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#136
No description provided.