|
|
@ -223,8 +223,8 @@ function openKeyboardShortcutDialog() { |
|
|
|
useEventListener(document, 'keydown', async (e: KeyboardEvent) => { |
|
|
|
useEventListener(document, 'keydown', async (e: KeyboardEvent) => { |
|
|
|
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey |
|
|
|
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey |
|
|
|
if (e.altKey && !e.shiftKey && !cmdOrCtrl) { |
|
|
|
if (e.altKey && !e.shiftKey && !cmdOrCtrl) { |
|
|
|
switch (e.code) { |
|
|
|
switch (e.keyCode) { |
|
|
|
case 'Comma': { |
|
|
|
case 188: { |
|
|
|
// ALT + , |
|
|
|
// ALT + , |
|
|
|
if (isUIAllowed('settings') && !isDrawerOrModalExist()) { |
|
|
|
if (isUIAllowed('settings') && !isDrawerOrModalExist()) { |
|
|
|
e.preventDefault() |
|
|
|
e.preventDefault() |
|
|
@ -236,8 +236,8 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (cmdOrCtrl) { |
|
|
|
if (cmdOrCtrl) { |
|
|
|
switch (e.code) { |
|
|
|
switch (e.key) { |
|
|
|
case 'Slash': |
|
|
|
case '/': |
|
|
|
if (!isDrawerOrModalExist()) { |
|
|
|
if (!isDrawerOrModalExist()) { |
|
|
|
$e('c:shortcut', { key: 'CTRL + /' }) |
|
|
|
$e('c:shortcut', { key: 'CTRL + /' }) |
|
|
|
openKeyboardShortcutDialog() |
|
|
|
openKeyboardShortcutDialog() |
|
|
|