Focus weather city input on return
This commit is contained in:
@@ -37,6 +37,7 @@ Item {
|
||||
|
||||
signal moveRequested(int dx, int dy)
|
||||
signal activateRequested()
|
||||
signal returnRequested()
|
||||
signal closeRequested()
|
||||
signal deleteRequested()
|
||||
signal tabRequested(int direction)
|
||||
@@ -67,7 +68,11 @@ Item {
|
||||
if (event.key === Qt.Key_Left || event.text === "h") {
|
||||
moveRequested(-1, 0); event.accepted = true; return
|
||||
}
|
||||
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_Space) {
|
||||
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
||||
returnRequested()
|
||||
activateRequested(); event.accepted = true; return
|
||||
}
|
||||
if (event.key === Qt.Key_Space) {
|
||||
activateRequested(); event.accepted = true; return
|
||||
}
|
||||
if (event.text === "x" || event.text === "X") {
|
||||
|
||||
@@ -450,6 +450,7 @@ Panel {
|
||||
id: keyCatcher
|
||||
anchors.fill: parent
|
||||
blocked: root.editingLocation
|
||||
onReturnRequested: root.startEditingLocation()
|
||||
onCloseRequested: root.close()
|
||||
onTabRequested: function(direction) { root.switchPanel(direction) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user