Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

feat(web): add shortcuts to focus the note title and body (#760)

Dariusz Korytoa554b9fff0c3
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx
index 7af1344c..c71931ed 100644
--- a/apps/web/src/components/EditorPane.tsx
+++ b/apps/web/src/components/EditorPane.tsx
@@ -362,6 +362,8 @@ type EditorPaneProps = {
readingProtectionToggleToken: number;
editorModeToggleToken: number;
outlineToggleToken: number;
+ titleFocusToken?: number;
+ bodyFocusToken?: number;
shortcutSettings: ShortcutSettings;
onSyncRequested: () => Promise<void>;
documentActionRequest?: MemoDocumentActionRequest | null;
@@ -444,6 +446,8 @@ const RichEditorPane = ({
readingProtectionToggleToken,
editorModeToggleToken,
outlineToggleToken,
+ titleFocusToken = 0,
+ bodyFocusToken = 0,
shortcutSettings,
onSyncRequested,
documentActionRequest,
@@ -585,6 +589,9 @@ const RichEditorPane = ({
const handledReadingProtectionToggleTokenRef = useRef(readingProtectionToggleToken);
const handledEditorModeToggleTokenRef = useRef(editorModeToggleToken);
const handledOutlineToggleTokenRef = useRef(outlineToggleToken);
+ const handledTitleFocusTokenRef = useRef(titleFocusToken);
+ const handledBodyFocusTokenRef = useRef(bodyFocusToken);
+ const titleInputRef = useRef<HTMLInputElement>(null);
const handledAiAssistantOpenTokenRef = useRef(aiAssistantOpenToken);
const noteLinkModifier = useMemo(
() => typeof navigator !== "undefined" && /mac|iphone|ipad|ipod/i.test(navigator.platform) ? "⌘" : "Ctrl",
@@ -3297,6 +3304,29 @@ const RichEditorPane = ({
toggleEditorOutline();
}, [editorShortcutBlocked, isMobileViewport, outlineToggleToken, toggleEditorOutline, useMarkdownSourceEditor, useMobilePlainTextEditor]);
+ useEffect(() => {
+ if (handledTitleFocusTokenRef.current === titleFocusToken) return;
+ handledTitleFocusTokenRef.current = titleFocusToken;
+ const input = titleInputRef.current;
+ if (editorShortcutBlocked || effectiveReadOnly || !input) return;
+ input.focus();
+ input.setSelectionRange(input.value.length, input.value.length);
+ }, [editorShortcutBlocked, effectiveReadOnly, titleFocusToken]);
+
+ useEffect(() => {
+ if (handledBodyFocusTokenRef.current === bodyFocusToken) return;
+ handledBodyFocusTokenRef.current = bodyFocusToken;
+ if (editorShortcutBlocked || effectiveReadOnly) return;
+ if (useMobilePlainTextEditor) {
+ focusMobileInputTarget();
+ } else if (useMarkdownSourceEditor) {
+ markdownSourceEditorRef.current?.focus();
+ } else if (isEditorReady(editorRef.current) && editorRef.current.isEditable) {
+ // Without a position Tiptap restores the caret from before the body lost focus.
+ editorRef.current.commands.focus();
+ }
+ }, [bodyFocusToken, editorShortcutBlocked, effectiveReadOnly, focusMobileInputTarget, markdownSourceEditorRef, useMarkdownSourceEditor, useMobilePlainTextEditor]);
+
useEffect(() => {
if (handledSaveAndSyncTokenRef.current === saveAndSyncToken || saveMutationPending) {
return;
@@ -4085,6 +4115,7 @@ const RichEditorPane = ({
)}
titleInput={(
<MemoTitleInput
+ ref={titleInputRef}
className="w-full min-w-0 px-2"
value={title}
readOnly={effectiveReadOnly}
diff --git a/apps/web/src/components/MemoTitleInput.tsx b/apps/web/src/components/MemoTitleInput.tsx
index f3040c94..8bd892ac 100644
--- a/apps/web/src/components/MemoTitleInput.tsx
+++ b/apps/web/src/components/MemoTitleInput.tsx
@@ -1,4 +1,4 @@
-import { useLayoutEffect, useRef, useState, type ComponentPropsWithoutRef } from "react";
+import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState, type ComponentPropsWithoutRef } from "react";
import { cn } from "@/lib/utils";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
@@ -11,7 +11,7 @@ type MemoTitleInputProps = {
value: string;
} & Omit<ComponentPropsWithoutRef<"input">, "onChange" | "value">;
-export const MemoTitleInput = ({
+export const MemoTitleInput = forwardRef<HTMLInputElement, MemoTitleInputProps>(({
ariaLabel,
className,
onValueChange,
@@ -19,8 +19,9 @@ export const MemoTitleInput = ({
readOnly = false,
value,
...props
-}: MemoTitleInputProps) => {
+}, ref) => {
const inputRef = useRef<HTMLInputElement>(null);
+ useImperativeHandle(ref, () => inputRef.current as HTMLInputElement);
const [truncated, setTruncated] = useState(false);
useLayoutEffect(() => {
const input = inputRef.current;
@@ -66,4 +67,6 @@ export const MemoTitleInput = ({
</Tooltip>
</TooltipProvider>
);
-};
+});
+
+MemoTitleInput.displayName = "MemoTitleInput";
diff --git a/apps/web/src/components/NoteWindowApp.tsx b/apps/web/src/components/NoteWindowApp.tsx
index a89163ab..b741d7b8 100644
--- a/apps/web/src/components/NoteWindowApp.tsx
+++ b/apps/web/src/components/NoteWindowApp.tsx
@@ -73,7 +73,7 @@ export const NoteWindowApp = ({ memoId }: { memoId: string }) => {
const [shortcutSettings] = useState(readShortcutSettingsPreference);
const [imageCompressionEnabled] = useState(readImageCompressionPreference);
const [focusMode, setFocusMode] = useState(false);
- const [tokens, setTokens] = useState({ search: 0, replace: 0, ai: 0, saveAndSync: 0, readingProtection: 0, editorMode: 0, outline: 0 });
+ const [tokens, setTokens] = useState({ search: 0, replace: 0, ai: 0, saveAndSync: 0, readingProtection: 0, editorMode: 0, outline: 0, title: 0, body: 0 });
const [closeError, setCloseError] = useState(false);
const pendingSaveRef = useRef<(() => Promise<boolean>) | null>(null);
const closeFailedRef = useRef(false);
@@ -141,7 +141,9 @@ export const NoteWindowApp = ({ memoId }: { memoId: string }) => {
: action === "toggleReadingProtection" ? "readingProtection"
: action === "toggleEditorMode" ? "editorMode"
: action === "toggleOutline" ? "outline"
- : null;
+ : action === "focusTitle" ? "title"
+ : action === "focusBody" ? "body"
+ : null;
if (!key) return;
event.preventDefault();
setTokens((current) => ({ ...current, [key]: current[key] + 1 }));
@@ -216,6 +218,8 @@ export const NoteWindowApp = ({ memoId }: { memoId: string }) => {
readingProtectionToggleToken={tokens.readingProtection}
editorModeToggleToken={tokens.editorMode}
outlineToggleToken={tokens.outline}
+ titleFocusToken={tokens.title}
+ bodyFocusToken={tokens.body}
onSyncRequested={async () => bridge?.notifyNoteWindowSaved?.()}
onOpenMemo={openInMainWindow}
onOpenCompanionNote={openInMainWindow}
diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsx
index 5f99a662..7b7c3760 100644
--- a/apps/web/src/components/WorkspaceApp.tsx
+++ b/apps/web/src/components/WorkspaceApp.tsx
@@ -566,6 +566,8 @@ export const WorkspaceApp = ({
const [noteReadingProtectionToggleToken, setNoteReadingProtectionToggleToken] = useState(0);
const [noteEditorModeToggleToken, setNoteEditorModeToggleToken] = useState(0);
const [noteOutlineToggleToken, setNoteOutlineToggleToken] = useState(0);
+ const [noteTitleFocusToken, setNoteTitleFocusToken] = useState(0);
+ const [noteBodyFocusToken, setNoteBodyFocusToken] = useState(0);
const [search, setSearch] = useState("");
const [memoFilterMode, setMemoFilterMode] = useState<MemoFilterMode>("all");
const [memoSortMode, setMemoSortMode] = useState<MemoSortMode>(readMemoSortPreference);
@@ -3057,6 +3059,8 @@ export const WorkspaceApp = ({
|| action === "toggleReadingProtection"
|| action === "toggleEditorMode"
|| action === "toggleOutline"
+ || action === "focusTitle"
+ || action === "focusBody"
|| action === "openPreviousMemo"
|| action === "openNextMemo"
) {
@@ -3078,6 +3082,10 @@ export const WorkspaceApp = ({
setNoteEditorModeToggleToken((value) => value + 1);
} else if (action === "toggleOutline") {
setNoteOutlineToggleToken((value) => value + 1);
+ } else if (action === "focusTitle") {
+ setNoteTitleFocusToken((value) => value + 1);
+ } else if (action === "focusBody") {
+ setNoteBodyFocusToken((value) => value + 1);
} else {
const targetMemoId = action === "openPreviousMemo" ? previousMemoId : nextMemoId;
if (targetMemoId) {
@@ -3932,6 +3940,8 @@ export const WorkspaceApp = ({
readingProtectionToggleToken={noteReadingProtectionToggleToken}
editorModeToggleToken={noteEditorModeToggleToken}
outlineToggleToken={noteOutlineToggleToken}
+ titleFocusToken={noteTitleFocusToken}
+ bodyFocusToken={noteBodyFocusToken}
shortcutSettings={shortcutSettings}
onSyncRequested={syncMemosManually}
documentActionRequest={memoDocumentActionRequest}
diff --git a/apps/web/src/lib/app-helpers.test.mjs b/apps/web/src/lib/app-helpers.test.mjs
index a99c7575..8ad538c5 100644
--- a/apps/web/src/lib/app-helpers.test.mjs
+++ b/apps/web/src/lib/app-helpers.test.mjs
@@ -29,6 +29,7 @@ import {
getCreateMemoNotebookId,
formatShortcutBinding,
getShortcutActionForEvent,
+ getShortcutActionOptions,
isPrimaryModifierPressed,
shortcutBindingFromKeyboardEvent,
shortcutBindingsEqual,
@@ -850,6 +851,80 @@ describe("workspace shortcut preferences", () => {
const workspaceSource = readFileSync(new URL("../components/WorkspaceApp.tsx", import.meta.url), "utf8");
expect(workspaceSource).toContain("canToggleNotebookSidebar({ isDesktop, focusModeActive: desktopFocusModeActive })");
});
+
+ test("focuses the note title and body with Primary+Alt+T and Primary+Alt+B", () => {
+ const keyboardEvent = (key, code, modifiers = {}) => ({
+ key,
+ code,
+ ctrlKey: false,
+ metaKey: false,
+ shiftKey: false,
+ altKey: false,
+ ...modifiers,
+ });
+
+ expect(DEFAULT_SHORTCUT_SETTINGS.focusTitle).toEqual({ key: "t", ctrlOrMeta: true, shift: false, alt: true });
+ expect(DEFAULT_SHORTCUT_SETTINGS.focusBody).toEqual({ key: "b", ctrlOrMeta: true, shift: false, alt: true });
+ expect(formatShortcutBinding(DEFAULT_SHORTCUT_SETTINGS.focusTitle, "Win32")).toBe("Ctrl + Alt + T");
+ expect(formatShortcutBinding(DEFAULT_SHORTCUT_SETTINGS.focusBody, "MacIntel")).toBe("⌘⌥B");
+
+ expect(getShortcutActionForEvent(
+ keyboardEvent("t", "KeyT", { ctrlKey: true, altKey: true }),
+ DEFAULT_SHORTCUT_SETTINGS,
+ "Win32",
+ )).toBe("focusTitle");
+ expect(getShortcutActionForEvent(
+ keyboardEvent("b", "KeyB", { ctrlKey: true, altKey: true }),
+ DEFAULT_SHORTCUT_SETTINGS,
+ "Linux",
+ )).toBe("focusBody");
+ // macOS reports the Option character, not the letter, for ⌘⌥T and ⌘⌥B.
+ expect(getShortcutActionForEvent(
+ keyboardEvent("†", "KeyT", { metaKey: true, altKey: true }),
+ DEFAULT_SHORTCUT_SETTINGS,
+ "MacIntel",
+ )).toBe("focusTitle");
+ expect(getShortcutActionForEvent(
+ keyboardEvent("∫", "KeyB", { metaKey: true, altKey: true }),
+ DEFAULT_SHORTCUT_SETTINGS,
+ "MacIntel",
+ )).toBe("focusBody");
+ // On Windows Ctrl+Alt is AltGr: a layout that types "{" there keeps typing it.
+ expect(getShortcutActionForEvent(
+ keyboardEvent("{", "KeyB", { ctrlKey: true, altKey: true }),
+ DEFAULT_SHORTCUT_SETTINGS,
+ "Win32",
+ )).toBeNull();
+ // Tiptap keeps Mod-Shift-B for blockquotes.
+ expect(getShortcutActionForEvent(
+ keyboardEvent("b", "KeyB", { ctrlKey: true, shiftKey: true }),
+ DEFAULT_SHORTCUT_SETTINGS,
+ "Win32",
+ )).toBeNull();
+ });
+
+ test("adds the focus actions to legacy settings and lists them in Settings", () => {
+ const values = installLocalStorage();
+ values.set(SHORTCUT_SETTINGS_STORAGE_KEY, JSON.stringify({
+ toggleSidebar: { key: "b", ctrlOrMeta: true, shift: false, alt: false },
+ }));
+ const settings = readShortcutSettingsPreference();
+ expect(settings.focusTitle).toEqual(DEFAULT_SHORTCUT_SETTINGS.focusTitle);
+ expect(settings.focusBody).toEqual(DEFAULT_SHORTCUT_SETTINGS.focusBody);
+ expect(getShortcutActionOptions((key) => key).map((option) => option.value)).toEqual(Object.keys(DEFAULT_SHORTCUT_SETTINGS));
+ });
+
+ test("routes the focus shortcuts to the note editor in both windows", () => {
+ const workspaceSource = readFileSync(new URL("../components/WorkspaceApp.tsx", import.meta.url), "utf8");
+ const noteWindowSource = readFileSync(new URL("../components/NoteWindowApp.tsx", import.meta.url), "utf8");
+ const editorSource = readFileSync(new URL("../components/EditorPane.tsx", import.meta.url), "utf8");
+ expect(workspaceSource).toContain("titleFocusToken={noteTitleFocusToken}");
+ expect(workspaceSource).toContain("bodyFocusToken={noteBodyFocusToken}");
+ expect(noteWindowSource).toContain("titleFocusToken={tokens.title}");
+ expect(noteWindowSource).toContain("bodyFocusToken={tokens.body}");
+ expect(editorSource).toContain("ref={titleInputRef}");
+ expect(editorSource).toContain("markdownSourceEditorRef.current?.focus()");
+ });
});
describe("selection move target", () => {
diff --git a/apps/web/src/lib/app-helpers.ts b/apps/web/src/lib/app-helpers.ts
index 59fc3f2d..aa0862e1 100644
--- a/apps/web/src/lib/app-helpers.ts
+++ b/apps/web/src/lib/app-helpers.ts
@@ -26,7 +26,9 @@ export type ShortcutAction =
| "toggleReadingProtection"
| "toggleEditorMode"
| "toggleOutline"
- | "toggleSidebar";
+ | "toggleSidebar"
+ | "focusTitle"
+ | "focusBody";
export type ShortcutBinding = {
key: string;
// Defaults and shortcuts saved before Control and Command were stored apart.
@@ -213,6 +215,8 @@ export const getShortcutActionOptions = (
{ value: "toggleEditorMode", label: t("shortcuts.actions.toggleEditorMode.label") },
{ value: "toggleOutline", label: t("shortcuts.actions.toggleOutline.label") },
{ value: "toggleSidebar", label: t("shortcuts.actions.toggleSidebar.label") },
+ { value: "focusTitle", label: t("shortcuts.actions.focusTitle.label") },
+ { value: "focusBody", label: t("shortcuts.actions.focusBody.label") },
];
export const DEFAULT_SHORTCUT_SETTINGS: ShortcutSettings = {
@@ -230,6 +234,8 @@ export const DEFAULT_SHORTCUT_SETTINGS: ShortcutSettings = {
toggleEditorMode: { key: "/", ctrlOrMeta: true, shift: false, alt: false },
toggleOutline: { key: "1", ctrlOrMeta: true, shift: true, alt: false },
toggleSidebar: { key: "\\", ctrlOrMeta: true, shift: false, alt: false },
+ focusTitle: { key: "t", ctrlOrMeta: true, shift: false, alt: true },
+ focusBody: { key: "b", ctrlOrMeta: true, shift: false, alt: true },
};
const LEGACY_READING_PROTECTION_SHORTCUT: ShortcutBinding = {
@@ -258,6 +264,8 @@ const SHORTCUT_ACTION_VALUES: ShortcutAction[] = [
"toggleEditorMode",
"toggleOutline",
"toggleSidebar",
+ "focusTitle",
+ "focusBody",
];
export const isDefaultMemoTitle = (title: string | null | undefined) => title?.trim() === DEFAULT_MEMO_TITLE;
@@ -714,7 +722,13 @@ export const shortcutBindingFromKeyboardEvent = (
platform = readShortcutPlatform(),
): ShortcutBinding | null => {
const digitKey = typeof event.code === "string" ? /^Digit([0-9])$/.exec(event.code)?.[1] : undefined;
- const key = digitKey ?? normalizeShortcutKey(event.key);
+ // On Apple keyboards Option rewrites the key value (⌘⌥T reports "†"), so
+ // read the physical letter there, as the shortcut recorder does. Elsewhere
+ // Ctrl+Alt is AltGr and must keep typing its character.
+ const optionLetterKey = event.altKey && isAppleShortcutPlatform(platform) && !/^[a-z]$/i.test(event.key) && typeof event.code === "string"
+ ? /^Key([A-Z])$/.exec(event.code)?.[1]?.toLowerCase()
+ : undefined;
+ const key = digitKey ?? optionLetterKey ?? normalizeShortcutKey(event.key);
if (["control", "meta", "shift", "alt", "escape"].includes(key)) {
return null;
diff --git a/docs/changes/2026-11-02-focus-title-body-shortcuts.md b/docs/changes/2026-11-02-focus-title-body-shortcuts.md
new file mode 100644
index 00000000..c158a765
--- /dev/null
+++ b/docs/changes/2026-11-02-focus-title-body-shortcuts.md
@@ -0,0 +1,30 @@
+# Keyboard shortcuts to focus the note title and body
+
+[简体中文](2026-11-02-focus-title-body-shortcuts.zh-CN.md)
+
+Related Issue: #759
+
+## Problem and outcome
+
+After switching notes or searching, moving the caret to the title or the body of the current note needs the mouse. Add two configurable shortcut actions, **Focus note title** and **Focus note body**, to the existing shortcut system so they appear in Settings → Shortcuts and can be re-recorded like the other actions.
+
+## Behavior
+
+1. Defaults: `⌘⌥T` / `Ctrl+Alt+T` for the title and `⌘⌥B` / `Ctrl+Alt+B` for the body. They do not overlap the existing EdgeEver defaults or the Tiptap/CodeMirror keymaps (`Mod-Shift-B` blockquote, `Mod-Alt-1…6` headings, `Mod-Alt-C` code block).
+2. Both actions work from anywhere in the workspace while a text note is open, including the search field and the note list. The title action places the caret at the end of the title. The body action focuses the rich-text editor (Tiptap restores the previous caret) or the Markdown source editor, depending on the current mode; the mobile plain-text editor is handled the same way.
+3. Nothing happens for read-only notes (trash, reading protection), while a dialog that blocks editor shortcuts is open, or when no note is selected. Table, diagram, poster and infographic notes ignore the actions.
+4. The standalone desktop note window handles the same actions.
+5. On Apple keyboards Option changes the reported key (`⌘⌥T` reports `†`), so matching falls back to the physical letter from `event.code` when Option is held, as the shortcut recorder already does. Other platforms keep matching the produced character, so layouts that type a character with AltGr (`Ctrl+Alt`) keep typing it.
+
+## Boundaries, risks and recovery
+
+The change is client-only: shortcut settings stay in the existing `edgeever.shortcutSettings` local preference, and older stored settings receive the new defaults through the existing fill-in path. There is no server, database, migration, sync, installer or update change.
+
+Risks: some Linux desktops reserve `Ctrl+Alt+T` for opening a terminal, and a browser or OS may claim one of the combinations; users can rebind them in Settings. A user who already recorded one of these combinations for another action keeps that action, because earlier actions match first. Roll back by reverting the change; older versions ignore the extra stored keys.
+
+## Verification
+
+- Unit tests cover defaults, Windows/Linux/macOS matching (including the macOS Option character), AltGr characters not matching, fill-in for older settings and the Settings list order.
+- Browser check on a local self-hosted build (Chrome, macOS): title from the search field, body in rich-text and Markdown modes, title from inside the Markdown editor, no action under reading protection, and both actions listed in Settings → Shortcuts.
+- `bun run typecheck`, `bun run typecheck:mobile`, `bun run lint`, `bun run build:web` and `bun run test` passed.
+- Windows/Linux real keyboards and the packaged desktop note window were not verified manually.
diff --git a/docs/changes/2026-11-02-focus-title-body-shortcuts.zh-CN.md b/docs/changes/2026-11-02-focus-title-body-shortcuts.zh-CN.md
new file mode 100644
index 00000000..6a05e7e0
--- /dev/null
+++ b/docs/changes/2026-11-02-focus-title-body-shortcuts.zh-CN.md
@@ -0,0 +1,30 @@
+# 聚焦笔记标题与正文的快捷键
+
+[English](2026-11-02-focus-title-body-shortcuts.md)
+
+关联 Issue:#759
+
+## 问题与结果
+
+切换笔记或搜索后,要把光标移到当前笔记的标题或正文只能用鼠标。在现有快捷键体系中新增两个可配置操作:**聚焦笔记标题**和**聚焦笔记正文**,出现在“设置 → 快捷键”中,可以像其他操作一样重新录制。
+
+## 行为
+
+1. 默认键:标题为 `⌘⌥T` / `Ctrl+Alt+T`,正文为 `⌘⌥B` / `Ctrl+Alt+B`。它们不与现有 EdgeEver 默认快捷键或 Tiptap/CodeMirror 键位冲突(`Mod-Shift-B` 引用块、`Mod-Alt-1…6` 标题、`Mod-Alt-C` 代码块)。
+2. 打开文本笔记时,两个操作在工作区任何位置都可用,包括搜索框和笔记列表。标题操作把光标放在标题末尾;正文操作根据当前模式聚焦富文本编辑器(Tiptap 恢复之前的光标位置)或 Markdown 源码编辑器,移动端纯文本编辑器同样处理。
+3. 只读笔记(回收站、阅读保护)、打开会屏蔽编辑器快捷键的对话框或未选中笔记时不执行任何操作。表格、图表、海报和信息图笔记忽略这两个操作。
+4. 桌面端独立笔记窗口支持相同操作。
+5. Apple 键盘上 Option 会改变上报的按键(`⌘⌥T` 上报 `†`),因此按住 Option 时改用 `event.code` 中的物理字母匹配,与快捷键录制器现有做法一致。其他平台继续按产生的字符匹配,使用 AltGr(`Ctrl+Alt`)输入字符的键盘布局仍能正常输入。
+
+## 边界、风险与恢复
+
+本次只改客户端:快捷键设置仍保存在现有本地偏好 `edgeever.shortcutSettings` 中,旧设置通过现有补全逻辑获得新默认值。不涉及服务端、数据库、迁移、同步、安装器或更新。
+
+风险:部分 Linux 桌面把 `Ctrl+Alt+T` 保留给终端,浏览器或系统也可能占用其中某个组合,用户可在设置中改绑。已把这些组合录制给其他操作的用户保持原操作,因为排在前面的操作优先匹配。回滚只需撤销本次改动,旧版本会忽略多出的存储键。
+
+## 验证
+
+- 单元测试覆盖默认值、Windows/Linux/macOS 匹配(含 macOS Option 字符)、AltGr 字符不触发、旧设置补全以及设置列表顺序。
+- 在本地自托管构建上用浏览器验证(Chrome、macOS):从搜索框聚焦标题,富文本与 Markdown 模式聚焦正文,在 Markdown 编辑器内聚焦标题,阅读保护下不执行,两个操作出现在“设置 → 快捷键”中。
+- `bun run typecheck`、`bun run typecheck:mobile`、`bun run lint`、`bun run build:web` 和 `bun run test` 通过。
+- 未手动验证 Windows/Linux 实体键盘和打包后的桌面笔记窗口。
diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.ts
index 90674b59..999c3428 100644
--- a/packages/shared/src/i18n/en-US.ts
+++ b/packages/shared/src/i18n/en-US.ts
@@ -2328,6 +2328,8 @@ export const enUS = {
toggleEditorMode: { label: "Switch editor mode" },
toggleOutline: { label: "Show/hide document outline" },
toggleSidebar: { label: "Show/hide sidebar" },
+ focusTitle: { label: "Focus note title" },
+ focusBody: { label: "Focus note body" },
},
},
quickSwitcher: {
diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.ts
index c15ab1ba..2b6a8b48 100644
--- a/packages/shared/src/i18n/ja.ts
+++ b/packages/shared/src/i18n/ja.ts
@@ -2317,6 +2317,8 @@ export const ja = {
toggleEditorMode: { label: "エディタモードを切り替え" },
toggleOutline: { label: "ドキュメントアウトラインの表示/非表示" },
toggleSidebar: { label: "サイドバーの表示/非表示" },
+ focusTitle: { label: "ノートのタイトルにフォーカス" },
+ focusBody: { label: "ノートの本文にフォーカス" },
},
},
quickSwitcher: {
diff --git a/packages/shared/src/i18n/pl.ts b/packages/shared/src/i18n/pl.ts
index e1afc65d..1c57b0ea 100644
--- a/packages/shared/src/i18n/pl.ts
+++ b/packages/shared/src/i18n/pl.ts
@@ -2317,6 +2317,8 @@ export const pl = {
toggleEditorMode: { label: "Przełącz tryb edytora" },
toggleOutline: { label: "Pokaż/ukryj konspekt dokumentu" },
toggleSidebar: { label: "Pokaż/ukryj pasek boczny" },
+ focusTitle: { label: "Przejdź do tytułu notatki" },
+ focusBody: { label: "Przejdź do treści notatki" },
},
},
quickSwitcher: {
diff --git a/packages/shared/src/i18n/ru.ts b/packages/shared/src/i18n/ru.ts
index 9ce35ad4..97b07a92 100644
--- a/packages/shared/src/i18n/ru.ts
+++ b/packages/shared/src/i18n/ru.ts
@@ -2328,6 +2328,8 @@ export const ru = {
toggleEditorMode: { label: "Переключить режим редактора" },
toggleOutline: { label: "Показать/скрыть структуру документа" },
toggleSidebar: { label: "Показать или скрыть боковую панель" },
+ focusTitle: { label: "Перейти к заголовку заметки" },
+ focusBody: { label: "Перейти к тексту заметки" },
},
},
quickSwitcher: {
diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.ts
index c6765318..80c4e166 100644
--- a/packages/shared/src/i18n/zh-CN.ts
+++ b/packages/shared/src/i18n/zh-CN.ts
@@ -2328,6 +2328,8 @@ export const zhCN = {
toggleEditorMode: { label: "切换编辑模式" },
toggleOutline: { label: "显示/隐藏文档大纲" },
toggleSidebar: { label: "显示/隐藏侧边栏" },
+ focusTitle: { label: "聚焦笔记标题" },
+ focusBody: { label: "聚焦笔记正文" },
},
},
quickSwitcher: {