diff --git a/src/components/CommandBar/CommandBar.tsx b/src/components/CommandBar/CommandBar.tsx index 894cc287c..ccb81dc17 100644 --- a/src/components/CommandBar/CommandBar.tsx +++ b/src/components/CommandBar/CommandBar.tsx @@ -28,7 +28,7 @@ export const CommandBar = () => { { name: 'toggle', title: 'Toggle Command Bar', - sequence: 'meta+k', + sequence: 'meta+k g RightButton+shift', action: () => { const type = commandBarState.matches('Closed') ? 'Open' : 'Close' console.log('toggling command bar', type) diff --git a/src/components/InteractionMapMachineProvider.tsx b/src/components/InteractionMapMachineProvider.tsx index 5b036fd03..55ae46f19 100644 --- a/src/components/InteractionMapMachineProvider.tsx +++ b/src/components/InteractionMapMachineProvider.tsx @@ -97,6 +97,8 @@ export function InteractionMapMachineProvider({ ? mapKey(event.data.code) : mouseButtonToName(event.data.button) + console.log('action', action) + // if the key is already a modifier key, skip everything else and reject if (isModifierKey(action)) { // We return an empty string so that we don't clear the currentSequence @@ -121,6 +123,12 @@ export function InteractionMapMachineProvider({ item.sequence.startsWith(searchString) ) + console.log('matches', { + matches, + interactionMap: context.interactionMap, + searchString, + }) + // If we have no matches, reject the promise if (matches.length === 0) { return Promise.reject() diff --git a/src/lib/keyboard.ts b/src/lib/keyboard.ts index ac9730ad6..7da3ed7d5 100644 --- a/src/lib/keyboard.ts +++ b/src/lib/keyboard.ts @@ -28,6 +28,7 @@ const mappedKeys: Record = { } export function mapKey(key: string): string { + if (key.includes('Button')) return key return (mappedKeys[key] || key) .trim() .toLowerCase()