Fix arrows and other keys not working in sendbox
This commit is contained in:
parent
ecba7c47ec
commit
57577ba8b8
|
@ -27,7 +27,6 @@ ScrollView {
|
||||||
color: HStyle.controls.textArea.background
|
color: HStyle.controls.textArea.background
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.forwardTo: [scrollView]
|
//Keys.forwardTo: [scrollView]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ HRectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Component.onCompleted: {
|
||||||
|
area.Keys.onReturnPressed.connect(function (event) {
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
|
|
||||||
if (event.modifiers & Qt.ShiftModifier ||
|
if (event.modifiers & Qt.ShiftModifier ||
|
||||||
|
@ -67,10 +68,10 @@ HRectangle {
|
||||||
var args = [chatPage.roomId, textArea.text]
|
var args = [chatPage.roomId, textArea.text]
|
||||||
py.callClientCoro(chatPage.userId, "send_markdown", args)
|
py.callClientCoro(chatPage.userId, "send_markdown", args)
|
||||||
area.clear()
|
area.clear()
|
||||||
}
|
})
|
||||||
|
|
||||||
// Numpad enter
|
area.Keys.onEnterPressed.connect(area.Keys.onReturnPressed)
|
||||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user