From 6b271a41c1d56cc9eb794359d59a907b8af0a0ea Mon Sep 17 00:00:00 2001 From: Cogent Apps Date: Sat, 29 Apr 2023 18:51:54 +0000 Subject: [PATCH] submit on ctrl-enter --- app/src/components/input.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/components/input.tsx b/app/src/components/input.tsx index 0e17599..aacd126 100644 --- a/app/src/components/input.tsx +++ b/app/src/components/input.tsx @@ -263,6 +263,8 @@ export default function MessageInput(props: MessageInputProps) { const hotkeyHandler = useMemo(() => { const keys = [ ['Escape', blur, { preventDefault: true }], + ['ctrl+Enter', onSubmit, { preventDefault: true }], + ]; if (submitOnEnter) { keys.unshift(['Enter', onSubmit, { preventDefault: true }]);