Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

Enhance Cmd+Escape hotkey to navigate home when not in split (#1261)

Jacob Beckermanf2f001b7e211
diff --git a/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts b/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts
index 43c43864b0..daf12e35dd 100644
--- a/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts
+++ b/js/app/packages/app/component/split-layout/registerSplitHotkeys.ts
@@ -47,13 +47,21 @@ export function registerSplitHotkeys(args: {
registerHotkey({
scopeId: splitHotkeyScope,
hotkey: 'cmd+escape',
- condition: () => getSplitCount() > 1,
- description: `Close split`,
+ condition: () => getSplitCount() > 1 || isNotUnifiedList(),
+ description: () => (getSplitCount() > 1 ? 'Close split' : 'Go home'),
keyDownHandler: () => {
- closeSplit();
+ if (getSplitCount() > 1) {
+ closeSplit();
+ } else {
+ replaceSplit({
+ content: { type: 'component', id: 'unified-list' },
+ referredFrom: 'hotkey',
+ });
+ }
return true;
},
hotkeyToken: TOKENS.split.close,
+ runWithInputFocused: true,
});
// Spotlight (maximize split) - legacy binding.