Introduction¶
When writing prompts, modifying configurations, or chatting with agents in DeepSeek Harness (DSH), the input box’s keyboard shortcuts typically follow the host or engine’s default mappings: in some environments, Enter sends directly while Shift+Enter inserts a newline; others are accustomed to Ctrl+Enter (⌘+Enter on macOS) to send. When habits differ, you either accidentally trigger a send or press an extra key combination, interrupting your train of thought. The engine itself may not expose independent switches for these three gestures. The purpose of the community plugin dsh-keys-setting is to allow you to choose, within the DSH Settings window → “General” section, whether Enter, Shift+Enter, or Ctrl/Cmd+Enter should “Send message” or “Insert newline”. By default, it aligns with the engine’s native behavior, without any additional intervention when no settings are changed.
Below is an introduction to the plugin’s positioning, implementation highlights, installation methods, and configuration fields. Facts are based on the GitHub repository README and package.json (current version 0.2.6); the community directory page can be found at SkillHub (an independent site with no official affiliation with DeepSeek or High-Flyer).
What Is This¶
dsh-keys-setting is published by maintainer itchenshi and categorized as a client-side plugin: it targets the Web page half of DSH, adding a “Keyboard Shortcuts” row under “Settings → General”, with three dropdown boxes binding the semantics of Enter, Shift+Enter, and Ctrl+Enter (⌘+Enter on macOS). It only remaps gestures; it does not modify input content. Sending and newline insertion are still determined by the engine.
Core Features¶
Settings Interface¶
- Adds a “Keyboard Shortcuts” section under “Settings → General”, with a selector for each of the three gestures: Send message / Insert newline.
- Changes made in the settings window take effect immediately.
Page-Side Behavior¶
- Listens for
keydownevents on the input box during the capture phase: it only intercepts when your chosen behavior differs from the engine’s native behavior, and re-dispatches the engine’s corresponding alternative gesture. - IME composition (
isComposing/ keyCode 229) and Alt+Enter always pass through, avoiding interference with Chinese input and other special scenarios. - Default values equal the engine’s native behavior; when no settings are changed, the number of interventions is 0.
Host-Side and Storage¶
- Preferences are stored in the
configfield of theid: composer-keysentry within the profile’scordis.patch.yml(declared by the plugin’sConfigschema); the plugin does not directly read or write arbitrary files. - The host provides
GET/POST /composer-keys, going through the engine’s trust fence (Host whitelist + browser session cookie); bare requests without cookies will receive a 401. The plugin makes no external network requests. - When
config.enabled === false, the host does not register routes nor display the settings row.
Installation and Activation¶
The DSH ecosystem philosophy is “everything is a plugin”; before installing, it is recommended to review the repository source code and the MIT license yourself, and understand that the plugin runs with the current dsh process’s permissions.
DSH Ready GUI (Recommended)¶
The plugin is built into the GUI. Open the GUI → Settings window → check Keyboard Shortcuts under “Third-party plugins”, and after installation, refresh the page as prompted (this plugin includes a page-side component).
Other DSH Hosts (dsh web / CLI)¶
Choose either command; both install the complete content of this repository (including cordis.patch.yml), requiring no additional configuration after installation. This package is not on npm (not found on registry.npmjs.org).
# Recommended: install directly from GitHub
dsh plugin --profile web add github:itchenshi/dsh-keys-setting
# Alternative: install from the tarball in this repository's Release
dsh plugin --profile web add https://github.com/itchenshi/dsh-keys-setting/releases/download/v0.2.6/dsh-keys-setting-0.2.6.tgz
Typical Usage¶
- Open the DSH Settings window → “General”, and find “Keyboard Shortcuts”.
- Choose “Send message” or “Insert newline” for Enter, Shift+Enter, and Ctrl/Cmd+Enter as needed.
- Return to the chat input box to verify: only mappings different from the defaults will be rewritten by the plugin.
If you prefer manually editing the profile, you can edit the config of the id: composer-keys entry in cordis.patch.yml. The host-side re-reads the configuration when the page window regains focus; switching back to the Harness window takes effect immediately—usually there is no need to refresh the entire page.
Configuration¶
The config field of the id: composer-keys entry in cordis.patch.yml must not be omitted; if missing, there will be no settings entry, and the host cannot read or write preferences.
| Key | Default | Description |
|---|---|---|
enter |
send |
send = send message, newline = insert newline |
shiftEnter |
newline |
Shift+Enter as above |
ctrlEnter |
send |
Ctrl+Enter (⌘ on macOS) as above |
Compatibility and FAQ¶
- Requires DSH >= 0.2.0-rc.2 (0.2.0 replaced the settings service API; preferences cannot be saved on 0.1.x).
- Node >= 20; no additional npm dependencies at runtime, the schema uses the engine’s built-in
@deepseek-ai/schemastery.
Changes not taking effect? Changes made within the settings window should take effect immediately; after manually editing files, you need to switch back to the Harness window to trigger a re-read. The host startup log should show [composer-keys] route ready at /composer-keys (entry composer-keys); if not, the plugin was not loaded.
Engine too old? Older engines use the deprecated settings service (register / get / section), and the plugin cannot save preferences.
Use Cases and Notes¶
- Suitable for: developers or daily users who frequently input in the DSH Web interface, want the three Enter-related gestures to differ from the defaults, but do not want to modify the engine core.
- Note: it only remaps key semantics and does not change message content or sending logic; edge cases related to IME and
Alt+Enterare already handled by the plugin (passing through). - Before installation and activation, please read the GitHub source code and the license; the community directory itchenshi/dsh-keys-setting facilitates searching, but installation commands are still based on the README.
Conclusion¶
Following the steps above, you can unify the Enter-family keyboard shortcuts in DSH’s general settings, with zero intervention by default. Repository: https://github.com/itchenshi/dsh-keys-setting; Directory page: https://www.skillhub.cn/plugins/itchenshi/dsh-keys-setting.