Back to home@Aafff623

dsh-keyboard-manager

Keyboard shortcuts for the DeepSeek Harness Web UI

Stars
0
Language
JavaScript
Created
Sep 6, 2026
Updated
Sep 6, 2026
GitHub repo

Introduction

dsh-keyboard-manager

CI License: MIT

Keyboard shortcuts for the DeepSeek Harness (dsh) Web UI.

Shortcuts

ChordAction
Ctrl+Qtoggle the built-in left sidebar via ctx.layout.toggleSidebar()
Ctrl+Etoggle the RIGHT sidebar — the dsh-better-sidebar panel (Files / git / terminal / browser…) when that plugin is loaded, else the native conversation details panel
Ctrl+Stoggle the Settings modal (opens via its sidebar trigger, closes via the panel's own Escape path)

Behavior rules:

  • Strict chords only: plain Ctrl with no Cmd/Shift/Alt riders; Cmd variants stay with the browser/OS.
  • IME composition, key auto-repeat, and events another listener already consumed are always left alone.
  • Ctrl+S yields inside dsh-better-sidebar's surface: that plugin's editor binds Ctrl/Cmd+S to save, so with focus inside its panel host the chord is left untouched.
  • Ctrl+E needs an active session — both the plugin panel and the native details column are session-scoped surfaces.

Install

dsh plugin --profile web add git+https://github.com/Aafff623/dsh-keyboard-manager.git

Then hard-refresh the browser (Ctrl+Shift+R). The package's dsh.bundle.patch declaration adds the plugin to the profile bundle automatically; no profile file edits.

lib/ is committed on purpose: a git install works with zero build step. If you change src/, run npm run build and commit the refreshed lib/ together (CI verifies they stay in sync).

How the chords reach their targets

DSH's layout service exposes actions but no state reads, and the settings modal's open state is component-local — so the bindings ride on stable DOM markers and the shell's own affordances instead of React internals or hashed CSS classes. Every path degrades to a no-op when its marker is missing, never misfires.

  • Ctrl+Q — pure service call.
  • Ctrl+E — with dsh-better-sidebar loaded, clicks its right-panel switch (the last button of [data-dsh-toggle-cluster], the same element the on-screen switch cluster renders); otherwise calls ctx.layout.openDetails()/closeDetails(), deciding direction from the frame root's data-details-collapsed (the rendered truth) located via the [data-shell-overlay] anchor.
  • Ctrl+S — clicks the sidebar settings trigger (button[aria-haspopup="dialog"], the first one in frame document order) to open; dispatches a document-level Escape — exactly what the panel's close logic listens for — to close.

Development

npm install
npm run typecheck   # tsc --noEmit
npm run build       # esbuild → lib/index.js + lib/client.js (ModuleLoader-wrapped)
npm test            # node:test, vm-isisted fake-DOM suite

Plugin layout follows the standard DSH dual-half shape:

  • src/index.ts — node/host half (registers nothing; exists so the loader can mount the package)
  • src/client/index.ts — browser half (all behavior; zero runtime imports, bundled with no externals)
  • lib/client.js — the browser bundle wrapped in the window.__ModuleLoader__.load() factory shape
  • cordis.patch.yml — the bundle insert that mounts the plugin

Dev overlay against a running web profile, without installing:

dsh web --patch D:/code/dsh-plugin/dsh-keyboard-manager/cordis.dev.yml

License

MIT