ToddS
Topic Author
Posts: 14
Joined: 24 Jul 2013, 03:49

Tab order and keyboard navigation

04 Aug 2013, 01:22

I created a simple xaml file containing a textbox and a button. I was expecting that I could use the tab key to change focus between those 2 controls, but it didn't work. I tried setting IsTabStop to true, and setting the tab indexes. Am I missing something?

Also, is the textbox supposed to automatically open up the mobile keyboard when given the focus on Android devices? This did not happen on my Kindle Fire HD so I wasn't able to enter any text.

Thanks.

Todd
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Tab order and keyboard navigation

05 Aug 2013, 11:43

Tab navigation events are not implemented in Unity yet. We will include them in the following release.

And if you want to make software keyboard visible in Android, you can do it with some code that hooks to the desired TextBox events and use Unity touch API:
using UnityEngine;
using System.Collections;
using Noesis;

public class ShowKeyboard : MonoBehaviour
{
    TextBox _txt;
    TouchScreenKeyboard _keyboard;

    // Use this for initialization
    void Start ()
    {
        NoesisGUIPanel gui = GetComponent<NoesisGUIPanel>();
        FrameworkElement root = gui.GetRoot<FrameworkElement>();

        // assuming you have a TextBox names "txt" in your XAML
        this._txt = root.FindName<TextBox>("txt");
        this._txt.GotFocus += OnGotFocus;
    }

    void OnGotFocus(BaseComponent sender, RoutedEventArgs args)
    {
        this._keyboard = TouchScreenKeyboard.Open(this._txt.GetText());
    }

    void OnGUI()
    {
        if (this._keyboard != null && this._keyboard.active)
        {
            this._txt.SetText(this._keyboard.text);
        }
    }
}
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Tab order and keyboard navigation

05 Aug 2013, 12:58

And if you want to make software keyboard visible in Android, you can do it with some code that hooks to the desired TextBox events and use Unity touch API:
Just to make this clear. This is a patch too. Will be solved automatically in the next release.
 
ToddS
Topic Author
Posts: 14
Joined: 24 Jul 2013, 03:49

Re: Tab order and keyboard navigation

05 Aug 2013, 21:39

Ok, to make sure that I understand regarding timeframes, when you say next release, you're referring to the next build hopefully coming within the next couple of weeks, and not the next version 1.1 coming at a later point in time, correct?

Thank you.

Todd
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Tab order and keyboard navigation

05 Aug 2013, 21:50

Ok, to make sure that I understand regarding timeframes, when you say next release, you're referring to the next build hopefully coming within the next couple of weeks, and not the next version 1.1 coming at a later point in time, correct?

Thank you.

Todd
Exactly. Next release is v1.0.2. Our idea is releasing a new version each two weeks (more or less).
 
pSupaNova
Posts: 7
Joined: 25 Jul 2013, 20:37

Re: Tab order and keyboard navigation

06 Aug 2013, 11:21


Just to make this clear. This is a patch too. Will be solved automatically in the next release.
It's not a patch I would l like to control when the keyboard shows because there are lots of options Numpad/full keyboard etc.

Also I might want to make my own keyboard and not want the Unity3D keyboard always showing.

So please if you implement this feature expose the whole Unity3D keyboard API and give us the option to easily suppress the default Unity keyboard.
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Tab order and keyboard navigation

07 Aug 2013, 12:58

It's not a patch I would l like to control when the keyboard shows because there are lots of options Numpad/full keyboard etc.

Also I might want to make my own keyboard and not want the Unity3D keyboard always showing.

So please if you implement this feature expose the whole Unity3D keyboard API and give us the option to easily suppress the default Unity keyboard.
Our idea is to expose a hook that in Unity opens automatically the software keyboard, but allowing anyone to override that default behaviour. Does this solution fits your needs?
 
pSupaNova
Posts: 7
Joined: 25 Jul 2013, 20:37

Re: Tab order and keyboard navigation

07 Aug 2013, 16:49

Our idea is to expose a hook that in Unity opens automatically the software keyboard, but allowing anyone to override that default behaviour. Does this solution fits your needs?
Sounds good.
 
User avatar
jsantos
Site Admin
Posts: 2900
Joined: 20 Jan 2012, 17:18
Contact:

Re: Tab order and keyboard navigation

18 Aug 2013, 18:57

Although we fixed the tab navigation in v1.0.2, the hook for the virtual keyboard was not addressed. We will try to have it for v1.0.3.

Who is online

Users browsing this forum: No registered users and 2 guests