Use ctrl+enter to enter newline

This commit is contained in:
xavi92 2021-12-22 23:47:48 +01:00 committed by Xavier Del Campo Romero
parent abe6389349
commit ef11c0ef26
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class ChatTextView : ScrolledWindow {
private bool on_text_input_key_press(EventKey event) {
if (event.keyval in new uint[]{Key.Return, Key.KP_Enter}) {
if ((event.state & ModifierType.SHIFT_MASK) > 0) {
if ((event.state & ModifierType.CONTROL_MASK) > 0) {
text_view.buffer.insert_at_cursor("\n", 1);
} else if (text_view.buffer.text.strip() != "") {
send_text();