Skip to content

Conversation

@KazariEX
Copy link
Member

@KazariEX KazariEX commented Feb 10, 2026

πŸ”— Linked issue

fix #5982

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

After this fix, the situation in #5982 still require the layoutIndependent option to be enabled.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions bot added the v4 #4488 label Feb 10, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

πŸ“ Walkthrough

Walkthrough

The change adds a modifier key validation check in the shortcut matching logic of defineShortcuts. Specifically, it introduces an additional condition requiring e.altKey to match shortcut.altKey, alongside existing checks for metaKey and ctrlKey. This ensures that shortcuts defined with the Alt modifier (e.g., alt_g) only trigger when the Alt key state matches the configured requirement, preventing unintended activation when the Alt key is not pressed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title accurately describes the main change: adding an alt key guard to the defineShortcuts function to fix the bug where alt shortcuts were firing without the Alt key.
Linked Issues check βœ… Passed The PR directly addresses issue #5982 by adding an altKey guard in defineShortcuts.ts, ensuring alt_* shortcuts only activate when the Alt modifier is actually pressed.
Out of Scope Changes check βœ… Passed The three-line change is entirely scoped to fixing the alt key guard issue in defineShortcuts, with no unrelated modifications present.
Description check βœ… Passed The PR description clearly references the linked issue #5982 and explains the bug fix context regarding the alt key modifier behavior.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 10, 2026

npm i https://pkg.pr.new/@nuxt/ui@6020

commit: 9613fde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

defineShortcuts alt_g should not work without alt

1 participant