• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by skeptika · Dec 23, 2016 at 12:33 AM · user interfacetouchscreenkeyboardkeyboardevent

Getting reference to TouchScreenKeyboard on mobile devices

Unity automatically pulls up TouchScreenKeyboard when you tap on something in the UI like an InputField. This is great.

However, I can't see anyway to actually get a reference to it. Why do I want a reference? So I can detect when TouchScreenKeyboard.done is true. This leaves me with two options, I'd take a solution on either one:

  1. Get a reference to Unity's automatically pulled up TouchScreenKeyboard. Hence the question, if you know how, please let me know!

  2. Disable Unity from automatically pulling up the TouchScreenKeyboard on certain UI events. That way I can pull it up manually, and obviously grab my own reference.

Any help?

Comment
aurelienpic
1g0rrr
panderson9149

People who like this

3 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Geometrical · Dec 23, 2016 at 12:39 AM

You can hide the keyboard under specified conditions: Click here to find out how also here

Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image skeptika · Dec 23, 2016 at 06:43 PM 0
Share

Yah oops didn't post as a comment, my bad. This won't work because as you'll note in their example, they already have a reference to the keyboard, it's not the automatic keyboard brought up by Unity. That example assumes you're hiding a keyboard you've already got a reference to, which is not the case when Unity automatically pops it up for you!

As to the reply that "just create a custom keyboard for text input, he'll have plenty of control over that :)" this also doesn't address the problem because the Unity keyboard automatically pops up, that's why I have option 2 above. For that to work though, I'd have to suppress the Unity automatic keyboard which I don't know how to do (hence option 2 question above).

So yah, that doesn't really answer the problem unfortunately. I'd already read through those docs. The problem remains as outlined in options 1 and 2 above.

Anyone else have any insight or ideas?

avatar image

Answer by ramishaziev · Dec 21, 2018 at 07:00 AM

InputField has touchScreenKeyboard property, you can use it

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

62 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Keep InputField focus / selected when clicking a button / touch screen /UI 4.6 2 Answers

Unity TouchScreenKeyboard special characters 0 Answers

detecting iPad floating keyboard show/hide? 0 Answers

Best 2d User Interface for Mobile and Other platforms 1 Answer

How to use inputfield with a button and text? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges