From 7bd9e6c5805ab78c68161bec20c225965ea59ddb Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 14 Jul 2010 10:09:41 +1000 Subject: Enter key performs same action as Return key in QML demos. N900 has an Enter key, not a return key --- demos/declarative/flickr/mobile/TitleBar.qml | 1 + demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml | 4 ++++ demos/declarative/twitter/TwitterCore/AuthView.qml | 2 ++ demos/declarative/twitter/TwitterCore/HomeTitleBar.qml | 1 + demos/declarative/twitter/TwitterCore/TitleBar.qml | 1 + 5 files changed, 9 insertions(+) diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index c7e1a53..335c315 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -109,6 +109,7 @@ Item { Item { id: returnKey Keys.onReturnPressed: container.accept() + Keys.onEnterPressed: container.accept() Keys.onEscapePressed: titleBar.state = "" } } diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml index 6109535..be7dfa4 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml @@ -64,6 +64,10 @@ Item { container.labelChanged(textInput.text) container.focus = true } + Keys.onEnterPressed: { + container.labelChanged(textInput.text) + container.focus = true + } Keys.onEscapePressed: { textInput.text = container.label container.focus = true diff --git a/demos/declarative/twitter/TwitterCore/AuthView.qml b/demos/declarative/twitter/TwitterCore/AuthView.qml index 4f75777..0d05deb 100644 --- a/demos/declarative/twitter/TwitterCore/AuthView.qml +++ b/demos/declarative/twitter/TwitterCore/AuthView.qml @@ -115,6 +115,7 @@ Item { KeyNavigation.tab: guest KeyNavigation.backtab: passIn Keys.onReturnPressed: login.doLogin(); + Keys.onEnterPressed: login.doLogin(); Keys.onSelectPressed: login.doLogin(); Keys.onSpacePressed: login.doLogin(); onClicked: login.doLogin(); @@ -135,6 +136,7 @@ Item { KeyNavigation.tab: nameIn KeyNavigation.backtab: login Keys.onReturnPressed: guest.doGuest(); + Keys.onEnterPressed: guest.doGuest(); Keys.onSelectPressed: guest.doGuest(); Keys.onSpacePressed: guest.doGuest(); onClicked: guest.doGuest(); diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml index b26f7b3..56f31b1 100644 --- a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml @@ -136,6 +136,7 @@ Item { Item { id: returnKey Keys.onReturnPressed: container.accept() + Keys.onEnterPressed: container.accept() Keys.onEscapePressed: titleBar.state = "" } } diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml index 6cd0a50..558bc18 100644 --- a/demos/declarative/twitter/TwitterCore/TitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml @@ -98,6 +98,7 @@ Item { Item { id: returnKey Keys.onReturnPressed: container.accept() + Keys.onEnterPressed: container.accept() Keys.onEscapePressed: titleBar.state = "" } } -- cgit v0.12