Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Right mouse button acting as back button #4631

Open
AJenbo opened this issue May 31, 2022 · 5 comments
Open

[android] Right mouse button acting as back button #4631

AJenbo opened this issue May 31, 2022 · 5 comments

Comments

@AJenbo
Copy link
Member

AJenbo commented May 31, 2022

This appears to be a kernel "feature" on some Android devices. Meaning that the player won't be able use the right mouse button on affected devices.

libsdl-org/SDL#2067 has a comment with a possible workaround:

The solution is to add:

@OverRide
public void onBackPressed() {
/* generate a fake right mouse button event here ?*/
}

to SDLActivity.java.

One down side here is that we would also like to enable the back button in menus, but since we don't need right click there, maybe it is possible to apply this workaround without having to make it a config or lose the back button functionality.

It looks like SDL already handles this to some extent:

// handling KEYCODE_BACK by system will call onBackPressed()
but doesn't translate it to a mouse event. I think there is an example of how to do so here:

@vaniron
Copy link

vaniron commented Aug 15, 2022

Any update on this? Playing on android tablet I would be really glad to use rightclick on my mouse.

@AJenbo
Copy link
Member Author

AJenbo commented Aug 15, 2022

None of the developers have access to a device with this issue, so we have been unable to work on it. Maybe if you join the chat you can help with testing possible workarounds for devices that have this issue.

@vaniron
Copy link

vaniron commented Aug 15, 2022

Withing the game Its doing nothing in lobby or game. Outside in android for example browsers its working as back button. Also tagged you on discord so se can work on that there.

@Gonnnnnnnnnn
Copy link

Turn on developer options and look for "disable permission monitoring"... Turn it on and your right click will start working

@andriemc
Copy link

andriemc commented Jan 5, 2025

Turn on developer options and look for "disable permission monitoring"... Turn it on and your right click will start working

It isn't in the developer options....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants