-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UHID does not work the same as OTG #4727
Comments
Add
Yes, the reason why OTG exists is to control the device without using USB debugging (adb) and a server on the device. UHID mode requires all that, so in a sense it behaves like the "normal mode". But it is true that a mode without mirroring could be added, since in UHID mode the mouse is relative (this is not possible with the default mouse mode, because the mouse is absolute, this would be unusable). It would require quite a lot of changes to support a control-only mode with UHID though. EDIT: maybe not so much, I will think about it. |
Add the possibility to only control the device with any keyboard and mouse mode without screen mirroring. This is different from OTG mode, which does not require USB debugging at all. It is just the standard mode but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <#4727> Fixes #4793 <#4793>
Add the possibility to only control the device with any keyboard and mouse mode without screen mirroring. This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <#4727> Fixes #4793 <#4793>
Add the possibility to only control the device with any keyboard and mouse mode without screen mirroring. This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <#4727> Fixes #4793 <#4793>
Please test #4868. |
Excellent performance! However, the other issue, the mouse click specification, I still think that all clicks should be forwarded automatically in UHID mode. |
Thank you for your test 👍 🎉
In many cases, it turns out that pressing BACK with the mouse is more useful than a real right click on an Android device. In the very first public version of scrcpy (2018), all clicks were forwarded. A few days later, in v1.1, I added this commit: 675704c (suggested by a user and independently by a colleague). In practice, I always use BACK with the mouse. So in my opinion, this is a good default. I understand that there are cases where it is better not to capture right-click for a shortcut, but at least there is an option to disable it ( EDIT: maybe I missed the most important part: in UHID mode (and AOA) I agree it makes sense, but then we would need a new option to disable it (it's still useful to press BACK or HOME with the mouse). |
Add the possibility to only control the device with any keyboard and mouse mode without screen mirroring. This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <#4727> Fixes #4793 <#4793> PR #4868 <#4868>
In relative mouse modes (when the cursor appears on the device), it makes more sense to forward all clicks (disable HOME/BACK shortcuts on secondary clicks). Transform the boolean option --forward-all-clicks into a 3-state option: - --forward-all-clicks=true or --forward-all-clicks: enable - --forward-all-clicks=false: disable - --forward-all-clicks=auto (default): enable only for AOA and UHID That way, by default, all clicks are forwarded with `scrcpy -M`. Refs <#4727 (comment)>
In relative mouse modes (when the cursor appears on the device), it makes more sense to forward all clicks (disable HOME/BACK shortcuts on secondary clicks). Transform the boolean option --forward-all-clicks into a 3-state option: - --forward-all-clicks=true or --forward-all-clicks: enable - --forward-all-clicks=false: disable - --forward-all-clicks=auto (default): enable only for UHID and AOA That way, by default, all clicks are forwarded with `scrcpy -M`. Refs <#4727 (comment)>
Add the possibility to only control the device with any keyboard and mouse mode without screen mirroring: scrcpy -KM --no-video --no-audio This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <#4727> Fixes #4793 <#4793> PR #4868 <#4868>
Add the possibility to solely control the device with any keyboard and mouse mode without screen mirroring: scrcpy -KM --no-video --no-audio This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <#4727> Fixes #4793 <#4793> PR #4868 <#4868>
In relative mouse modes (when the cursor appears on the device), it makes more sense to forward all clicks (disable HOME/BACK shortcuts on secondary clicks). Transform the boolean option --forward-all-clicks into a 3-state option: - --forward-all-clicks=true or --forward-all-clicks: enable - --forward-all-clicks=false: disable - --forward-all-clicks=auto (default): enable only for UHID and AOA That way, by default, all clicks are forwarded with `scrcpy -M`. Refs <#4727 (comment)> PR #4877 <#4877>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs #4727 <#4727 (comment)>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs <#4727 (comment)> PR #5022 <#5022>
Add the possibility to only control the device with any keyboard and mouse mode without screen mirroring: scrcpy -KM --no-video --no-audio This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes #4727 <Genymobile/scrcpy#4727> Fixes #4793 <Genymobile/scrcpy#4793> PR #4868 <Genymobile/scrcpy#4868>
Add the possibility to solely control the device without screen mirroring: scrcpy --no-video --no-audio This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes Genymobile#4727 <Genymobile#4727> Fixes Genymobile#4793 <Genymobile#4793> PR Genymobile#4868 <Genymobile#4868>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs <Genymobile#4727 (comment)> PR Genymobile#5022 <Genymobile#5022>
Add the possibility to solely control the device without screen mirroring: scrcpy --no-video --no-audio This is different from OTG mode, which does not require USB debugging at all. Here, the standard mode is used but with the possibility to disable video playback. By default, always open a window (even without video playback), and add an option --no-window. Fixes Genymobile#4727 <Genymobile#4727> Fixes Genymobile#4793 <Genymobile#4793> PR Genymobile#4868 <Genymobile#4868>
By default, only the left click is forwarded to the device, and secondary clicks trigger shortcuts (the behavior can be configured by --mouse-bind=xxxx). But when the mouse mode is relative (AOA and UHID modes), forward all clicks by default. This makes more sense since the cursor is handled on the device side, the user expects all mouse buttons to be forwarded. Refs <Genymobile#4727 (comment)> PR Genymobile#5022 <Genymobile#5022>
Environment
Describe the bug
If you try to enter in UHID, you will not be able to use it as a replacement for OTG.
In UHID mode, all mouse buttons except left mouse click are treated as special keys (right click is BACK, middle click is HOME).
Also, if there is no video/audio playback, the program will be forced to exit.
The text was updated successfully, but these errors were encountered: