scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Random Left Click Inputs

Open Forneux opened this issue 2 years ago • 5 comments

  • [*] I have read the FAQ.
  • [*] I have searched in existing issues.

Environment

  • OS: [Windows 10]
  • scrcpy version: [2.0]
  • installation method: [Windows release]
  • device model: HUAWEI Y9 Prime 2019 (STK-L22)
  • Android version: [10]

Bug Description Device is connected properly via USB in OTG Mode, and the mouse and keyboard are very responsive. There's just one problem on the mouse input; it sometimes executes a left click even though I didn't left-click on the mouse.

Forneux avatar Apr 08 '23 02:04 Forneux

When that happens, is an input event log printed if you run:

scrcpy -Vverbose

rom1v avatar Apr 08 '23 07:04 rom1v

I've had random mouse clicks in specific applications, which I figured was the application. It seemed to happen no place else, yet the problem was, in fact, my mouse. It just happened to be that the particular application always performed an action with left click, whereas just about everything else in Windows always performs an action with a right click. The infrequent left click wasn't noticeable except in that application.

Android is a lot like that where a tap (left click), almost anywhere and in any application, almost always performs an action. So it'll be readily noticeable the times it happens. If there's a Windows script or application which will make a sound anytime you left click, you may notice that it's clicking even when it wasn't intended, outside of scrcpy. But without some type of obnoxious feedback, in plain windows, random left clicks can go unnoticed...right clicks are a different story. You could also swap the function of left and right click for a few days and see if you get random "right" (physically left button) clicks in Windows, under mouse settings, or if the issue in scrcpy changes to a different function and/or happens less. That'd point to the mouse as the culprit.

That's not to say that it's the mouse, for certain, but I'd lean toward blaming the mouse first, especially if the random clicks happen where the cursor is. Next, I'd blame the touchpad interfering if it's a laptop, or another mouse connected which "isn't being used", but being connected it enough for a hardware issue on something else to cause rogue clicks/taps. Next, I'd blame something funky, electrically, happening when the phone is connected to the computer which is interfering with the digitizer (if it's not where the cursor is)--that could be the fault of the computer, the cord, the phone itself, or a combo. Lastly, I'd blame scrcpy.

I soldered in a new button and replaced the cord, and the issue (which seemingly existed only in that application) went away.

Jon8RFC avatar Apr 08 '23 13:04 Jon8RFC

I've had random mouse clicks in specific applications, which I figured was the application. It seemed to happen no place else, yet the problem was, in fact, my mouse. It just happened to be that the particular application always performed an action with left click, whereas just about everything else in Windows always performs an action with a right click. The infrequent left click wasn't noticeable except in that application.

Android is a lot like that where a tap (left click), almost anywhere and in any application, almost always performs an action. So it'll be readily noticeable the times it happens. If there's a Windows script or application which will make a sound anytime you left click, you may notice that it's clicking even when it wasn't intended, outside of scrcpy. But without some type of obnoxious feedback, in plain windows, random left clicks can go unnoticed...right clicks are a different story. You could also swap the function of left and right click for a few days and see if you get random "right" (physically left button) clicks in Windows, under mouse settings, or if the issue in scrcpy changes to a different function and/or happens less. That'd point to the mouse as the culprit.

That's not to say that it's the mouse, for certain, but I'd lean toward blaming the mouse first, especially if the random clicks happen where the cursor is. Next, I'd blame the touchpad interfering if it's a laptop, or another mouse connected which "isn't being used", but being connected it enough for a hardware issue on something else to cause rogue clicks/taps. Next, I'd blame something funky, electrically, happening when the phone is connected to the computer which is interfering with the digitizer (if it's not where the cursor is)--that could be the fault of the computer, the cord, the phone itself, or a combo. Lastly, I'd blame scrcpy.

I soldered in a new button and replaced the cord, and the issue (which seemingly existed only in that application) went away.

The issue is certainly not on the mouse, since the mouse I'm using works perfectly fine on any application that I use. It's also not the laptop's touchpad, because it's disabled (I literally unplugged its ribbon cable inside the laptop). The random left-click inputs still happen, even after switching left and right click functions.

When that happens, is an input event log printed if you run:

scrcpy -Vverbose

I cannot execute this command, since it's running in OTG mode.

Forneux avatar Apr 14 '23 06:04 Forneux

I cannot execute this command, since it's running in OTG mode.

scrcpy --otg -Vverbose

rom1v avatar Apr 14 '23 08:04 rom1v

I cannot execute this command, since it's running in OTG mode.

scrcpy --otg -Vverbose

I tried it, and it doesn't register a click, but a click is executed anyway.

Forneux avatar Apr 16 '23 05:04 Forneux