Since API 14, right mouse clicks should have been easy to detect via getButtonState().
However, when I right-click, then it acts as the Back button. The middle button acts like the Home button. (Android 4.4, Galaxy Note 3, mouse via USB adapter)
My question:
The default behavior for the middle and right button are as you described for most devices, as is defined by the OS.
Starting at API level 14, there is a way to handle the second and third button from the MotionEvent of a GenericMotionListener.
I suggest you have a look at the answers to this similar question for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With