Skip to content

Allow configuring Enter key behavior in chat input #52

@nikomatsakis

Description

@nikomatsakis

Summary

Currently, pressing Enter in the chat input submits the prompt, and Shift+Enter creates a newline. Some users prefer the opposite: Enter for newline, Shift+Enter (or Cmd+Enter) to submit.

Current behavior

  • Enter → submits prompt
  • Shift+Enter → inserts newline

Desired behavior (configurable)

Option to swap:

  • Enter → inserts newline
  • Shift+Enter or Cmd+Enter → submits prompt

Implementation notes

This behavior is controlled by MynahUI (the chat UI library from AWS). Options:

  1. Upstream contribution: Fork mynah-ui, implement the configuration option, propose it upstream to aws/mynah-ui
  2. Keyboard interception: Inject JavaScript in our webview to intercept and swap the key behaviors

Option 1 is cleaner but requires upstream acceptance. Option 2 is a workaround if needed sooner.

Priority

Nice-to-have, not blocking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions