Use utility & fixup dependency array
This commit is contained in:
parent
ef67a98c20
commit
2ff0d87309
2 changed files with 19 additions and 17 deletions
|
@ -14,7 +14,7 @@ import type { ContextMenuTriggerType } from '../components/conversation/MessageC
|
|||
|
||||
type KeyboardShortcutHandlerType = (ev: KeyboardEvent) => boolean;
|
||||
|
||||
function isCmdOrCtrl(ev: KeyboardEvent): boolean {
|
||||
export function isCmdOrCtrl(ev: KeyboardEvent): boolean {
|
||||
const { ctrlKey, metaKey } = ev;
|
||||
const commandKey = get(window, 'platform') === 'darwin' && metaKey;
|
||||
const controlKey = get(window, 'platform') !== 'darwin' && ctrlKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue