Skip to content

Commit

Permalink
fix: keyboard shortcut conflict for opening QuickSearch (#141)
Browse files Browse the repository at this point in the history
- support for ctrl+k on windows

Co-authored-by: Davis SHYAKA <[email protected]>
  • Loading branch information
shyakadavis and shyakadavis authored Nov 24, 2023
1 parent 2631448 commit f5ed56f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/svelte-ux/src/lib/components/QuickSearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
*/
function onKeyDown(e: KeyboardEvent) {
if (e.key === 'k' && e.metaKey) {
open = true;
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
e.preventDefault();
open = !open;
}
}
</script>
Expand Down

1 comment on commit f5ed56f

@vercel
Copy link

@vercel vercel bot commented on f5ed56f Nov 24, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.