mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
handle space and plus in hotkeys
This commit is contained in:
parent
a497618ea4
commit
21c56590a5
@ -28,7 +28,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: var(--theme--bg_card);
|
background: var(--theme--tag_default) !important;
|
||||||
box-shadow: var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 0px 0px 1px,
|
box-shadow: var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 0px 0px 1px,
|
||||||
var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 2px 4px !important;
|
var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 2px 4px !important;
|
||||||
|
|
||||||
|
@ -187,6 +187,8 @@ const triggerHotkeyListener = (event, hotkey) => {
|
|||||||
const pressed = modifiers[modifier].includes(key) && event[modifier];
|
const pressed = modifiers[modifier].includes(key) && event[modifier];
|
||||||
if (pressed) return true;
|
if (pressed) return true;
|
||||||
}
|
}
|
||||||
|
if (key === 'space') key = ' ';
|
||||||
|
if (key === 'plus') key = '+';
|
||||||
if (key === event.key.toLowerCase()) return true;
|
if (key === event.key.toLowerCase()) return true;
|
||||||
});
|
});
|
||||||
if (pressed) hotkey.callback(event);
|
if (pressed) hotkey.callback(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user