• 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 LetsGoHeat · May 12, 2011 at 05:27 PM · webplayermac

Web player - How to check the initial state of caps lock?

I want to grab some text input from the user through the Unity WebPlayer.

On Windows, there are no issues, as Input.inputString takes caps into account. However, on Mac, Input.inputString is broken (see here).

In order to get around this, I created a script that runs on RuntimePlatform.OSXWebPlayer that calls Input.GetKey() on all desired characters every frame.

The only issue with this is that I do not know the state of caps lock when the web player starts. As mentioned here:

KeyCode.CapsLock and Event.capsLock only returns True if the key is pressed, not returning the state of the lock. There would be a way with importing System.Console namespace with the CapsLock function but Unity doesn't seem to import it... Must be some kind of a security issue. I also could take a use of it but couldn't find an answer yet.

Does anyone know of a way to tell whether or not caps lock is on at the start of a webplayer? Or would there be any other way to get user input on Mac which takes caps lock into account?

Thanks.

Comment
GesterX

People who like this

1 Show 1
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 prestonf · Nov 22, 2013 at 02:23 AM 0
Share

Are there any updates on this? I am wondering the same thing.

0 Replies

  • Sort: 

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Web Player doesn't appear for some Chrome Mac users 0 Answers

unity wont appear as installed on mac 0 Answers

Web player performance problem on MAC OS X 3 Answers

In-app purchase "Invalid product" on Mac Store build 0 Answers

FireFox 41.0.1 on Mac Yosemite cuttOff top edge UnityWebplayer ? 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