Skip to content

Add SUPER+A universal select all keybinding - #9921

Closed
AlanRoman117 wants to merge 3 commits into
omacom:quattrofrom
AlanRoman117:add-super-a-select-all
Closed

AlanRoman117 wants to merge 3 commits into
omacom:quattrofrom
AlanRoman117:add-super-a-select-all

Conversation

@AlanRoman117

Copy link
Copy Markdown

Summary

  • SUPER+C (copy), SUPER+V (paste), and SUPER+X (cut) all have universal keybindings, but select all still required reaching for CTRL+A.
  • Adds SUPER + A → "Universal select all" in default/hypr/bindings/clipboard.lua, forwarding CTRL+A to the focused window using the same send_key_state down/up pattern as the existing clipboard bindings.
  • Skips terminal windows (reusing the existing active_window_is_terminal check) since CTRL+A there is readline's "move to start of line", not select-all — forwarding it would silently move the cursor instead.

Test plan

  • ./test/all passes
  • Verified locally: SUPER + A selects all text in GUI apps (browser, text editor), and is a no-op in terminal windows (leaves CTRL+A's normal readline behavior untouched)
  • omarchy menu keybindings --print shows SUPER + A → Universal select all

🤖 Generated with Claude Code

https://claude.ai/code/session_012FgNnd3XE7c2jL478nscw6

Copy, paste, and cut all have SUPER shortcuts, but select all still
required CTRL+A. Add it alongside them, skipping terminal windows
since CTRL+A there is readline's "move to start of line" rather than
select-all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012FgNnd3XE7c2jL478nscw6
@axelfontaine

Copy link
Copy Markdown
Contributor

Strongly disagree about the no-op. To stay consistent, this shortcut should absolutely make it universal and send Ctrl+shift+a to terminals.

@AlanRoman117

Copy link
Copy Markdown
Author

Sounds good, let me update the PR. I also didn't want to get into how some folks may prefer their CLI, however it could indeed improve the experience. Please let me know if this is good and I'll proceed accordingly.

Per review feedback: instead of a no-op in terminal windows, forward
CTRL+SHIFT+A there so the shortcut works everywhere, matching how
SUPER+C/V already special-case terminal key combos rather than
skipping terminals outright. Reuses the existing
universal_clipboard_shortcut helper.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UByBunyAcPCN8Wyo2fwXpM
@AlanRoman117

Copy link
Copy Markdown
Author

Updated — SUPER+A now forwards CTRL+SHIFT+A in terminals instead of no-op'ing, using the existing universal_clipboard_shortcut helper (same one SUPER+C/V already use), so it's consistent with the rest of the file:

o.bind("SUPER + A", "Universal select all", universal_clipboard_shortcut("CTRL", "A", "CTRL SHIFT", "A"))

./test/all passes and I verified locally that the binding resolves cleanly (no hyprctl configerrors) and shows up as SUPER + A → Universal select all in omarchy menu keybindings --print.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UByBunyAcPCN8Wyo2fwXpM

@axelfontaine

axelfontaine commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

I may have spoken too soon. It appears only Ghostty supports a "select all" action 😬

Per review feedback: foot, kitty, and Alacritty have no keyboard-
triggerable select-all action to forward to. Verified directly by
sending CTRL+SHIFT+A into each terminal's pty and inspecting the raw
bytes received:

- foot and Alacritty both collapse CTRL+SHIFT+A to the same byte as
  plain CTRL+A (0x01), so forwarding it would reintroduce the exact
  bug this binding is meant to fix - it silently runs readline's
  "move to start of line" instead of doing nothing.
- kitty sends a distinct but unbound CSI-u sequence, which readline
  ignores (a harmless no-op, but still not select-all).
- Ghostty is the only one of the four that ships a real select_all
  action, bound to CTRL+SHIFT+A by default
  (`ghostty +list-keybinds --default`), and consumes the chord itself
  before it reaches the shell.

So SUPER+A now checks for Ghostty specifically (window.class ==
"com.mitchellh.ghostty", matching the regex already used to tag
terminals in default/hypr/apps/terminals.lua) and forwards
CTRL+SHIFT+A only there; other terminals get a no-op.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117QTgSe8i9Sp8gry3KzW27
@AlanRoman117

Copy link
Copy Markdown
Author

You're right, and it's actually worse than a missing feature — I installed all four terminals and tested what CTRL+SHIFT+A actually does in each by capturing the raw bytes their pty receives:

Terminal CTRL+SHIFT+A byte(s) Result if forwarded
foot ^A (0x01, same as plain CTRL+A) Reintroduces the original bug — readline still runs "move to start of line"
Alacritty ^A (0x01, same as plain CTRL+A) Same — collapses to the same byte as CTRL+A
kitty ^[[97;6u (distinct CSI-u sequence) Harmless no-op — readline doesn't recognize it — but still not select-all
Ghostty consumed entirely by the terminal Actually selects all — Ghostty ships ctrl+shift+a=select_all as a default keybind (ghostty +list-keybinds --default) and intercepts the chord before it ever reaches the shell

Also confirmed via each terminal's own action/keybind listing that foot, kitty, and Alacritty have no bindable "select all" action at all (only mouse-driven selection primitives like select-word/ExpandSelection/etc.) — there's nothing for a forwarded keystroke to hook into on those three, regardless of which chord we pick.

So I've updated the binding to check specifically for Ghostty (window.class == "com.mitchellh.ghostty", matching the regex already used to tag terminals in default/hypr/apps/terminals.lua) and only forward CTRL+SHIFT+A there. foot/kitty/Alacritty get a no-op, which is strictly better than the alternative of silently moving the cursor.

./test/all passes (82/82).

🤖 Generated with Claude Code

https://claude.ai/code/session_0117QTgSe8i9Sp8gry3KzW27

@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
@EmanuelMedinaAraujo

Copy link
Copy Markdown

Heads up: SUPER + A → Ctrl+A landed on quattro in #12915 (merged 2026-09-22), so the binding itself is already in. It sends Ctrl+A everywhere with no terminal branch. If there's still something to propose here, it's the terminal behaviour, and your Ctrl+Shift+A findings above are the relevant context for that.

@AlanRoman117

Copy link
Copy Markdown
Author

sounds good, I'll close this PR, thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants