Skip to content

Control notifications with the keyboard - #16471

Merged
dhh merged 4 commits into
quattrofrom
notification-keyboard
Oct 24, 2026
Merged

dhh merged 4 commits into
quattrofrom
notification-keyboard

Conversation

@dhh

@dhh dhh commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Builds on the notification action buttons from #16466.

Notifications never take keyboard focus on their own, since a card that grabbed focus as it arrived would swallow whatever you were typing. A keybinding hands the keyboard over instead:

  • Super + Ctrl + , selects the newest card, opens its deck, and gives that display's notification surface exclusive keyboard focus.
    • The selected card gets the theme's hover tint, and its buttons show accent-coloured numbers.
    • 1–9 press a button.
    • Enter clicks the card.
    • ↑/↓ (also j/k, Tab) move between cards, deck by deck.
    • Delete dismisses the card and selects the next.
    • Esc, any choice, a mouse click on a card, the pointer moving onto another deck, or ten idle seconds give the keyboard back.
    • While it's on, the deck stays open and new cards wait, as under the pointer.
  • Silencing moves to Super + Ctrl + Alt + , to free the shorter keys. The hotkeys and toggles manual pages are updated; translations follow through the sync workflow.
  • omarchy-shell notifications invokeAction <n> presses button n on the newest card without the mode.
  • One button list, Delivery.deeds, feeds both the card's buttons and the number keys, so they can't disagree. A test pins its order: codes, then --action buttons, then the sender's actions.
  • Button bar: the segments now draw their own hairlines and let the card's colour through, so the selection tint covers the whole card. A label is only cut short when it really can't fit; at 2× scale "Show in folder" was being elided next to its number.

Verified in the running shell: omarchy-shell notifications keyboard selected the newest card with numbered buttons, ↓ (via wtype) moved the selection to the next card, and Esc released the keyboard. After the rebase onto quattro, pressing 2 ran the second button and released the keyboard. The swapped Super + Ctrl + , / Super + Ctrl + Alt + , bindings and the mouse paths were not exercised live (no pointer injection). notifications-test.sh, i18n-test.sh and qml-text-format-test.sh pass.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest change fixes the repeated-selection problem.

Summary

Adds keyboard control for notifications, numbered action buttons, and updated shortcuts and manuals.

  • Notifications take the keyboard when someone asks them to.
  • Notification buttons and number keys use the same ordered list.
  • Notification buttons show their number and let the card color through.
  • The shorter shortcut controls notifications, and silencing moves to the longer one.

Reviews (4) · Last reviewed commit: "Skip a notification card that gives way ..." · Reviewed by Greptile

Comment thread shell/plugins/notifications/Service.qml Resolved
Comment thread shell/plugins/notifications/Service.qml Resolved
Base automatically changed from notification-actions to quattro October 24, 2026 10:27
Super+Ctrl+comma selects the newest card, opens its deck and gives that
display's notification surface the keyboard: number keys press its buttons,
Enter clicks it, arrows move between cards, Delete dismisses, and Escape,
any choice, a mouse click, the pointer moving to another deck, or ten idle
seconds hand the keyboard back. Notifications never take focus on their
own. Silencing moves to Super+Ctrl+Alt+comma.

The card and the keys share one button list, Delivery.deeds, so the numbers
always match. invokeAction <n> presses a button on the newest card. The
button bar's segments draw their own hairlines, mirrored in right-to-left
languages, so the selection tint covers the whole card, and a label is only
cut short when it cannot fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh force-pushed the notification-keyboard branch from f1df4c2 to eab1528 Compare October 24, 2026 10:31
Comment thread shell/plugins/notifications/Service.qml Resolved
dhh and others added 2 commits October 24, 2026 14:04
The deck does not scroll, so moving the selection down could select a card
below the bottom of the screen and act on it unseen. The keyboard now stops
at the last card that would fit with its deck open, and a dismissal falls
back to the nearest reachable card. Clicking a link in a card's text now
ends keyboard mode too, so the browser it opens gets the keyboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons on screen

Down stopped at the first card of a long deck that did not fit, so the decks
below it, which fit once it collapses, were out of reach. It now skips to the
next card that fits. Selecting a card shows its buttons and can open its
body, so it grows after the check passed; once its height arrives, a card
that no longer fits gives way to the nearest one above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread shell/plugins/notifications/Service.qml Resolved
A card that fits until selection shows its buttons gave way to the card
above, hid its buttons, and was picked again by the next Down, so later
decks were never reached. It is now remembered for the rest of the keyboard
session and skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit f643adc into quattro Oct 24, 2026
2 checks passed
@dhh
dhh deleted the notification-keyboard branch October 24, 2026 13:50
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants