Unlike Android applications that use touchscreens, many ChromeOS devices are laptops or have a laptop mode. As a result, when you build an application for ChromeOS, you must handle inputs from mice, touchpads, and keyboards. You can use the Player setting ChromeOS Input Emulation (menu: File > Build Settings > Player Settings > Other Settings) to determine how your application handles user input on ChromeOS devices.
To emulate touchscreen input, ChromeOS automatically converts left+clicks from a mouse or touchpad input into screen taps. As a result, an Android application that you developed for phones and tablets works by default on a ChromeOS device.
Important: Only left+click and keyboard inputs are supported. Any other inputs are ignored.
By default, this behavior is enabled via the ChromeOS Input Emulation Player Setting.
To support mouse and touchpad input, disable the ChromeOS Input Emulation setting. When you disable this option, your application receives the following mouse and touchpad input unchanged:
When you disable this setting, you also need to write Unity input code to handle mouse and touchpad input. The input code must include information on how to read the cursor position, handle mouse and touchpad clicks, and read scrolling evens. For more information on writing input code, refer to Input for API script references.
Note: Android and ChromeOS support custom cursors. To customize your cursor, refer to Cursor.SetCustomCursor.
On Android, whenever there is an input field or text field selected, the virtual on-screen keyboard always comes up so that the user can enter text. On ChromeOS, when there is a hardware keyboard available, the on-screen keyboard isn’t shown or required. When a hardware keyboard isn’t available, the on-screen keyboard is displayed. This behavior isn’t affected by the ChromeOS Input Emulation Player setting.
Note: If your Android application prompts the user to open a TouchScreenKeyboard, it behaves the same way on ChromeOS.
To support hover over functionality, Unity needs the exact mouse position. When in ChromeOS Input Emulation mode, the exact mouse information isn’t available. As a result, you need to disable the ChromeOS Input Emulation setting to support hover over in your application.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.