I made it possible to move to a new line by pressing Ctrl+Enter , and Enter will serve to send a message. The problem is that even intercepting the event of pressing Enter , a new line is still affixed.

    1 answer 1

    It turns out everything is simple. Once enter is a key to send a message, then simply send it and clear the field)))