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
Add support for toggling the built-in search modal using Ctrl+k
#1596
Conversation
🦋 Changeset detectedLatest commit: ef87b00 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
I liked the current behavior because it didn't shadow Chrome's search shortcut, which is also Ctrl+K. So Ctrl is for the browser and Meta is for the site.
But I agree that this is very ubiquitous
I suppose you will like Ctrl+L 😉 , the PRs great (LGTM by default) |
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.
Thanks for catching and fixing this @HiDeoo! Left one comment, but agree with the code changes 🙌
What kind of changes does this PR include?
Description
Got a few complaints that the shortcut to trigger the search modal was not working on Windows.
Turns out that we are only listening for
/
andcmd + k
but notctrl + k
which is a bit of a standard for web applications.This PR adds support for
ctrl + k
to trigger the search modal and aligns the behavior with the Algolia one (and https://docs.astro.build at the same time).