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
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.