Introduction¶
In the DSH Desktop Web GUI, common operations often rely on mouse clicks. The dsh-hotkey plugin provides keyboard entries for these operations, supports VS Code-style shortcut key configuration, and includes a visual editor within the settings page. The maintainer of this plugin is melt502, and it aims to reduce mouse interaction and improve operational efficiency.
Prerequisites¶
Some shortcuts activate features provided by other DSH plugins. You must install the corresponding plugins before use; otherwise, these bindings will appear as unavailable in the settings page.
| Required Plugin | Provided Feature | Unlocked Shortcuts |
|---|---|---|
| dsh-vision-router | The image recognition mode toggle button in the bottom-right corner of the input box | Ctrl+Alt+V — Toggle image recognition mode |
| dsh-better-sidebar | The right sidebar that hosts the terminal, files, Git, side chat, and bottom panel | Ctrl+`, Ctrl+J, Ctrl+Alt+B, Ctrl+Shift+E, Ctrl+Shift+G, Alt+E |
Installation and Activation¶
Install the plugin from a local directory:
dsh plugin --profile web add "link:<absolute path to this repo>"
After installation, restart DSH Desktop. The configuration entry is under System Settings → Shortcuts.
Features¶
- Basic Configuration: Contains 20 actions and 16 default key bindings.
- Visual Editing: On the settings page, you can change keys, disable entries, restore a single entry to default, or restore all entries to default.
- Conflict Detection: Detects combined-key conflicts; when conflicts occur, priority is determined by the order in the action table.
- Data Management: Supports importing and exporting a complete key binding table as JSON.
- Persistence: Configuration is persisted in the DSH settings scope (namespace
hotkey). - Multilingual Support: Follows the DSH interface language (Chinese / English).
- Navigation Enhancement:
- Keyboard navigation for the right sidebar:
↑/↓moves among visible buttons, andEntersimulates a click. - Two-stage Side Chat opening:
Alt+Efirst expands the right sidebar, then opens or creates a conversation. - Robustness: Service and DOM dual paths prevent complete shortcut failure caused by delayed service registration.
Default Shortcuts¶
| Shortcut | Action | Description |
|---|---|---|
Ctrl+B |
Toggle left sidebar | Session / workspace bar |
Ctrl+` |
Open / focus terminal | Right-side terminal tab |
Ctrl+J |
Toggle bottom panel | Bottom terminal / panel |
Ctrl+Alt+B |
Toggle right sidebar | Side cards for files, Git, and side chat |
Ctrl+Shift+E |
File tree / editor | Open file tab |
Ctrl+Shift+G |
Git panel | Open Source Control tab |
Alt+E |
Side chat | Expand the right sidebar first, then open the conversation |
Ctrl+Alt+V |
Toggle image recognition mode | Click the dsh-vision-router image recognition button (this plugin must be installed first) |
Ctrl+F |
Open a new workspace | Open the “Add Workspace” selector |
Ctrl+N |
New session | Create a new session in the current workspace |
Enter |
Approve | Takes over only when an approval card is visible |
Esc |
Reject | Takes over only when an approval card is visible |
Ctrl+[ |
Previous session | Conversation list navigation |
Ctrl+] |
Next session | Conversation list navigation |
Ctrl+I |
Focus input box | Move the cursor to the end |
Ctrl+, |
Open system settings | DSH settings entry |
Four additional actions are not assigned keys by default: right details column, sub-agent panel, system terminal window, and command menu. Enter / Esc are intercepted only when an approval card is visible; otherwise, DSH’s native behavior is preserved.
Runtime Diagnostics¶
In the DSH web DevTools console, you can call the following interfaces for debugging:
window.__DSH_HOTKEY__.effective() // Get the currently effective key binding table
window.__DSH_HOTKEY__.availability() // Get the availability of each action (used for settings page display)
window.__DSH_HOTKEY__.probe() // Check the status of service, DOM, tabs, sessions, and panels
window.__DSH_HOTKEY__.readiness() // Check handler readiness status
window.__DSH_HOTKEY__.debug(true) // Enable keypress debug logging
Testing¶
The plugin has no additional development dependencies. Tests use Node.js built-in modules.
npm test
Applicable Scenarios and Notes¶
- Applicable Scenarios: Developers who need to operate the DSH Desktop Web GUI frequently, especially those who prefer keyboard navigation.
- Notes:
Enter/Escare intercepted only when an approval card is visible; otherwise, DSH’s native behavior is preserved.- Avoid binding key combinations reserved by browsers or Electron.
- The DOM fallback mechanism depends on the current DOM structure of the DSH UI; if a DSH upgrade changes the DOM structure, rerun the tests and verify.
- Ecosystem Context: The DSH philosophy is “everything is a plugin”. The community catalog has no official affiliation with DeepSeek / Huanfang.
Short Ending¶
The dsh-hotkey plugin lowers the operational barrier of the DSH Desktop Web GUI by providing VS Code-style keyboard shortcuts and a visual editor. For more details and source code, see GitHub.