diff --git a/qml/pages/AddOTP.qml b/qml/pages/AddOTP.qml index 66f5e3c..752715d 100644 --- a/qml/pages/AddOTP.qml +++ b/qml/pages/AddOTP.qml @@ -73,6 +73,10 @@ Dialog { text: paramLabel != "" ? paramLabel : "" focus: true horizontalAlignment: TextInput.AlignLeft + + EnterKey.enabled: text.length > 0 + EnterKey.iconSource: "image://theme/icon-m-enter-next" + EnterKey.onClicked: otpSecret.focus = true } TextField { id: otpSecret @@ -82,6 +86,10 @@ Dialog { placeholderText: qsTr("Secret OTP Key") focus: true horizontalAlignment: TextInput.AlignLeft + + EnterKey.enabled: text.length > 15 + EnterKey.iconSource: paramType == "TOTP" ? "image://theme/icon-m-enter-accept" : "image://theme/icon-m-enter-next" + EnterKey.onClicked: paramType == "TOTP" ? addOTP.accept() : otpCounter.focus = true } TextField { id: otpCounter @@ -93,6 +101,9 @@ Dialog { focus: true horizontalAlignment: TextInput.AlignLeft validator: IntValidator { bottom: 0 } + + EnterKey.iconSource: "image://theme/icon-m-enter-accept" + EnterKey.onClicked: addOTP.accept() } Component.onCompleted: { typeSel.currentIndex = paramType == "HOTP" ? 1 : 0 } } diff --git a/qml/pages/ExportPage.qml b/qml/pages/ExportPage.qml index 50ead8f..2513dca 100644 --- a/qml/pages/ExportPage.qml +++ b/qml/pages/ExportPage.qml @@ -100,6 +100,10 @@ Dialog { placeholderText: mode == "import" ? qsTr("File to import") : qsTr("File to export") focus: true horizontalAlignment: TextInput.AlignLeft + + EnterKey.enabled: text.length > 0 + EnterKey.iconSource: "image://theme/icon-m-enter-next" + EnterKey.onClicked: filePassword.focus = true } TextSwitch { @@ -117,6 +121,10 @@ Dialog { echoMode: TextInput.Password focus: true horizontalAlignment: TextInput.AlignLeft + + EnterKey.enabled: text.length > 0 + EnterKey.iconSource: mode == "export" ? "image://theme/icon-m-enter-next" : "image://theme/icon-m-enter-accept" + EnterKey.onClicked: mode == "export" ? filePasswordCheck.focus = true : exportPage.accept() } TextField { @@ -128,6 +136,10 @@ Dialog { echoMode: TextInput.Password focus: true horizontalAlignment: TextInput.AlignLeft + + EnterKey.enabled: filePassword.text == filePasswordCheck.text && filePassword.text.length > 0 + EnterKey.iconSource: "image://theme/icon-m-enter-accept" + EnterKey.onClicked: exportPage.accept() } Text {