XiaoYuOvO/dsh-composer-enter-invert

XiaoYuOvO★ 0JavaScript最后同步: 2026-08-18

在 GitHub 打开

Portable DSH Web Composer Enter/Shift+Enter keybinding switcher

README 摘要

dsh-composer-enter-invert A DSH Web bundle plugin that changes Composer keyboard semantics only while the focused element is the conversation textarea. Behavior - default (the durable default): Enter sends; Shift+Enter inserts a newline. - inverted : Enter inserts a newline; Shift+Enter sends. - IME composition ( isComposing or key code 229) is never intercepted. - Other inputs, command controls, approval controls, and global shortcuts are not intercepted. Open Settings - General - Composer send keys and choose the desired mode. Changes take effect immediately in the current Web page. Design The plugin does not replace the Composer or call the conversation transport itself. In inverted mode, it installs one native capture-phase keydown listener and limits it to an enabled, writable textarea inside [data-composer-card] that is the active element. - Plain Enter is prevented and inserts text with document.execCommand("insertText", false, "\n") . A setRangeText plus bubbling input fallback is used only when the browser rejects execCommand , so React's existing onChange continues to update the official draft machine and undo stack. - Shift+Enter is prevented, then replayed to the textar…

在 GitHub 查看完整 README →
工具/开发composerdeepseek-harnessdsh-pluginenter-keykeyboard-shortcutsweb-plugin

分类