mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-11 14:10:15 -07:00
Shortcuts: Esc comes first
This commit is contained in:
@@ -6,7 +6,7 @@ import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
||||
import MinimizeIcon from '@mui/icons-material/Minimize';
|
||||
|
||||
// import { isMacUser } from '~/common/util/pwaUtils';
|
||||
import type { ShortcutObject } from '~/common/components/shortcuts/useGlobalShortcuts';
|
||||
import { ShortcutKey, ShortcutObject } from '~/common/components/shortcuts/useGlobalShortcuts';
|
||||
import { ConfirmationModal } from '~/common/components/modals/ConfirmationModal';
|
||||
import { GoodTooltip } from '~/common/components/GoodTooltip';
|
||||
import { useGlobalShortcutsStore } from '~/common/components/shortcuts/store-global-shortcuts';
|
||||
@@ -181,6 +181,10 @@ export function StatusBar(props: { toggleMinimized?: () => void, isMinimized?: b
|
||||
if (aModifiers !== bModifiers)
|
||||
return aModifiers - bModifiers;
|
||||
|
||||
// 3a. Special case for ShortcutKey.Esc, at the beginning
|
||||
if (a.key === ShortcutKey.Esc) return -1;
|
||||
if (b.key === ShortcutKey.Esc) return 1;
|
||||
|
||||
// 3. Special case for 'Beam Edit'
|
||||
if (a.description === 'Beam Edit') return 1;
|
||||
if (b.description === 'Beam Edit') return -1;
|
||||
|
||||
Reference in New Issue
Block a user