diff --git a/docs/wiki/Keyboard-Shortcuts.md b/docs/wiki/Keyboard-Shortcuts.md index 66212940..d4d54c46 100644 --- a/docs/wiki/Keyboard-Shortcuts.md +++ b/docs/wiki/Keyboard-Shortcuts.md @@ -10,7 +10,6 @@ Press `Ctrl+?` in the app for the same list in a floating overlay. | ------------------------------- | --------------------------------------------------------------- | | `Ctrl+K` (also `Cmd+K`, `Alt+K`)| Find an open session or start a new one. | | `Ctrl+Tab` | Next session. | -| `Alt+←` / `Alt+→` | File Viewer window: back / forward between previewed files. | | `Alt+[` / `Alt+]` | Previous / next tab. | | `Alt+1` to `Alt+9` | Switch to tab N. Physical keys, so macOS Option layouts work. | | `Ctrl+Shift+{` / `Ctrl+Shift+}` | Move the active tab left / right. | @@ -58,11 +57,12 @@ default. See [Tile Grid](Tile-Grid). ## Everything else -| Shortcut | Action | -| -------------- | ------------------------------- | -| `Ctrl+Shift+V` | Toggle voice input. | -| `Ctrl+?` | Shortcut reference overlay. | -| `Escape` | Close panels and modals. | +| Shortcut | Action | +| ----------------- | ------------------------------------------------------------ | +| `Ctrl+Shift+V` | Toggle voice input. | +| `Ctrl+?` | Shortcut reference overlay. | +| `Escape` | Close panels and modals. | +| `Alt+←` / `Alt+→` | File Viewer window: back / forward between previewed files. | ## Rebinding diff --git a/src/web/public/app.js b/src/web/public/app.js index 62716497..29077b53 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -685,6 +685,14 @@ const DEFAULT_SHORTCUTS = [ label: 'Close Panels', displayBindings: ['Escape'], }, + // Handled by the File Viewer's own capture-phase listener while it is open + // (_bindFilePreviewChrome, panels-ui.js), never through the registry. + { + id: 'file-preview-history', + group: 'Panels', + label: 'File Viewer Back / Forward', + displayBindings: ['Alt/Option+ArrowLeft', 'Alt/Option+ArrowRight'], + }, ]; diff --git a/src/web/public/i18n.js b/src/web/public/i18n.js index 1dc592fa..d7951087 100644 --- a/src/web/public/i18n.js +++ b/src/web/public/i18n.js @@ -1044,7 +1044,6 @@ 'Back to the previous file': '返回上一个文件', 'Forward to the next file': '前进到下一个文件', Expand: '展开', - 'Restore size': '恢复大小', 'Drag to resize': '拖动以调整大小', 'Rendered markdown': '渲染 Markdown', 'Line numbers': '行号', @@ -1242,6 +1241,7 @@ 'Voice input (Ctrl+Shift+V)': '语音输入(Ctrl+Shift+V)', 'Insert Newline': '插入换行', 'Close Panels': '关闭面板', + 'File Viewer Back / Forward': '文件查看器后退 / 前进', 'Previous / Next Session': '上一个 / 下一个会话', 'Next Session': '下一个会话', 'Previous Session': '上一个会话', diff --git a/src/web/public/index.html b/src/web/public/index.html index 46ac8247..ceda80f3 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -926,6 +926,7 @@