Forward mouse move without button pressed to device (original) (raw)

Recently I'm implementing --forward-all-clicks option for my client, and I tried to use ACTION_HOVER_MOVE action for mouse movement events without button pressed. I was surprised that many Apps will react to it

Related code: https://github.com/yume-chan/ya-webadb/blob/36d44243cc1b40dcaa83c77b0b423add5202c8f7/apps/demo/pages/scrcpy.tsx#L676-L681

handlePointerMove = (e: React.PointerEvent) => { this.injectTouch( e.buttons === 0 ? AndroidMotionEventAction.HoverMove : AndroidMotionEventAction.Move, e ); };

180583c0-2d95-4607-ac1f-14b0349da660
(Google Chrome)

b829b9db-e512-434c-bf6b-3f44f910df0d
(Samsung One UI Settings)

8f27b340-30bc-47c7-9c8e-65e299a341c8
(Google Play Store)

8db70db7-04fd-4802-a282-a2efba5b3d21
(Twitter, notice second bottom bar button)

It's not very useful, and I'm not actually requesting you to implement it. Just want to let you know it's possible.