summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/CloudCredentials.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-21 14:00:37 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-21 14:00:37 -0700
commit4e62bfa9a9cb9b715769189a292f655262157333 (patch)
tree5f299e657b5b5fcdac24ee0d88254b0e35ea41cf /mobile-widgets/qml/CloudCredentials.qml
parent85560531da8205feca045305843b704f497a3d05 (diff)
downloadsubsurface-4e62bfa9a9cb9b715769189a292f655262157333.tar.gz
QML UI: allow changing input fields with tab/return key
This assumes a physical keyboard (e.g., iPad with BT keyboard). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/CloudCredentials.qml')
-rw-r--r--mobile-widgets/qml/CloudCredentials.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/mobile-widgets/qml/CloudCredentials.qml b/mobile-widgets/qml/CloudCredentials.qml
index d63227619..2bb42a6ed 100644
--- a/mobile-widgets/qml/CloudCredentials.qml
+++ b/mobile-widgets/qml/CloudCredentials.qml
@@ -23,6 +23,17 @@ Item {
id: outerLayout
width: loginWindow.width - loginWindow.leftPadding - loginWindow.rightPadding - 2 * Kirigami.Units.gridUnit
+ function goToNext() {
+ for (var i = 0; i < children.length; ++i)
+ if (children[i].focus) {
+ children[i].nextItemInFocusChain().forceActiveFocus()
+ break
+ }
+ }
+
+ Keys.onReturnPressed: goToNext()
+ Keys.onTabPressed: goToNext()
+
onVisibleChanged: {
if (visible && manager.accessingCloud < 0) {
manager.appendTextToLog("Credential scrn: show kbd was: " + (Qt.inputMethod.isVisible ? "visible" : "invisible"))