Anuken / Mindustry-Suggestions

Repository for Mindustry suggestions and feedback
131 stars 58 forks source link

[Android]Right Mouse Button pauses game on some ROMs #1913

Closed Blue-Beaker closed 3 years ago

Blue-Beaker commented 3 years ago

Describe what you would like changed, and why.

On Android there's an option called mouse&keyboard controlls, the right mouse button is used to destroy buildings by default but on some ROMs the right button functions as a back button, which causes the game to pause.

Describe the changes you want to propose. Include possible alternatives. Disable the back action for Right mouse button in game so you can destroy buildings properly.

itcannotbe commented 3 years ago

The game can't do shit about it if your android device doesn't allow changing that behavior.

deltanedas commented 3 years ago

wrong suggestion repo, go pester lineage maintainers

Blue-Beaker commented 3 years ago

The game can't do shit about it if your android device doesn't allow changing that behavior.

Most of the remote desktop apps works well with the right mouse button on my phone however. There must be a way to disable the right-click back feature temporarily

joshuaptfan commented 3 years ago

There must be a way to disable the right-click back feature temporarily

If there is, it won't be in Mindustry. This is not a problem that can be solved in each app you use individually, it's an operating system or driver problem. Perhaps there is a setting in the ROM?

Please close this issue, it's not relevant to Mindustry.

Blue-Beaker commented 3 years ago

There must be a way to disable the right-click back feature temporarily

If there is, it won't be in Mindustry. This is not a problem that can be solved in each app you use individually, it's an operating system or driver problem. Perhaps there is a setting in the ROM?

Please close this issue, it's not relevant to Mindustry.

According to those remote desktop apps there IS a way for app to disable right-click back feature temporarily WITHOUT modifying system settings while Mindustry doesn't use. Maybe need to use mouse events like those remote desktop apps does?

joshuaptfan commented 3 years ago

According to those remote desktop apps there IS a way for app to disable right-click back feature temporarily WITHOUT modifying system settings while Mindustry doesn't use. Maybe need to use mouse events like those remote desktop apps does?

App-level fixes may be possible, but I doubt anyone has the stomach to maintain such a fix when right-click may be indistinguishable from normal back button presses depending on the intricacies of each ROM. It would be a nightmare to test, requiring a variety of devices (both Samsung and non-Samsung) and peripherals.

Quote from Anuke:

Mindustry's mobile mouse/keyboard support is basically dead. I don't play Mindustry on mobile, and I definitely don't test it with keyboards or mice. It's only functional because libGDX had some code to support it.

Blue-Beaker commented 3 years ago

According to those remote desktop apps there IS a way for app to disable right-click back feature temporarily WITHOUT modifying system settings while Mindustry doesn't use. Maybe need to use mouse events like those remote desktop apps does?

App-level fixes may be possible, but I doubt anyone has the stomach to maintain such a fix when right-click may be indistinguishable from normal back button presses depending on the intricacies of each ROM. It would be a nightmare to test, requiring a variety of devices (both Samsung and non-Samsung) and peripherals.

Quote from Anuke:

Mindustry's mobile mouse/keyboard support is basically dead. I don't play Mindustry on mobile, and I definitely don't test it with keyboards or mice. It's only functional because libGDX had some code to support it.

So according to anuke's comment this most probably not to be fixed?

itcannotbe commented 3 years ago

You can't fix what's not broken.

Blue-Beaker commented 3 years ago

This may be a fix: https://stackoverflow.com/questions/10041295/android-usb-mouse-right-click-correct-behaviour-ics/29311126#29311126

You can also override boolean onKeyDown(int keyCode, final KeyEvent event) and onKeyUp in your activity class, and check if( keyCode == KeyEvent.KEYCODE_BACK && event.GetSource() == InputDevice.SOURCE_MOUSE ) ... to filter keypresses generated by USB mouse, but to process your phone Back key normally. – pelya Jun 4 '15 at 20:10

github-actions[bot] commented 3 years ago

This suggestion is now stale, and will be automatically closed.