Input box supports custom shortcut keys for line breaks

Open 💬 2 comments Opened Jun 1, 2026 by itbencn
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

WinApp

What feature would you like to see?

Input box supports custom shortcut keys for line breaks

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #24049

Powered by Codex Action

zhanex · 2 months ago

I checked the public repo side and this looks closely related to #24049.

The public code already exposes the low-level keymap settings needed for this behavior:

[tui.keymap.composer]
submit = "ctrl-enter"

[tui.keymap.editor]
insert_newline = "enter"

For the desktop app settings UI, the clean app-server write path would be a single config/batchWrite call so both bindings switch together and loaded sessions hot-reload the updated user config:

{
  "method": "config/batchWrite",
  "params": {
    "reloadUserConfig": true,
    "edits": [
      {
        "keyPath": "tui.keymap.composer.submit",
        "value": "ctrl-enter",
        "mergeStrategy": "replace"
      },
      {
        "keyPath": "tui.keymap.editor.insert_newline",
        "value": "enter",
        "mergeStrategy": "replace"
      }
    ]
  }
}

Switching back to the default Enter-to-send behavior can clear those two overrides by writing null to the same key paths through config/batchWrite.

I do not see the WinApp/Electron settings-page source in this public repo, so the actual UI toggle likely needs to be wired in the desktop app codebase. If maintainers want a public-repo PR, the most relevant change here would be adding docs/tests around this app-server keymap preset so desktop clients have a stable reference for implementing the setting.