Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by unityuser000 · Mar 25, 2014 at 11:09 AM · inputkeyboardchrome

When opening unity plugin via Chrome, all keyboard input is disabled? (sometimes temporarily, sometimes not)

An App I'm working on, has an issue whereby, opening the page with the Unity plugin via Chrome - has all keyboard input disabled. Sometimes this effect is temporary and keyboard input returns, other times keyboard input is disabled on the page indefinitely.

Does anyone have any similar experiences? Solutions to this problem?

Here are some more techy details....

This line was added:

if(!string.IsNullOrEmpty(Input.compositionString) || !string.IsNullOrEmpty(Input.inputString)) Debug.Log("Input.compositionString: " + Input.compositionString + ", Input.inputString: " + Input.inputString);

which should print out any keyboard input.

When the bug occurred it wasn’t printing out anything. i.e no keyboard input was being reported to the game. This line of code was definitely still be executed as the caret was still flashing.

Comment
Add comment · Show 5
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 Bunny83 · Mar 25, 2014 at 11:41 AM 0
Share

ps: What "caret" do you mean? do you talk about a GUI textfield? In that case why are you checking Input.XXX? The GUI is soley based on events.

avatar image epred · Jul 07, 2014 at 09:51 AM 0
Share

We are seeing all sorts of input problems across a number of unity projects with chrome. Chrome/Unity3d on the $$anonymous$$ac will not accept keyboard input to a simple entry field unless you switch to full screen. It is intermittent but if it does accept input it loses a lot of the keystrokes

avatar image epred · Jul 07, 2014 at 09:52 AM 0
Share

We are seeing all sorts of input problems across a number of unity projects with chrome. Chrome/Unity3d on the $$anonymous$$ac will not accept keyboard input to a simple entry field unless you switch to full screen. It is intermittent but if it does accept input it loses a lot of the keystrokes.

avatar image andersemil · Mar 30, 2015 at 07:38 AM 0
Share

We have a similar problem here today using Unity 4.6.3f1 and Chrome OS X Version 41.0.something. When we first load the page, keyboard input works fine. If we switch to another chrome tab and back, all keyboard input is gone until the page is reloaded.

avatar image andersemil · Mar 30, 2015 at 07:44 AM 0
Share

Apparently it's a well-known bug with Chrome OS X and it's been reported several years ago, but the status is unconfirmed :( https://code.google.com/p/chromium/issues/detail?id=166601&q=unity%20input&colspec=ID%20Pri%20$$anonymous$$%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20$$anonymous$$odified

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Mar 25, 2014 at 11:31 AM

Are you sure you have actually "clicked" into the webplayer? The webplayer is lika a control. When it's not the active one it doesn't receive key input. That's actually true for most browser plugins. This is even an important security feature. Otherwise if a player has a unity game open in another tab while he's doing some online banking the game could keyspy the login data...

Even when on the same page (which could actually have multiple unity plugins in it) you always have to "make it active" by clicking on it. Take a look at the iTween example page. The "Path-constrained Characters" example uses keyboard input. They made it so when you click on it the webplayer loads and is activated automatically. But if you click for example in the address bar and then on the background of the webpage, the keyboard input won't work anymore. You first have to click again into the plugin area.

edit
The iTween page is actually a bad example :D Unless you left the page at least once they kind of lock the input to the last active plugin. Here's one of my examples. There you can clearly see when you click outside of the plugin you loose the keyboard focus. Once you click inside it's back.

IMPORTANT
The webplayer has another security feature. It will release the keyboard focus and mouse locks when the user presses ESC. You should never use ESC as a key in your game. It's the emergancy key to quit fullscreen. This key will ensure the user gat back the control of his browser / PC.

2. edit
Hmm actually i wes wrong. ESC just frees the mouse and disables fullscreen but keep the keyboard focus.

Comment
Add comment · 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.

Follow this Question

Answers Answers and Comments

23 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

Related Questions

How to check for pressed keys in WebGL? 1 Answer

What Key do you press to "Jump" in the T_T Tutorial? 2 Answers

Input.GetKeyDown doesn't work with several keys 1 Answer

Is it possible to change keyboard input inGame 1 Answer

unbuffered keyboard input delay 2 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