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.

Swap keyboard shortcut behavior in Launcher menu (#1024)

Jacob Beckerman959f983dab27
diff --git a/js/app/packages/app/component/Launcher.tsx b/js/app/packages/app/component/Launcher.tsx
index e0a22d64a0..8b82dfc858 100644
--- a/js/app/packages/app/component/Launcher.tsx
+++ b/js/app/packages/app/component/Launcher.tsx
@@ -105,13 +105,13 @@ type CreatableBlock = Omit<HotkeyRegistrationOptions, 'scopeId'> & {
export const CREATABLE_BLOCKS: CreatableBlock[] = [
{
- label: 'Note',
+ label: 'Docs',
icon: () => <WideFileMd />,
- description: 'Create note',
+ description: 'Create doc',
blockName: 'md',
hotkeyToken: TOKENS.create.note,
altHotkeyToken: TOKENS.create.noteNewSplit,
- hotkey: 'n',
+ hotkey: 'd',
keyDownHandler: () => {
createBlock({
blockName: 'md',
@@ -122,7 +122,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
content: '',
projectId: undefined,
}),
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -158,7 +158,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
keyDownHandler: () => {
createComponent({
componentId: 'email-compose',
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -174,7 +174,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
keyDownHandler: () => {
createComponent({
componentId: 'channel-compose',
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -197,7 +197,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
}
return result.chatId;
},
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -209,7 +209,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
blockName: 'canvas',
hotkeyToken: TOKENS.create.canvas,
altHotkeyToken: TOKENS.create.canvasNewSplit,
- hotkey: 'd',
+ hotkey: 'n',
keyDownHandler: () => {
createBlock({
blockName: 'canvas',
@@ -223,7 +223,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
const [_, id] = ok(result.documentId);
return id;
},
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -243,7 +243,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
const createProject = useCreateProject();
return createProject({ name: 'New Folder' });
},
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -270,7 +270,7 @@ export const CREATABLE_BLOCKS: CreatableBlock[] = [
const [, id] = ok(result[1]?.documentId);
return id;
},
- shouldInsert: pressedKeys().has('opt'),
+ shouldInsert: !pressedKeys().has('opt'),
});
return true;
},
@@ -451,7 +451,7 @@ const LauncherInner = (props: LauncherInnerProps) => {
hotkeyToken: item.altHotkeyToken,
hotkey: `opt+${item.hotkey}` as ValidHotkey,
scopeId: launcherScope,
- description: `${item.description} in new split`,
+ description: `${item.description} in current split`,
keyDownHandler: () => {
item.keyDownHandler();
props.onClose();
@@ -498,7 +498,7 @@ const LauncherInner = (props: LauncherInnerProps) => {
registerHotkey({
hotkey: 'enter',
scopeId: launcherScope,
- description: 'Open in current split',
+ description: 'Open in new split',
keyDownHandler: () => {
CREATABLE_BLOCKS[focusedIndex()].keyDownHandler();
props.onClose();
@@ -511,7 +511,7 @@ const LauncherInner = (props: LauncherInnerProps) => {
registerHotkey({
hotkey: 'opt+enter' as ValidHotkey,
scopeId: launcherScope,
- description: 'Open in new split',
+ description: 'Open in current split',
keyDownHandler: () => {
CREATABLE_BLOCKS[focusedIndex()].keyDownHandler();
props.onClose();
@@ -568,7 +568,7 @@ const LauncherInner = (props: LauncherInnerProps) => {
</For>
</div>
<div class="col-span-full text-sm text-ink-muted text-center pt-4">
- Hold option to open in a new split view
+ Hold option to open in current split
</div>
</div>
);