-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Feature]: Add Cmd+Enter (Mac) / Ctrl+Enter (Windows) shortcut to send messages in Control UI #39821
Description
Summary
Add keyboard shortcut (Cmd/Ctrl+Enter) to send messages in Control UI chat, with Enter for new line.
Problem to solve
Currently, the Control UI chat input sends messages when pressing Enter alone. This makes it difficult to:
- Type multi-line messages without accidentally sending them
- Edit messages before sending (common in all major chat apps)
- Follow standard chat UI conventions
Users coming from Slack, Discord, WeChat, Telegram, etc. expect Enter to create a new line and Cmd/Ctrl+Enter to send. The current behavior causes:
- Accidental premature message sends
- Inability to compose longer, multi-line messages
- Frustration for users switching from other chat platforms
Proposed solution
Add keyboard shortcut support for sending messages:
Default behavior (recommended):
- Mac: Cmd+Enter to send, Enter for new line
- Windows/Linux: Ctrl+Enter to send, Enter for new line
Alternative: Add a setting in Control UI preferences:
- Option to toggle between "Enter to send" and "Cmd/Ctrl+Enter to send"
- Store preference in localStorage
Implementation notes:
- Listen for keyboard events in the chat input component
- Check for metaKey (Mac) or ctrlKey (Win/Linux) + Enter
- Maintain backward compatibility for users who prefer Enter-to-send
Alternatives considered
- Browser extensions that customize keyboard shortcuts - works but not ideal, adds dependency
- Manual modification of Control UI source code - not sustainable for most users
- Using a different chat interface (e.g., terminal TUI) - loses the benefits of the web UI
- Training users to adapt - poor UX, goes against established conventions
Impact
Affected users: All Control UI and WebChat users
Severity: Medium (usability issue, not a blocker)
Frequency: Every time a user types a message
Consequence:
- Accidental message sends cause confusion and require follow-up corrections
- Users cannot compose thoughtful multi-line messages
- Reduces productivity for power users who send many messages daily
- Creates friction for new users adopting OpenClaw
This is a common pattern in virtually all modern chat applications (Slack, Discord, WeChat, Telegram, WhatsApp Web, etc.), so users have strong muscle memory for this shortcut.
Evidence/examples
Industry standard behavior:
- Slack: Ctrl+Enter to send
- Discord: Ctrl+Enter to send
- WeChat (微信): Ctrl+Enter to send
- Telegram: Ctrl+Enter to send
- WhatsApp Web: Ctrl+Enter to send
- Microsoft Teams: Ctrl+Enter to send
- iMessage on Mac: Cmd+Enter to send
Reference: Most Electron-based chat apps and web chat interfaces support this as either default or an option.
Additional information
Priority: 🟡 Medium (usability improvement)
Area: Control UI / WebChat
Backward compatibility: Should maintain existing Enter-to-send behavior or provide a toggle