termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.94k stars 301 forks source link

[Feat]: Support send back button to X server from mouse #685

Closed EatHatsuneShallots closed 1 month ago

EatHatsuneShallots commented 1 month ago

Some mouse supports mouse button, these buttons can send the KEYCODE_BACK and KEYCODE_FORWARD key codes.

NOTE: On some Android devices, the right mouse and middle mouse button (HarmoryOS) used as back button.

twaik commented 1 month ago

Not going to be implemented. There are a lot of devices which send KEYCODE_BACK with SOURCEMOUSE when you invoke right mouse button instead of sending MotionEvent.ACTION{UP,DOWN} event with MotionEvent.BUTTON_SECONDARY in details. This change will break mouse behaviour on these devices.

EatHatsuneShallots commented 1 month ago

There are a lot of devices which send KEYCODE_BACK with SOURCEMOUSE when you invoke right mouse button instead of sending MotionEvent.ACTION{UP,DOWN} event with MotionEvent.BUTTON_SECONDARY in details. This change will break mouse behaviour on these devices.

However, some devices works right, so this feature should be add to the "Other -> Response to user actions -> Back button" preferences instead of changing the default behavior.