Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,10 @@ export const ChatInput = forwardRef<ChatInputHandle, Props>(function ChatInput({
const handleKeyDown = useCallback(
(e: KeyboardEvent<HTMLTextAreaElement>) => {
const nativeEvent = e.nativeEvent;
const sendShortcut = e.key === "Enter" && !e.shiftKey && (!isMobile || e.ctrlKey || e.metaKey);
// Enter sends, Shift+Enter inserts a newline — same on every layout.
// Mobile previously required Ctrl/Meta+Enter (#472), which left
// hardware/Bluetooth keyboards with no way to send.
const sendShortcut = e.key === "Enter" && !e.shiftKey;
const recentlyComposed = Date.now() - lastCompositionEndAtRef.current < COMPOSITION_END_ENTER_GRACE_MS;
const isComposing =
isComposingRef.current ||
Expand Down