Also, use shift+return for line break.
This commit is contained in:
Black Hat
2018-09-20 13:43:47 +08:00
parent 611471b227
commit ea43cf6c80
4 changed files with 15 additions and 11 deletions

View File

@@ -366,9 +366,10 @@ Item {
ToolTip.visible: currentRoom && currentRoom.hasUsersTyping
ToolTip.text: currentRoom ? currentRoom.usersTyping : ""
Shortcut {
sequence: "Ctrl+Return"
onActivated: {
Keys.onReturnPressed: {
if (event.modifiers & Qt.ShiftModifier) {
inputField.insert(inputField.cursorPosition, "\n")
} else {
inputField.postMessage(inputField.text)
inputField.text = ""
}