mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
85560531da
commit
4e62bfa9a9
1 changed files with 11 additions and 0 deletions
|
@ -23,6 +23,17 @@ Item {
|
||||||
id: outerLayout
|
id: outerLayout
|
||||||
width: loginWindow.width - loginWindow.leftPadding - loginWindow.rightPadding - 2 * Kirigami.Units.gridUnit
|
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: {
|
onVisibleChanged: {
|
||||||
if (visible && manager.accessingCloud < 0) {
|
if (visible && manager.accessingCloud < 0) {
|
||||||
manager.appendTextToLog("Credential scrn: show kbd was: " + (Qt.inputMethod.isVisible ? "visible" : "invisible"))
|
manager.appendTextToLog("Credential scrn: show kbd was: " + (Qt.inputMethod.isVisible ? "visible" : "invisible"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue