Input events on Chromebook

Hey,

We are working an on runtime UI Toolkit project and we are hitting a bit of a snag with Chromebook support. I fully realize Chromebook support is ending with the next version, but would still need to have this working.

So, for chromebook we have the option to toggle Chrome OS Input Emulation, which both result in undesirable behaviour:

When enabled, we don’t have any hover events. Which in our case, some items remain hidden. Not ideal.

When disabled, we need to write our own input code for handling input. As stated on this page: Unity - Manual: Support user input on ChromeOS devices (unity3d.com)

I’m guessing due to the drop of Chromebook support, this will never be something Unity will pick up, so we will need to do this ourselves.

My question is then, how would I do this properly for ui elements? So far I have discovered that toggles and scrollviews will not work with mouse input (clicks and scrolling). Are there other elements that is known to not work?

Additionally, how would I manually (re)create scrolling functionality for scrollviews?

What input backend are you using, if you’re using Legacy, you can try switching to New Input System (you’ll also need to update Standalone Input Module once switching to other input backend).

We were initially on the old input system as we didn’t do anything specific with the new input system.

I tried enabling the new input system, but there is no change in behaviour.

When Chrome OS Input Emulation is enabled, I am able to toggle and scroll, but there are no hover-over events (which makes sense as to what the emulation does)

When Chrome OS Input Emulation is disabled, I am no longer able to toggle checkboxes (I can see them being selected though, with an outline, so it seems they do receive some form of input) and I can’t scroll with the mousewheel/touchpad anymore, also unable to drag the slider with the mouse/touchpad. It all works with the touchscreen though. But now the hover-over events do work.

I tried the different pointer behaviours in the event system, but they make no difference.

So either solution is not really ideal in our case.

This is also only for Chromebook, we also make Standalone windows and macOS builds that do not have any problems.

It seems we would need to make some manual adjustments (according to the documentation) to make either option work.

Here’s what you can do, if you want to ensure Unity looks at this bug.

Try running an app on normal Android device (a tablet or phone) and have mouse connected to it (via bluetooth or wired), and see if the same issue happens, if so. Please report a bug with repro attached.

If the issue happens with regular Android device, this will be treated as higher priority than “issue happens only on Chromebook”.

Note: The input handling code between Android and Chromebook is shared, thus if there’s issue it should happen on both.

Hope that helps

1 Like

Thanks, I will give that a try!