Skip to content
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

Support meta key and home/end shortcuts #78

Merged
merged 3 commits into from
Jul 15, 2024
Merged

Support meta key and home/end shortcuts #78

merged 3 commits into from
Jul 15, 2024

Conversation

Ernxst
Copy link
Contributor

@Ernxst Ernxst commented May 22, 2024

I assumed that this library would support Home and End for going to the top and bottom of the command items but it didn't work. After inspecting the code, I noticed it's supposed to but doesn't actually work because the method (/src/lib/cmdk/command.ts#409) doesn't trigger a state update.

As a result, this also fixes Meta + ArrowUp/ArrowDown to jump to the beginning or end. Since the code is already there I've assumed this was intended to be supported otherwise the updateSelectedToIndex doesn't actually do anything.

Copy link

changeset-bot bot commented May 22, 2024

🦋 Changeset detected

Latest commit: 15b6436

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cmdk-sv Patch

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

Copy link

vercel bot commented May 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmdk-sv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 11:46pm

Copy link
Owner

@huntabyte huntabyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@AdrianGonz97 AdrianGonz97 merged commit f89d5f7 into huntabyte:main Jul 15, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Jul 15, 2024
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.

3 participants