about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOllie Hsieh <renahlee@outlook.com>2023-04-27 07:31:14 -0700
committerGitHub <noreply@github.com>2023-04-27 09:31:14 -0500
commit62b07f93fdfaad750dca5ebaf79706d0d3b36630 (patch)
tree7b2c64b5debed7929f19116a60943b1d76cc0bb5 /src
parent996dba759513c81ab57ee6167bb840340a468498 (diff)
downloadvoidsky-62b07f93fdfaad750dca5ebaf79706d0d3b36630.tar.zst
Support Ctrl + Enter for non-Mac (#544)
Diffstat (limited to 'src')
-rw-r--r--src/view/com/composer/text-input/TextInput.web.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx
index ef7676617..3f98a3595 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) => {