From f1e2fc2991a4c37264402dac12d7ee1f40208098 Mon Sep 17 00:00:00 2001 From: Justin Ling Date: Mon, 9 Feb 2026 16:12:08 +0800 Subject: [PATCH] ignore: add Cmd+Up/Down keyboard shortcuts to jump to start/end of prompt text Users can now press Cmd+Up to jump to the beginning of their prompt and Cmd+Down to jump to the end, matching standard text editing behavior in most macOS applications. --- packages/app/src/components/prompt-input.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index da45c351ec7..cd4c18780e1 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -884,6 +884,16 @@ export const PromptInput: Component = (props) => { } if (event.key === "ArrowUp" || event.key === "ArrowDown") { + if (event.metaKey) { + event.preventDefault() + const textLength = promptLength(prompt.current()) + if (event.key === "ArrowUp") { + setCursorPosition(editorRef, 0) + } else { + setCursorPosition(editorRef, textLength) + } + return + } if (event.altKey || event.ctrlKey || event.metaKey) return const { collapsed } = getCaretState() if (!collapsed) return