MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

3D Keyboard

Open jbienzms opened this issue 9 years ago • 48 comments

Something that’s come up in several conversations with developers is the challenges with virtual keyboard support in 3D. Looking in the forums, this is a common problem there too.

The suggested workaround is covered in the article Keyboard input in Unity, but that guidance requires that the user leave the 3D application and requires that the app be built for Xaml instead of D3D.

This is driving many developers to create their own Unity keyboard or purchase one from the Asset Store. I propose that a solid, basic, skinnable keyboard should be included in the Holo Toolkit.

jbienzms avatar Mar 02 '17 22:03 jbienzms

Great idea, but a skinnable keyboard might be a little difficult. Depends on the implementation, with either uGUI or an alternative using geometry and text meshes.

IMO the application design should avoid the need for a virtual keyboard, if possible.

I think we should also make sure speech to text dictation is also a feature of this virtual keyboard as well.

StephenHodgson avatar Mar 02 '17 23:03 StephenHodgson

Not sure if that documentation is just out of date, but this is from the Unity 5.5 release notes:

Windows Store: New implementation for TouchScreenKeyboard on UWP. XAML and D3D apps are now supported, as well as IME input. To turn on older implementation, pass the command line argument -forceTextBoxBasedKeyboard.

https://unity3d.com/unity/whats-new/unity-5.5.0

Or does that change not apply to HoloLens? (Forgive my ignorance, I've yet to have a need for text input in the things I've worked on).

[Edit] Either way a standard keyboard that works in the context of your application instead of having to pop out of the volumetric view would be useful.

thebanjomatic avatar Mar 03 '17 17:03 thebanjomatic

Not sure. A quick search didn't produce any results though.

The unity documentation hints that it could be used.

Interface into the native iPhone, Android, Windows Phone and Windows Store Apps on-screen keyboards - it is not available on other platforms.

[edit] Here's the Microsoft documentation on the TouchScreenKeyboard usage in Unity but only specifies XAML

StephenHodgson avatar Mar 03 '17 19:03 StephenHodgson

@jbienzms Thanks for the suggestion! Currently, we are looking into some of the options for this.

cre8ivepark avatar Mar 08 '17 00:03 cre8ivepark

Hello Everyone, on behalf of Matrix Inception team, I would like offer to donate our HoloLens D3D Keyboard to this great community. Currently, this is an asset available for sale in the Unity Asset Store (store link: http://u3d.as/KS8 and video link: https://youtu.be/83_oR3Oy4CA).

This D3D Keyboard came out of necessity in our own app development. We hope it will be useful to many other developers to come, and we welcome further enhancements.

Thank you Jared @jbienzms for making this request. Please let me know what you think and how to proceed.

-- Sky @ Matrix Inception

MatrixInception avatar Apr 01 '17 03:04 MatrixInception

Thanks @MatrixInception for your contribution! We(Microsoft's HoloLens design team) are working on the keyboard prefab that has same design & interaction as system keyboard to provide consistent UX. It supports various modes including symbol mode and voice dictation. Currently we are doing final fit & finish. We will share the update on this thread. Thanks! Yoon
keyboardforholotoolkit

cre8ivepark avatar Apr 03 '17 17:04 cre8ivepark

Thanks for the update. I guess I was too late! I would suggest one thing though. As a user, I struggled with the layout of the existing OS keyboard on HoloLens, when entering a URL or password. I think you might want to optimize the layout a bit, by mimickng what most PC users are already accustomed to, but prioritize high frequency keys, such as , . /

MatrixInception avatar Apr 03 '17 17:04 MatrixInception

Hi everyone,

I have a forked repository here: "https://github.com/paseb/HoloToolkit-Unity" that has the keyboard and associated test scene. I'm currently seeing a unity side bug with clicking on any InputField and getting a null reference spew in the log.

"NullReferenceException: Object reference not set to an instance of an object UnityEngine.UI.InputField.ActivateInputFieldInternal () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:2146) UnityEngine.UI.InputField.LateUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:698)"

Here's the class diagram: keyboard_classdiagram

I've created a new InputField that you can specify the type of keyboard you'd like to spawn in for the input field. The keyboard side should be pretty extensible with keyboards based on entry type.

public enum LayoutType{ Alpha, Symbol, URL, email }

I still have some clean up and bugs to resolve with the axis slider and initial placement but wanted to give an update.

thanks, -pat

paseb avatar Apr 06 '17 19:04 paseb

we really need this, really happy to see someone work on it!!!

zhao-zilong avatar Apr 07 '17 08:04 zhao-zilong

There appears to be a bug in InputField targeting Windows Holographic. As I mentioned above here's the simple repro steps:

  1. Add an InputField to the InputManagerTest scene
  2. Click on it.
  3. Notice the null references.

I thought it could be a carat issue but the carat is being generated and not null. Now looking into a possible system keyboard issue. If anyone has the time to help track this down, or have any insight into the issue that would be awesome!

paseb avatar Apr 07 '17 18:04 paseb

Is there any progress update or an ETA on when the keyboard would be finished and added to the HTK?

ignavus avatar May 03 '17 07:05 ignavus

@MatrixInception what happened to donation? =)

firativerson avatar May 08 '17 13:05 firativerson

@firativerson It appears that an official solution is just around the corner from Microsoft team, so we didn't proceed, to reduce confusion.

MatrixInception avatar May 08 '17 16:05 MatrixInception

Hello, any updates on the process ? We also halted our virtual keyboard development since official is on it's way. :)

Flanowski avatar May 19 '17 09:05 Flanowski

@cre8ivepark how is it going? can you share some info about the progress?

konradsikorski avatar May 19 '17 09:05 konradsikorski

@Flanowski @konradsikorski It looks like we are blocked by the bug that @paseb described above. @paseb Could we check with the latest HoloToolkit?

cre8ivepark avatar May 19 '17 16:05 cre8ivepark

Hi everyone,

Sorry for the late reply I was out for the past 2 weeks but was able to solve the bug I mentioned above. In order to use any InputField with click events in Unity you need to have a Standalone Input Module active in the scene. Otherwise it blows up with the cryptic error above.

Everything is up and running and we have a couple minor bugs to fix before integrating:

  1. Resolving a bug with the Carat placement and having it show up intermittently
  2. Fix bug with entry slider for keyboard
  3. Validate spatial placement in device
  4. Provide option for enter to carrage returns rather than closing the keyboard like a submit

I've added @StephenHodgson as a contributor to get more eyes on it before committing. I'd encourage anyone to pull the keyboard repository and run the KeyboardTest scene under HoloToolkit\UI\Test and provide any feedback you have on the implementation.

thanks, -pat

paseb avatar May 19 '17 16:05 paseb

I'm on vacation until next week, but I'll take a look as soon as I get a chance. Really excited to see this get added. Thanks for all the hard work Pat.

StephenHodgson avatar May 19 '17 18:05 StephenHodgson

@paseb Great news, I will check it on Monday :D

konradsikorski avatar May 19 '17 19:05 konradsikorski

Curious if there was any progress on this.

jasonhbartlett avatar Jun 08 '17 20:06 jasonhbartlett