Skip to content

Scope notification.acceptPrimaryAction keybinding to screen reader users#320149

Merged
meganrogge merged 2 commits into
mainfrom
copilot/cmd-shift-a-keybinding-conflict
Jun 5, 2026
Merged

Scope notification.acceptPrimaryAction keybinding to screen reader users#320149
meganrogge merged 2 commits into
mainfrom
copilot/cmd-shift-a-keybinding-conflict

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 5, 2026

Description

cmd+shift+A was claimed by both notification.acceptPrimaryAction and agents.openVSCodeWindow, causing accidental (and dangerous) acceptance of notification primary actions.

This scopes notification.acceptPrimaryAction to screen reader users — its original audience — freeing the binding for agents.openVSCodeWindow everyone else.

  • notificationsCommands.ts: gate the keybinding behind CONTEXT_ACCESSIBILITY_MODE_ENABLED, AND-combined with the existing focus/toast-visibility conditions:
when: ContextKeyExpr.and(
    CONTEXT_ACCESSIBILITY_MODE_ENABLED,
    ContextKeyExpr.or(NotificationFocusedContext, NotificationsToastsVisibleContext)
),

The command remains available via the Command Palette for all users; only the keybinding is now conditional on accessibility mode.

Copilot AI requested review from Copilot and removed request for Copilot June 5, 2026 17:32
Copilot AI linked an issue Jun 5, 2026 that may be closed by this pull request
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot June 5, 2026 17:37
Copilot AI changed the title [WIP] Fix cmd+shift+A keybinding conflict for notifications Scope notification.acceptPrimaryAction keybinding to screen reader users Jun 5, 2026
Copilot AI requested a review from meganrogge June 5, 2026 17:38
@meganrogge meganrogge added this to the 1.124.0 milestone Jun 5, 2026
@meganrogge meganrogge marked this pull request as ready for review June 5, 2026 17:52
Copilot AI review requested due to automatic review settings June 5, 2026 17:52
@meganrogge meganrogge enabled auto-merge (squash) June 5, 2026 17:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves a keybinding conflict by restricting notification.acceptPrimaryAction (Cmd/Ctrl+Shift+A) to screen reader optimized mode (accessibilityModeEnabled), freeing the shortcut for agents.openVSCodeWindow for non-screen-reader users.

Changes:

  • Gate notification.acceptPrimaryAction keybinding behind CONTEXT_ACCESSIBILITY_MODE_ENABLED while preserving existing notification focus/toast visibility conditions.
  • Add the required accessibility context key import in the notifications commands registration file.
Show a summary per file
File Description
src/vs/workbench/browser/parts/notifications/notificationsCommands.ts Scopes the notification.acceptPrimaryAction keybinding to accessibilityModeEnabled to avoid Cmd/Ctrl+Shift+A collisions for most users.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

@meganrogge meganrogge merged commit c4fa031 into main Jun 5, 2026
26 checks passed
@meganrogge meganrogge deleted the copilot/cmd-shift-a-keybinding-conflict branch June 5, 2026 18:15
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.

cmd+shift+A keybinding conflict

4 participants