DeepSHPlugins
dsh-ctrl-enter-submit 项目预览
GITHUB / COMMUNITY PROJECT

dsh-ctrl-enter-submit

UI 增强JavaScriptMIT

让对话框中普通 Enter 换行、Ctrl/Cmd+Enter 提交,可在设置中开关。

2 StarsSA1992X 更新时间 2026-09-01
访问 GitHub 仓库
dsh-ctrl-enter-submit 项目预览

项目介绍

中文

让对话框中普通 Enter 换行、Ctrl/Cmd+Enter 提交,可在设置中开关。

English

Makes plain Enter insert a newline in the composer and Ctrl/Cmd+Enter submit, toggleable in settings.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
SA1992X
仓库
SA1992X/dsh-ctrl-enter-submit
GitHub Stars
2
Forks
1
开发语言
JavaScript
许可证
MIT
最近推送
2026-09-01
Manifest
数据中检测到声明

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

60/ 100
维护活跃
94
文档与实用信息
85
生态关注度
23
安装便捷信号
75
项目声明信号
100

近 10 天仍在更新;README 含完整安装与使用说明;关注度尚低(2)。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

dsh plugin --profile web add github:SA1992X/dsh-ctrl-enter-submit

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

dsh-ctrl-enter-submit

npm version license

English | 中文

DeepSeek Harness (DSH) 插件:将文本输入的提交快捷键从 Enter 改为 Ctrl/Cmd+Enter。覆盖主对话框与 Agent 提问卡片(ask_user_question)的所有输入控件;可在「设置 → 插件」中随时开关,禁用后恢复默认行为。

行为

按键插件启用时插件禁用后
Enter多行框换行;单行框/选项按钮不动作提交消息 / 回答 / 下一题
Ctrl/Cmd+Enter提交消息 / 回答 / 下一题提交(DSH 原本就支持)
Shift+Enter多行框换行提交消息(DSH 原生行为)

适用范围:主对话框 composer,以及 Agent 提问卡片(ask_user_question)的所有输入控件——多行 textarea(普通 Enter / Shift+Enter 换行)、单行自定义输入框(普通 Enter 不动作)、选项按钮(普通 Enter 不再选中/跳题,鼠标点击与空格选择不受影响)。

/ 和 @ 触发菜单打开时,Enter 仍然正常选择菜单项,不会被拦截。输入法组合状态下也不会被拦截。

安装

从插件市场安装:打开 Settings → Plugin Market,搜索 dsh-ctrl-enter-submit,一键安装。

或用命令行:

dsh plugin --profile web add dsh-ctrl-enter-submit

安装后刷新浏览器页面即可生效(纯客户端插件,无需重启服务)。

启用 / 禁用

在 DSH Web 界面的 设置 → 插件(Plugins) 中找到 ctrl-enter-submit,用开关切换:

  • 关闭:立即恢复 Enter 提交(刷新页面后生效)
  • 打开:恢复 Ctrl/Cmd+Enter 提交

卸载:

dsh plugin --profile web remove dsh-ctrl-enter-submit

工作原理

插件在浏览器端的 document 捕获阶段拦截 keydown 事件:

  • 目标限定为 composer 内的 textarea
  • 普通 Enter 与 Shift+Enter(无 Ctrl/Cmd 修饰、非输入法组合、非 //@ 菜单打开):调用 stopImmediatePropagation() 阻止事件冒泡到 React 的 onKeyDown 处理器(即 DSH 的提交逻辑),但不调用 preventDefault(),因此 textarea 照常换行
  • Ctrl/Cmd+Enter:放行,由 DSH 正常提交
  • 插件 Host 端为空操作,所有功能均在浏览器 Client 端实现

兼容性

  • 需要 dsh web 0.1.0-rc.6 或更高版本
  • 在 Windows、macOS、Linux 上均可工作(Ctrl 和 Cmd 都识别)

本地开发

用本地路径以链接方式安装,改完 client.js 后刷新浏览器即可看到效果,无需重新发布:

dsh plugin --profile web add ./dsh-ctrl-enter-submit

English

A DeepSeek Harness (DSH) plugin that changes the submit shortcut from Enter to Ctrl/Cmd+Enter. It covers the main composer and every input control in the agent question card (ask_user_question). Toggle it on/off anytime in Settings → Plugins; disabling restores the default Enter-submit behavior.

Behavior

KeyPlugin enabledPlugin disabled
EnterNewline in multiline fields; no action in single-line inputs / option buttonsSubmits the message / answer / advances
Ctrl/Cmd+EnterSubmits the message / answer / advancesSubmits (DSH supports this natively)
Shift+EnterNewline in multiline fieldsSubmits the message (DSH native behavior)

Scope: the main composer and the agent question card (ask_user_question) — multiline textarea (plain Enter / Shift+Enter insert a newline), single-line custom-answer input (plain Enter does nothing), and option buttons (plain Enter no longer selects/advances; mouse click and Space still select).

When the / or @ candidate menu is open, Enter selects the highlighted item as usual. IME composition is never intercepted.

Install

From the Plugin Market: open Settings → Plugin Market, search for dsh-ctrl-enter-submit, and install with one click.

Or from the command line:

dsh plugin --profile web add dsh-ctrl-enter-submit

Refresh the browser page after installing (client-only plugin, no restart needed).

Enable / Disable

Find ctrl-enter-submit in Settings → Plugins and toggle it:

  • Off: Enter submits again (takes effect after a page refresh)
  • On: Ctrl/Cmd+Enter submits

To uninstall:

dsh plugin --profile web remove dsh-ctrl-enter-submit

How it works

The plugin intercepts keydown on document during the capture phase, scoped to the composer textarea:

  • Plain Enter and Shift+Enter (no Ctrl/Cmd modifier, not composing, no //@ menu open) call stopImmediatePropagation() so React's onKeyDown handler (DSH's submit logic) never sees it, but it does not call preventDefault(), so the textarea inserts a newline normally. Note DSH natively submits on Shift+Enter too, so the plugin also intercepts it to produce a newline.
  • Ctrl/Cmd+Enter is left untouched and submits as usual.
  • The host entry is a no-op; all behavior lives in the browser client.

Compatibility

  • Requires dsh web 0.1.0-rc.6 or later.
  • Works on Windows, macOS, and Linux (both Ctrl and Cmd are recognized).

License

MIT

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目