Skip to content

Commit

Permalink
Support meta key and home/end shortcuts (#78)
Browse files Browse the repository at this point in the history
Co-authored-by: AdrianGonz97 <[email protected]>
  • Loading branch information
Ernxst and AdrianGonz97 authored Jul 15, 2024
1 parent 88450c5 commit f89d5f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tame-candles-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'cmdk-sv': patch
---

fix: Support meta key and home/end shortcuts
2 changes: 1 addition & 1 deletion src/lib/cmdk/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
omit,
generateId,
toWritableStores,
isHTMLElement,
isUndefined,
kbd,
removeUndefined,
Expand Down Expand Up @@ -413,6 +412,7 @@ export function createCommand(props: CommandProps) {
const items = getValidItems(rootEl);
const item = items[index];
if (!item) return;
updateState('value', item.getAttribute(VALUE_ATTR) ?? '');
}

function updateSelectedByChange(change: 1 | -1) {
Expand Down

0 comments on commit f89d5f7

Please sign in to comment.