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 switches and one binding table from browser storage. Both
switches are off-by-default except the shortcut takeover, and all of it is per
device.
| Key | Default | Meaning |
|---|---|---|
optimizeComposerKeys |
false |
Rotate the composer's Enter gestures |
takeOverShortcutKey |
true |
Give Ctrl+/ to this plugin |
bindings |
{} |
Combinations this plugin delivers itself (see below) |
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 DSH's own shortcut store —
localStorage on Web, userData/keybindings.json under Electron — whenever the
registry accepts the combination, so the binding also appears in DSH's shortcut
reference. In the DSH Desktop shell, which the shortcut service classifies as a
browser, a few combinations cannot be stored there; those are kept in
bindings and delivered by the plugin instead, and the settings page says so on
the row.
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 DSH Desktop shell is classified as a browser by the shortcut service.
It publishes nohtml[data-platform]marker — that marker would make the
service demand a native keyboard bridge the shell does not provide, and the
service throws without one — sodesktop:*defaults never resolve and the
registry refuses to store the combinations above. The plugin detects the
window itself and delivers them throughobserveFixedInput, the same raw-input
path the page keys use. A registry binding always wins, so one press never runs
an action twice, and a combination a desktop window also reserves
(Ctrl+C, Ctrl+V, …) is never taken
over. See docs/shortcuts.md. - The status-page shortcut reuses a page, not a tab. 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 a browser tab that is showing the status page and reveals it,
expanding the column if it is collapsed. A tab on another address is left alone
and the status page opens beside it, and 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 throughobserveFixedInput
rather 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 throws
Unsupported 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. - A self-delivered binding is invisible to DSH's shortcut reference. It is
held by this plugin, so only this plugin's settings page lists it. The row says
so; if DSH later marks its desktop windows, every binding returns to the
registry and this limitation disappears. - The composer remap is a DOM-layer integration. The composer's keymap is
private todsh-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