Mouse wheel scrolls behavior in Chromebook

1.5k views Asked by At

I am transitioning my android app to Chromebook and found a very strange behavior of an external mouse.

Here are my observations

1) External wheel mouse connected to Chromebook, on scrolling wheel, ACTION_SCROLL is not triggered in onGenricMotionEvent method. Don't why

2) All events passed through onTouchEvent method instead of onGenricMotionEvent only mouse pointer related event comes in onGenericMotionEvent.

While if you connect a external mouse to your phone or tablet, you will same behavior as expected. i.e ACTION_SCROLL event will come on scrolling via mouse wheel and events don't come in onTouchEvent method instead goes to onGenericMotionEvent method.

My question is this is designed in such a way or I am doing something wrong? or it's a bug in google Chromebook?

Any type of help will be appreciated

2

There are 2 answers

0
Dennis Kempin On

This is expected behavior and done for compatibility reasons. A lot of apps have troubles scrolling with onGenericMotionEvents, so on ChromeOS a mouse will emulate a touchscreen when scrolling.

Android Apps on ChromeOS have to strike a pretty delicate balance between making existing apps work and keeping API expectations.

1
Hiroaki Satake On

This problem was maybe fixed in latest ChromeOS.
In my Acer R11, ACTION_SCROLL is triggered.

https://chromereleases.googleblog.com/2017/10/stable-channel-update-for-chrome-os.html