From 1d4d4ca4832a49b50f382647327706bb50c9981d Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Thu, 7 Nov 2024 10:18:30 -0500
Subject: Backport multiline logic from prop/multiline-shift

---
 ui/lib/components/MessageInput.svelte | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'ui/lib/components/MessageInput.svelte')

diff --git a/ui/lib/components/MessageInput.svelte b/ui/lib/components/MessageInput.svelte
index 907391c..c071bea 100644
--- a/ui/lib/components/MessageInput.svelte
+++ b/ui/lib/components/MessageInput.svelte
@@ -18,7 +18,8 @@
   }
 
   function onKeyDown(event) {
-    if (!event.altKey && event.key === 'Enter') {
+    let modifier = event.shiftKey || event.altKey || event.ctrlKey || event.metaKey;
+    if (!modifier && event.key === 'Enter') {
       onSubmit(event);
     }
   }
-- 
cgit v1.2.3

