I have a binding for a textarea input in Shiny here. To submit the text entered press CTRL-return (CMD-return on Mac). I would prefer the text be submitted on pressing return (i.e., without CTRL or CMD) but without creating a newline. Is this possible? Note: A textarea, rather than a textinput, is needed to provide enough space for input without some of the text being hidden.
EDIT: The binding works with CTRL-return (or CMD-return). On lines 18-22 I can use just
event.keyCode == 13 and that submits the input but a newline character is also inserted in the textarea. It is that last part (i.e., the newline) I would like to avoid.