feat:support mac os shortcut
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { isApple } from './ua'
|
||||
|
||||
export function isMod(evt: KeyboardEvent) {
|
||||
return isApple ? evt.metaKey : evt.ctrlKey
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export const isApple = typeof navigator !== 'undefined' && /Mac OS X/.test(navigator.userAgent)
|
||||
Reference in New Issue
Block a user