mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 17:53:59 +02:00
update hotkeys util to use isHotkey (#5462)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { isKeyHotkey } from 'is-hotkey'
|
||||
import { isHotkey } from 'is-hotkey'
|
||||
import { IS_APPLE } from './environment'
|
||||
|
||||
/**
|
||||
@@ -53,9 +53,9 @@ const create = (key: string) => {
|
||||
const generic = HOTKEYS[key]
|
||||
const apple = APPLE_HOTKEYS[key]
|
||||
const windows = WINDOWS_HOTKEYS[key]
|
||||
const isGeneric = generic && isKeyHotkey(generic)
|
||||
const isApple = apple && isKeyHotkey(apple)
|
||||
const isWindows = windows && isKeyHotkey(windows)
|
||||
const isGeneric = generic && isHotkey(generic)
|
||||
const isApple = apple && isHotkey(apple)
|
||||
const isWindows = windows && isHotkey(windows)
|
||||
|
||||
return (event: KeyboardEvent) => {
|
||||
if (isGeneric && isGeneric(event)) return true
|
||||
|
Reference in New Issue
Block a user