Skip to content

fix(settings): make shortcut recording keyboard accessible - #1497

Open
mydd7 wants to merge 1 commit into
crynta:mainfrom
mydd7:fix/keyboard-shortcut-recording
Open

mydd7 wants to merge 1 commit into
crynta:mainfrom
mydd7:fix/keyboard-shortcut-recording

Conversation

@mydd7

@mydd7 mydd7 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Shortcut settings used a click-only element to start recording and then captured keys across the whole window. Use a native button that keeps focus while it records. Enter and Space start recording; Escape and moving focus cancel it without changing the binding. Reset and Clear now identify the shortcut they act on, and Clear is visible when tabbing through the row.

Validated with lint, type checking, a production frontend build, 91 shortcut and settings tests, and a Chromium smoke test for keyboard activation, focus, cancellation and saving.

Summary by CodeRabbit

  • New Features
    • Keyboard shortcuts can now be recorded directly from their focused controls. Escape cancels recording, and recording stops if the control loses focus.
    • Shortcut recording ignores repeated, composing, modifier-only, and unsupported unmodified key presses.
    • Reset and clear controls are hidden while recording, and shortcut controls provide clearer accessible labels.

@mydd7
mydd7 requested a review from crynta as a code owner November 16, 2026 07:52
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Shortcut rows now record keys through a focused button instead of a global listener. The handler applies key filtering and cancellation rules. The button shows recording status and the current binding, and reset and clear controls are hidden during recording.

Changes: Shortcut Recording

Layer / File(s) Summary
Focused shortcut recording
src/settings/sections/ShortcutsSection.tsx
The row button starts recording and receives focus. Its keydown handler rejects repeated, composing, and modifier-only events, preserves unmodified Tab for navigation, and cancels on Escape. Accepted keys are stored with modifier flags. The button displays recording status or the current binding; reset and clear controls are hidden while recording. Accessible labels describe the controls and shortcut.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: Minimal · up to 6c9b1

Shortcut recording now works from the keyboard through a native button, and Reset and Clear are labelled for the shortcut they affect. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the Conventional Commits format (type fix, scope settings) that the configured requirement asks for. It clearly names the main change: shortcut recording in settings becomes keyboard ac…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title uses the Conventional Commits format (type fix, scope settings) that the configured requirement asks for. It clearly names the main change: shortcut recording in settings becomes keyboard accessible. This matches the summary, which replaces the click-only Recorder with a focused button that handles Enter/Space activation, Escape cancellation, and labelled reset and clear controls.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b217c43 and 6c9b12c.

Files selected for processing: 1

  • src/settings/sections/ShortcutsSection.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

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.

1 participant