feat: revamped keybinding implementation
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
export function isAppleDevice() {
|
||||
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)
|
||||
}
|
||||
|
||||
export function getPlatformSpecialKey() {
|
||||
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl"
|
||||
return isAppleDevice() ? "⌘" : "Ctrl"
|
||||
}
|
||||
|
||||
export function getPlatformAlternateKey() {
|
||||
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌥" : "Alt"
|
||||
return isAppleDevice() ? "⌥" : "Alt"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user