godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.85k stars 20.15k forks source link

Physical mouse Right click in android #95732

Open AmanRajAryan opened 3 weeks ago

AmanRajAryan commented 3 weeks ago

Tested versions

4.3

System information

Android 10

Issue description

I'm currently using 4.3 and physical mouse right click doesn't work and even long press by mouse left button doesn't opens the context menu

Steps to reproduce

Press right mouse button and nothing will happen

Minimal reproduction project (MRP)

Just open any project in android editor

### Tasks
Alex2782 commented 3 weeks ago

I couldn't reproduce it, where exactly did you try it? Please take a screenshot.

AmanRajAryan commented 2 weeks ago

I couldn't reproduce it, where exactly did you try it? Please take a screenshot.

Is your physical mouse right click working in android editor , if so I'd like to see it

Alex2782 commented 2 weeks ago

Is your physical mouse right click working in android editor , if so I'd like to see it

INPHIC Wireless Mouse Bluetooth on Samsung Tab S7 - Android 13

Press right mouse -> opens the context menu

https://github.com/user-attachments/assets/1a8957b9-720f-4bf4-8aab-9ab9a0a1e394

AmanRajAryan commented 2 weeks ago

Sorry but I forgot to mention that, somehow OneUI have setting by which we can even configure the behaviour of different buttons but most of the android phones don't have it

Alex2782 commented 2 weeks ago

Can you debug this and check which events are arriving?

extends Control

func _gui_input(event: InputEvent) -> void:
    if event is InputEventMouseMotion:
        return

    print(event)

adb logcat -s godot

Logcat -------------------- **Left Button** ``` InputEventMouseButton: button_index=1, mods=none, pressed=true, canceled=false, position=((115, 179)), button_mask=1, double_click=false InputEventMouseButton: button_index=1, mods=none, pressed=false, canceled=false, position=((115, 179)), button_mask=0, double_click=false ``` Right Button ``` InputEventMouseButton: button_index=2, mods=none, pressed=true, canceled=false, position=((150, 218)), button_mask=2, double_click=false InputEventMouseButton: button_index=2, mods=none, pressed=false, canceled=false, position=((150, 218)), button_mask=0, double_click=false ```