can android os capture Bluetooth Mouse right-click and wheel event?

后端 未结 1 1849
时光说笑
时光说笑 2021-01-14 22:19

I have an andriod 2.3.5 phone,it can connect to a bluetooth mouse. But I find it only response to left-click and mouse-move.

if (event.getAction() == MotionE         


        
相关标签:
1条回答
  • 2021-01-14 22:30

    Apparently API level you're using (10) still doesn't have any way of discerning between one mouse button or the other and all clicks are treated as touches on the screen. If you were working with 14+ you could do MotionEvent.getButtonState() to check wether it's the primary, secondary or other button that got pressed.

    Source

    0 讨论(0)
提交回复
热议问题