mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
fix(browser-extension): make the save-memory keyboard shortcut fire
The keydown handler checked event.shiftKey && event.key === "m", but with Shift held the key value is "M", so the condition could never be true and Ctrl/Cmd+Shift+M did nothing on any page. Compare the key case-insensitively instead.
This commit is contained in:
parent
3f7b9667c6
commit
71bc9e8418
1 changed files with 2 additions and 1 deletions
|
|
@ -97,7 +97,8 @@ export function setupGlobalKeyboardShortcut() {
|
|||
if (
|
||||
(event.ctrlKey || event.metaKey) &&
|
||||
event.shiftKey &&
|
||||
event.key === "m"
|
||||
// with Shift held, event.key is "M", never "m"
|
||||
event.key.toLowerCase() === "m"
|
||||
) {
|
||||
event.preventDefault()
|
||||
await saveMemory("keyboard_shortcut")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue