dshbase

Plugin directory / Developer / dsh-keyboard-shortcuts

dsh-keyboard-shortcuts

Verified · install-tested on dsh 904915452

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
—Language
2026-08-17Last push
Cross-platformPlatform

What it does

DeepSeek Harness 插件:可配置键盘快捷键(输入历史 + 审批/计划快捷键)

✅
Our take
Works — verified, early-stage project

DeepSeek Harness 插件:可配置键盘快捷键(输入历史 + 审批/计划快捷键) It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

@zhangqingyu/dsh-keyboard-shortcuts

DeepSeek Harness 插件:可配置的键盘快捷键管理器。

在 Harness 的设置 → 键盘快捷键里,自己给不同事件绑定快捷键,配置持久化(localStorage),
同时内置了输入历史(↑/↓)和审批/计划快捷键。

可配置的事件(默认值)

事件 默认快捷键 作用
上一条输入 ArrowUp 回填上一次提交的内容
下一条输入 ArrowDown 向后翻 / 回到正在编辑的草稿
允许权限升级 Mod+Enter 审批弹窗「允许一次」
拒绝权限升级 Escape 审批弹窗「拒绝」
批准计划 Mod+Enter 计划审批「确认执行」
计划转聊天(取消) Escape 计划审批「去聊天里说」

Mod = macOS 的 Cmd,或 Windows/Linux 的 Ctrl。组合键写法:Mod+Shift+P、Ctrl+Enter、
Alt+ArrowUp 等;点行尾按钮后按新快捷键即可录制,点「清除」可禁用该事件。

结构

dsh-keyboard-shortcuts/
├── cordis.patch.yml
├── lib/index.js          # host 半部(空插件)
└── lib/client.js         # browser 半部:设置 UI + keydown 绑定 + 动作

工作原理

lib/client.js(纯 client 插件):

  • 在 settings.section 注册「键盘快捷键」页,列出事件并录制绑定,写 localStorage。
  • 在 conversation.input.dock 注册一个隐形桥(InputBridge),通过 slot 标准 props 拿
    useInput((s) => s) + inputActions + useSession:输入历史直接读会话里已落库的用户消息
    (useSession 的 chat.order / chat.nodes)重建,回填走 inputActions.setDraft——不再用
    「草稿变空即算发送」的启发式推断(那会把「手动清空草稿」也误当成一条历史)。
  • 在 document 挂一个捕获阶段 keydown,按当前绑定匹配事件并分发:
    输入历史走 inputActions.setDraft;审批/计划直接点对应弹窗的按钮([data-approval-key] /
    [data-plan-review-key])。
  • 不拦截 复制/剪切/粘贴:composer 自己的 onCopy/onCut/onPaste 和消息上的「复制」按钮已经
    负责剪贴板;全局捕获阶段的 fallback 会 preventDefault() 原生路径反而弄坏它。macOS 壳里的
    Cmd+C/V/X/A 走原生 Edit 菜单修复(见 dsh-macos-app)。

安装

# 任选一个镜像仓库克隆
git clone https://gitee.com/zqy-904915452/dsh-keyboard-shortcuts.git
# git clone https://github.com/904915452/dsh-keyboard-shortcuts.git
cd dsh-keyboard-shortcuts
dsh plugin --profile web add "file:$(pwd)"

file: 后要写 clone 下来的绝对路径;如果你用的是自定义 profile,把 web 换成你的 profile 名。
也可以直接用仓库地址装:dsh plugin --profile web add git+https://gitee.com/zqy-904915452/dsh-keyboard-shortcuts.git
(或 GitHub 镜像 git+https://github.com/904915452/dsh-keyboard-shortcuts.git)。

安装后重启 app 并刷新页面,进「设置」即可看到「键盘快捷键」页。

本插件取代之前的 dsh-input-history 和 dsh-approval-shortcuts(两者已合并进来,且修复了
useInput 缺少选择器导致方向键失效的 bug)。

边界

  • 审批/计划按钮依赖当前版本弹窗的 DOM 结构(拒绝/讨论在前、允许/确认在后);应用升级若改结构需同步调整。
  • 输入历史只在空闲态(phase === "plain")且光标位于首行(↑)/末行(↓)、且没有打开的
    [role="listbox"](/ 候选菜单)时触发,避免抢占多行编辑与 /、@ 菜单的方向键。
  • 多个事件可共享同一快捷键(Mod+Enter 同时是「允许权限升级」和「批准计划」;Escape 同理):
    匹配到第一个事件但没找到对应弹窗时,会继续尝试下一个,而不是直接放弃。

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-keyboard-shortcuts for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:904915452/dsh-keyboard-shortcuts

Headless (CLI) profile:

dsh plugin --profile headless add github:904915452/dsh-keyboard-shortcuts

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7819 plugins →