-
-
Notifications
You must be signed in to change notification settings - Fork 220
fix command menu hotkey #920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Size Change: -2 B (0%) Total Size: 971 kB ℹ️ View Unchanged
|
Deploying livecodes with
|
| Latest commit: |
2554614
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a7a31fb5.livecodes.pages.dev |
| Branch Preview URL: | https://fix-command-menu-hotkey.livecodes.pages.dev |
WalkthroughModified the Ctrl+K command-menu hotkey handler in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/livecodes/core.ts (1)
2858-2870: LGTM! Good defensive fix to prevent command menu conflicts.The addition of
e.altKeyto the guard condition correctly prevents the command menu from opening when Ctrl+Alt+K is pressed. This is consistent with the codebase's pattern of avoiding conflicts with other Ctrl+Alt shortcuts (like Ctrl+Alt+C, Ctrl+Alt+T, etc.).The logic is sound: the command menu should only open for a plain Ctrl+K (or Cmd+K on Mac), not when combined with Shift or Alt modifiers.
Optional: Consider updating the comment.
The comment on lines 2860-2861 mentions preventing Ctrl+Shift+K but doesn't mention Ctrl+Alt+K. You could optionally update it to:
- // do not open the menu if shortcut is Ctrl+Shift+K + // do not open the menu if shortcut is Ctrl+Shift+K or Ctrl+Alt+K
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/livecodes/core.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/livecodes/core.ts (1)
src/livecodes/utils/utils.ts (1)
ctrl(73-73)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Redirect rules - livecodes
- GitHub Check: Header rules - livecodes
- GitHub Check: Pages changed - livecodes
- GitHub Check: build (18.x)
- GitHub Check: build
- GitHub Check: tests (18.x, 3)
- GitHub Check: tests (18.x, 4)
- GitHub Check: tests (18.x, 2)
- GitHub Check: tests (18.x, 5)
- GitHub Check: tests (18.x, 1)
- GitHub Check: build (18.x)
- GitHub Check: Cloudflare Pages
Summary by CodeRabbit