From 62b07f93fdfaad750dca5ebaf79706d0d3b36630 Mon Sep 17 00:00:00 2001 From: Ollie Hsieh Date: Thu, 27 Apr 2023 07:31:14 -0700 Subject: [PATCH] Support Ctrl + Enter for non-Mac (#544) --- src/view/com/composer/text-input/TextInput.web.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx index ef767661..3f98a359 100644 --- a/src/view/com/composer/text-input/TextInput.web.tsx +++ b/src/view/com/composer/text-input/TextInput.web.tsx @@ -87,7 +87,7 @@ export const TextInput = React.forwardRef( getImageFromUri(items, onPhotoPasted) }, handleKeyDown: (_, event) => { - if (event.metaKey && event.code === 'Enter') { + if ((event.metaKey || event.ctrlKey) && event.code === 'Enter') { // Workaround relying on previous state from `setRichText` to // get the updated text content during editor initialization setRichText((state: RichText) => {