- Início
- Plugins
- Melhorias de UI
- dsh-keyboard-shortcut
dsh-keyboard-shortcut
ozongo/dsh-keyboard-shortcut
Adds a Keyboard Shortcuts page to the DSH Settings panel with six rebindable commands — permission-mode cycling, reasoning-effort stepping, a status-page and a task-list shortcut — plus PgUp/PgDn input navigation and an optional composer Enter remap.
Instalar
dsh plugin --profile web add github:ozongo/dsh-keyboard-shortcutREADME
dsh-keyboard-shortcut
A Keyboard Shortcuts settings page for DeepSeek Harness (DSH), with permission-mode cycling, reasoning-effort stepping, prompt navigation, a status-page shortcut, a task-list toggle, and an optional composer key remap.
Overview
dsh-keyboard-shortcut adds one page to DSH's Settings panel and eight shortcuts
to the application. The page lists every binding in the running application,
lets you change the ones this plugin owns, and carries a switch for remapping the
composer's Enter keys.
Every shortcut this plugin adds is an ordinary DSH command. It appears in the shortcut reference, it can be rebound, and it respects the same conflict rules as the built-in commands.
Requirements
| Requirement | Minimum |
|---|---|
| DeepSeek Harness | 0.2.0-rc.2 |
| Node.js (for building from source) | 22.12.0 |
This plugin is a client plugin: everything it does happens in the browser
half. Its Host half is an empty apply that exists only so DSH serves the
browser bundle.
Install
Install into a profile with the DSH plugin command:
dsh plugin --profile <profile> add dsh-keyboard-shortcut
Then restart the profile, or toggle the bundle off and on from Settings → Plugins if the profile reloads live.
What you get
A Keyboard Shortcuts settings page
Settings → Keyboard shortcuts sits directly after General. It has four sections:
- Plugin shortcuts — the commands this plugin owns, each row editable. Click a row, press a combination, and it saves. Press Escape to cancel.
- Input navigation — the two page-key shortcuts. These have no command id, so they are listed read-only rather than being rebindable; the reason is under Known limitations.
- Input optimisation — the composer key switch described below.
- Application shortcuts — every other registered command, read-only. This is the table that makes a binding conflict comprehensible: when a combination is refused, the row that already owns it is visible right there.
Shortcuts
| Shortcut | Action | Platforms |
|---|---|---|
| Ctrl+Q | Cycle to the next permission mode | Desktop Windows, macOS |
| Ctrl+1 | Lower the reasoning effort one level | Desktop |
| Ctrl+2 | Raise the reasoning effort one level | Desktop |
| Alt+A | Open the DeepSeek status page in the sidebar browser | Desktop |
| Ctrl+L | Expand or collapse the task list | Desktop |
| PgUp | Go to the previous input | All (fixed) |
| PgDn | Go to the next input | All (fixed) |
| Ctrl+/ | Open this plugin's settings page | All |
Ctrl/Cmd+/ is the built-in shortcut reference's default binding. This plugin claims it through the shortcut preference layer, so the reference dialog moves off that key and stays reachable from Settings → General → Edit shortcuts. Turning the switch off restores the original binding.
Input optimisation
When enabled, the composer's three Enter gestures rotate:
| Stroke | Default | With input optimisation |
|---|---|---|
| Enter | Send | Insert a line break |
| Ctrl+Enter | Complementary Queue/Steer | Send |
| Shift+Enter | Insert a line break | Complementary Queue/Steer |
The switch is off by default.
Configuration
The plugin reads two preferences from browser storage. Both are off-by-default except the shortcut takeover, and both are per device.
| Key | Default | Meaning |
|---|---|---|
optimizeComposerKeys | false | Rotate the composer's Enter gestures |
takeOverShortcutKey | true | Give Ctrl+/ to this plugin |
Preferences live in localStorage under dsh.keyboard-shortcut.v1, beside the
key bindings DSH itself stores per device. They are not in the Host settings
document, so one machine's choice cannot rewrite another's.
Changing a binding through the settings page writes to the same store DSH's own
shortcut editor uses: localStorage on Web, and userData/keybindings.json
under Electron.
Permissions
The plugin requests no elevated permissions. It reads the session projections
DSH already publishes to the browser and runs the same /permission command the
built-in picker runs. It performs no filesystem access and no network requests.
Known limitations
- Cycle, effort, status-page and task-list shortcuts are Desktop-only by default. DSH reserves Ctrl+Q outside Desktop Windows and macOS, and browsers claim Ctrl+1…Ctrl+8 for tab switching. Alt+A and Ctrl+L are not admitted by the browser allowlist at all — a single non-primary modifier is refused, and both keys are spoken for. All five commands exist on every platform and can be bound by hand; they simply ship unbound where the combination cannot work.
- The status-page shortcut reuses an open page. The sidebar browser registers itself as a tab type that may appear more than once, so opening it through the sidebar's own API always mints a new tab. The plugin therefore looks for an existing browser tab first and reveals it, expanding the column if it is collapsed. A tab belonging to another session is ignored, because the sidebar only reveals tabs in the session on screen.
- The task-list toggle clicks the panel header. DSH keeps the collapsed state inside the panel component and exposes no handle, so the shortcut drives the same button a click would. A session with no task list shows nothing to toggle, which the shortcut reports instead of failing.
- Prompt navigation drives the turn rail. DSH publishes no service for jumping to a turn, so the shortcut activates the rail's own marks. A turn is anchored at its first user message, so "previous input" means "previous turn".
- The page keys cannot be registered, so they are read raw.
PgUp/PgDn are handled through
observeFixedInputrather thanregisterFixed, because DSH's shortcut registry validates every declared code against a closed whitelist —Key*,Digit*,F1–F24, and a fixed set of named keys that does not include the page keys.registerFixednormalizes its bindings up front and throwsUnsupported shortcut code: PageUp, so a registration could never succeed. The keyboard layer forwards every keydown toobserveFixedInputregardless of registration, so the keys work; they just have no catalog row, and the settings page lists them from a local table as non-rebindable rows. - The composer remap is a DOM-layer integration. The composer's keymap is
private to
dsh-client-ui-conversation; the option rewrites an event's modifier flags rather than reimplementing the send logic. See docs/design.md for the reasoning and the failure mode. - The settings navigation glyph is a DOM patch. DSH chooses navigation icons with a hardcoded switch on the section id and offers no icon field on the registration, so the glyph is applied with a CSS mask.
- Recording loses React state. Rebinding re-registers the command and re-renders the page, like any catalog change.
Development
npm install
npm run build # writes lib/index.js and lib/client.js
npm test # build check + unit tests
npm run watch # rebuild the client half on change
See CONTRIBUTING.md and docs/development.md.
Documentation
- docs/design.md — architecture and the decisions behind it
- docs/shortcuts.md — every binding, its owner, and its failure modes
- docs/development.md — building, testing, releasing
License
Plugins relacionados
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui
dsh-web-ui (dsh-web-ui-all)
zhu1090093659/dsh-web-ui