8

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:

  • Does the (smartphone/tablet) device manufactor decide what to do with right button?
  • Or do different Android versions act differently?
  • What Android versions / devices support right/middle mouse button?
asked Mar 27, 2014 at 15:59

2 Answers 2

1

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.

answered Sep 4, 2014 at 19:19
Sign up to request clarification or add additional context in comments.

1 Comment

Is it possible to make the emulator handle right click as back-key, though?
-1

The answer is yes, the manufacturer controls how the secondary/tertiary buttons react, because it is compiled with the kernel. Generically the right click acts as a back button, however, on a couple of my non-mainstream tablets it uses one of the mouse's side buttons to go back. Usually the wheel button goes home, all tested on my collection of devices. If you want to know how to override the default behavior, whether it be for an app or as a mod, check out my answer here: Change Mouse Right-click behavior

Hope this clears up everything

answered Apr 8, 2015 at 2:57

1 Comment

Is it possible to make the emulator handle right click as back-key?

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.