Skip to content

feat: add API preference keyboard shortcut#3438

Open
eeminionn wants to merge 1 commit into
vuejs:mainfrom
eeminionn:feat/api-preference-hotkey
Open

feat: add API preference keyboard shortcut#3438
eeminionn wants to merge 1 commit into
vuejs:mainfrom
eeminionn:feat/api-preference-hotkey

Conversation

@eeminionn

Copy link
Copy Markdown

Description of Problem

Switching between Options API and Composition API currently requires using the sidebar control. This makes repeated comparisons slower for readers moving through examples.

Closes #1409

Proposed Solution

  • add Alt+Shift+A as a site-wide API preference shortcut
  • ignore repeated key events and editable fields such as search and code inputs
  • expose the shortcut through aria-keyshortcuts and the switch tooltip
  • centralize preference updates so pointer and keyboard interactions share the same behavior

Additional Information

Validation performed:

  • pnpm@10.33.0 run build
  • browser-tested on the Introduction page and interactive Tutorial
  • verified the shortcut changes the preference once and does not fire inside the search input
  • git diff --check

pnpm run type currently reaches an unrelated error in .vitepress/config.ts:795; none of the files in this PR are reported by the type checker.

@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 1b3a3b5
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/6a63c75614c9290008d2a0b6
😎 Deploy Preview https://deploy-preview-3438--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Hotkey for switching Option/Composition toggle

1 participant