feat(composer): use cmd/ctrl+enter send and add shortcut tooltip#88
feat(composer): use cmd/ctrl+enter send and add shortcut tooltip#88fihaaade wants to merge 6 commits intoDimillian:mainfrom
Conversation
fihaaade
commented
Jan 18, 2026
- Use Cmd+Enter on macOS (Ctrl+Enter elsewhere) to send; Enter now inserts a newline.
- Show a hover tooltip on the send button with the shortcut key.
|
FYI we already have CMD+SHIFT to have a new line |
|
@codex review, does it conflict with CMD+SHIFT? Any other issues? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b67d4e4c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onKeyDown={(event) => { | ||
| if (event.key === "Enter" && event.shiftKey) { | ||
| const isEnter = event.key === "Enter"; | ||
| const isSendShortcut = isMac ? event.metaKey : event.ctrlKey; | ||
| if (isEnter && !isSendShortcut) { | ||
| event.preventDefault(); |
There was a problem hiding this comment.
Preserve Enter to accept autocomplete
When autocomplete is open, useComposerAutocompleteState.handleInputKeyDown uses Enter to apply the highlighted suggestion. The new early branch for isEnter && !isSendShortcut runs before handleInputKeyDown and returns after inserting a newline, so Enter never reaches the autocomplete handler; users can no longer accept suggestions with Enter (only Tab works). Consider skipping the newline path when isAutocompleteOpen (or deferring Enter handling until after handleInputKeyDown) so the existing suggestion behavior remains intact.
Useful? React with 👍 / 👎.