From b646a31d700a099236dcec47e2cc3db2b7f83105 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 6 Nov 2024 17:15:26 -0500
Subject: Use any modifier key (ctrl, alt, shift, or meta, technically) for
 multi-line messages.

---
 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

