From 50a7d10f27e22c28714d0644008a59d98db784f7 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 17:54:04 -0700 Subject: [PATCH] Enter sends message, ctrl/meta/shift + enter makes newline --- packages/client/src/pages/messaging/messaging-room.form.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/src/pages/messaging/messaging-room.form.vue b/packages/client/src/pages/messaging/messaging-room.form.vue index 38bab9050..2e008bf40 100644 --- a/packages/client/src/pages/messaging/messaging-room.form.vue +++ b/packages/client/src/pages/messaging/messaging-room.form.vue @@ -125,7 +125,10 @@ function onDrop(ev: DragEvent): void { function onKeydown(ev: KeyboardEvent) { typing(); - if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey) && canSend) { + if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey || ev.shiftKey) && canSend) { + textEl.value += '\n' + } + else if (ev.key === 'Enter' && canSend) { send(); } }