Skip to content

feat: cleanup hotkeys#1626

Merged
tyler-dane merged 1 commit intomainfrom
cursor/duplicate-event-functionality-a26e
Apr 6, 2026
Merged

feat: cleanup hotkeys#1626
tyler-dane merged 1 commit intomainfrom
cursor/duplicate-event-functionality-a26e

Conversation

@tyler-dane
Copy link
Copy Markdown
Contributor

@tyler-dane tyler-dane commented Apr 6, 2026

Note

Medium Risk
Hotkey handling is refactored from ad-hoc DOM keydown listeners/handlers to useAppHotkey, which can subtly change shortcut scoping and event behavior (focus/typing fields, preventDefault/propagation). Impacts core keyboard flows in the calendar sidebar and grid scrolling.

Overview
Refactors calendar keyboard shortcuts to use the shared useAppHotkey hook instead of component-level onKeyDown/window listeners.

In SomedayEventContainer, Enter-to-edit and Meta+Ctrl+ArrowUp/Down migrations are now registered as focus-gated hotkeys, and SomedayEvent no longer accepts/passes an onKeyDown prop. In useScroll, the "c" shortcut to scroll to “now” is moved to useAppHotkey, and related tests are updated to use fireEvent.focus for focus setup.

Reviewed by Cursor Bugbot for commit 230ed4f. Bugbot is set up for automated code reviews on this repo. Configure here.

@tyler-dane tyler-dane merged commit 1e04daa into main Apr 6, 2026
9 checks passed
@tyler-dane tyler-dane deleted the cursor/duplicate-event-functionality-a26e branch April 6, 2026 02:24
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