← Back to team overview

ubuntu-phone team mailing list archive

Re: questions about field navigation with Ubuntu Touch on desktop/phone

 

On 26.04.2014 16:48, David Marceau wrote:
> Is there an api for setting the field navigation order when the user
> presses the shift/tabulation key on the keyboard to navigate
> backward/forward across the different gui fields in one page?
>
> Is there an api for setting the field navigation order for Ubuntu Touch
> phone?  Is there a way to navigate backward across fields using the
> default ubuntu touch phone's on-screen-keyboard(i.e. shift+return)?
> What if a field is not a textentry? How are we expected to navigate
> through the fields?  Is a touch action is the only way?

Check out KeyNavigation¹ for keyboard navigation. Tab / Shift+Tab works
through that, as well as arrow keys. For OSK navigation, see
TextField.accepted². I don't think there's API for going back with the
OSK, but I don't think it'd be needed, most often the previous field is
visible above anyway, and it's probably as quick (or quicker, if you
want to go back multiple fields) to just select the one you want to go
back to.

If a field is not a text entry, there's no OSK, so touch and Tab /
Shift+Tab are the only way, but that's probably good enough, too.

¹ http://qt-project.org/doc/qt-5/qml-qtquick-keynavigation.html
²
http://developer.ubuntu.com/api/qml/sdk-1.0/Ubuntu.Components.TextField/#accepted-signal

-- 
Michał (Saviq) Sawicz <michal.sawicz@xxxxxxxxxxxxx>
Canonical Services Ltd.

Attachment: signature.asc
Description: OpenPGP digital signature


References