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

add feature to search with Ctrl + k #1205

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

AuenKr
Copy link

@AuenKr AuenKr commented Sep 12, 2024

PR Fixes:

  • Added Ctrl + K to the search box

Before:

ctrlBefore.mp4

After:

2024-09-12_16-53-59.mp4

Checklist before requesting a review

  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue

@AuenKr
Copy link
Author

AuenKr commented Sep 12, 2024

@hkirat

@manuarora700 asked for this feature in your resume roasting video
So here it is...

@AuenKr
Copy link
Author

AuenKr commented Sep 14, 2024

@siinghd @devsargam

@devsargam
Copy link
Collaborator

Can u implement this beautiful library? https://cmdk.paco.me/

@devsargam
Copy link
Collaborator

Other than that pr is good

@manuarora700
Copy link

manuarora700 commented Sep 14, 2024 via email

@AuenKr
Copy link
Author

AuenKr commented Sep 15, 2024

@devsargam added shadcn commandk component

@AuenKr
Copy link
Author

AuenKr commented Sep 19, 2024

@devsargam any other feedback?

@devsargam
Copy link
Collaborator

Let me check this pr by eod

@AuenKr
Copy link
Author

AuenKr commented Sep 23, 2024

Let me check this pr by eod

@devsargam

mr-bean-mrbean.gif

@devsargam
Copy link
Collaborator

lol sorry sir

@devsargam devsargam self-assigned this Sep 23, 2024
const handleKeyPress = (event: KeyboardEvent) => {
switch (event.code) {
case 'KeyK':
if (event.ctrlKey) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are just checking with ctrl key but as the name suggests it should also support ⌘K on mac

src/components/search/SearchBar.tsx Outdated Show resolved Hide resolved
src/components/search/SearchBar.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@devsargam devsargam left a comment

Choose a reason for hiding this comment

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

You probably forgot to add package.json

@AuenKr
Copy link
Author

AuenKr commented Sep 25, 2024

Added cmd K for MacOs also

@devsargam
Copy link
Collaborator

can u flix conflicts @AuenKr?

@AuenKr
Copy link
Author

AuenKr commented Sep 26, 2024

@devsargam resolves the conflict.
But seems like #1270 is also adding this with other features also.

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