ui
ui copied to clipboard
Does the Command component work for windows?
I see that the command component in the docs is using the mac command icon ⌘. However, even for functionality, I can't get it to work with cntrl or shift.
Was it supposed to work on windows? If so, how can I get it to work?
On Windows the META key is the Window (⊞) key. On Mac machines the META key is the Cmd (⌘) key I encountered the same problem specifically when I used the Chrome browser, for some reason the shortcut dose not work, but I found solution to the problem by changing the shortcut to this const down = (e: KeyboardEvent) => { if (e.ctrlKey && e.shiftKey && e.key === "k") { setOpen((open) => !open); } }; and it work
Right now I am looking for the reason it dose not work with the shortcut (e.key === "j" && e.metaKey)
@MohamedMujtaba cntrl + k opens up Chrome's search bar. How did you fix it?
I tried using e.preventDeafult() but this breaks and I can't use my keyboard to type anymore
@dBianchii not just cntrl + k replace your if statement with this (e.ctrlKey && e.shiftKey && (e.key === "k" || e.key === "K"))
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.