You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to make Ctrl + Enter to insert a new line, Enter to send the message, but it seems those 2 shortcuts already have default behaviors to create new line. Any way I can block the default behavior of existing shortcut and make it only perform the function I make it to? My code:
If I press Enter, it should either send the content or do nothing, but with code above it inserts a new line to the content if it doesn't send properly
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to make
Ctrl + Enter
to insert a new line,Enter
to send the message, but it seems those 2 shortcuts already have default behaviors to create new line. Any way I can block the default behavior of existing shortcut and make it only perform the function I make it to? My code:If I press
Enter
, it should either send the content or do nothing, but with code above it inserts a new line to the content if it doesn't send properlyBeta Was this translation helpful? Give feedback.
All reactions