-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Add On Screen buttons #7
Comments
Yes, we discussed it internally, but it's not trivial in SDL since there are no widgets. But there are shortcuts:
EDIT: now shortcuts use Alt by default. |
+1 for that! I hope you will find time to investigate that... |
If this isn't easily done onscreen, then perhaps a sidebar would be doable, such as how the Android Emulator or Vysor handles this. In addition to the navigation buttons, I'd love to have buttons for screenshots and video capture as well, but perhaps that's out of scope for this issue specifically and should have its own issue. Edit: I see that issue #21 has been opened to request a keyboard shortcut to start screen record/capture. |
For Macbook, “Esc” is back, And "Fn + Left" is Home. |
Can you please use the same keys as used in the emulator, and even allow to customize? For me, the most commonly used are Home (which is the home button on the keyboard) and Back (which is Escape button on the keyboard). |
It also works.
Escape sends ESCAPE to the device, which behaves similar to BACK (but not totally). I don't understand the logic though. Maybe it's the same on the emulator… |
@rom1v Home button seems to work. |
@Kyle-Falconer Hey, how did you get this working on emulator? Works fine for devices but I get this error when i run for emulator
|
I tested on emulator with Oreo. Works for only Oreo. Doesn't seem to work for Nougat, Marshmellow and below. |
What does the mouse-right-click do? |
If the device screen is off, it turns it on. Otherwise, it presses BACK. But currently, it's only on the |
@rom1v It doesn't do BACK for me. Only wakes the device. |
@AndroidDeveloperLB Did you compile from the |
@rom1v I only launched the binaries for Windows OS. Did you mean the BACK will work on the dev branch? |
Yes. It has been implemented after the release. |
@rom1v OK sorry. |
@rom1v : "Home" button is NOT working here. Other keys - Ctrl+H and Middle click - both works fine. "Long press" is not supported. "Double tap" is not supported. Fast press Ctrl+P and Ctrl+Down (or Ctrl+Down and Ctrl+P) is NOT creating screenshot. (And last - for screen resize, there could be "resize screen to actual device size"). Version 1.11, device OnePlus 3T. I am using Debian buster but installed the packages from Debian sid/testing repository (dpkg with "--force-depends" because libavcodec58, libavformat58, libsdl2-2.0-0): scrcpy_1.11+ds-1_i386.deb, scrcpy_1.11+ds-1_i386.deb Very useful application. |
That's true, it's annoying to use the keyboard for that. But there are only 3 buttons on many mice (click, home, back).
Mouse wheel up/down are used for scrolling. I would like to keep Ctrl+wheel for zoom or something if we need to. Maybe Cltr+click_wheel?
That's on purpose: 5d473ef.
Hmm, it is. If I long press with left-click, it acts as if I long pressed with the finger.
I don't know, it correctly sends
Same with
If I double click on a text, it selects it, while if I single-click, it does not. What do you mean by "double tap" is not supported?
On my device (OnePlus 7 Pro), it behaves that way.
On my device, it does. (I didn't know that, but I just tested)
|
No, "Ctrl" is again a keyboard key.
Both are about HOME, BACK, APP_SWITCH (Recents). Android 9 Pie can assign actions (in Setting/Buttons/Buttons).
I did mistake! Maybe my double press was very slow.
I did mistake! Somehow my screenshot action (application?) is completely disabled.
Ctrl+G is 1:1 pixels, I mean 1:1 physical size/inches (approximately). Sorry for my mistakes! :-/ |
Oh, actually, it only does that for keyboard shortcuts. With the mouse, it sends both down/up immediately. It will be a bit more complex for BACK, because the right click is used both for "power on" and "back", and the choice is done by the server (on the device). Could you please open a separate issue for correctly handling long press of HOME and BACK using the mouse? |
Created issue 1062 . (Mouse and keys also, because I do not understand fully your answer) |
What was done? Did you add long pressing on navigation buttons (both mouse and keyboard) ? |
@AndroidDeveloperLB - No. Sorry for confusion. Just created new issue for long press. Edited my previous comment. |
@mmm4m5m |
@AndroidDeveloperLB - Yes, middle-click is currently for "HOME". I think, it is better if both are switched - keyboard for HOME, mouse for APP_SWITCH. Command line parameter to change this behavior could help. |
So what would long pressing the middle mouse button do? Will it go to recent tasks? I also wonder if there is a function to switch to the recent-tasks (double click on recent-tasks button), or even switch left/right (using the new navigation gestures). I ask this because my mouse actually have 2 more buttons. One for back-navigation and one for forward . I use them mostly on the web browser |
@AndroidDeveloperLB - It will do the action you assign in your phone settings. Switching to last task works fine. If you press "double Ctrl+S" will send "double APP_SWITCH" (double RECENTS) to device. If your mouse is smart enough, or maybe using some software, then you can assign "Ctrl+S" to your mouse extra buttons. Gestures, I assume, are more complicated to assign to a key/mouse button. But you can do gestures using the mouse pointer. |
Maybe you have some non-vanilla rom, because I have Pixel 4 and I have no setting of what to do upon long/double pressing the home button. |
The fix for #1062 is to correctly send DOWN and UP actions separately for mouse shortcuts (like keyboard shortcuts). The "long press" is still (implicitly) managed by the device. |
Maybe it's best to just make a nice UI for the app? |
"just" |
@rom1v Sorry. Isn't Google in some good relationship with Genymobile? Maybe they could help? |
I don't know. I'm not a Genymobile employee anymore. Since the initial release of the project has been published, I develop/maintain scrcpy on my free time (which is scarce, I have a full time job on other projects).
Anyone could help. Several people have already contributed. |
Sorry for that. Seeing "Genymobile" in the repository, I assumed this repository belongs to them. |
Please add the toolbar (out of phone screen) with virtual buttons (back, home, appswitch) and there can be also save screenshot, capture video buttons. There are still plenty of phones with hardware buttons, so no virtual buttons on screen possible in that case. And it is also not really convenient to remember mouse / keyboard shortcuts... (especially if do not use them on daily basis). |
+1. I hope you add an optional feature for the phones with hardware buttons. Alt+S is not very intuitive compared to buttons. |
My phone has capacitive buttons, and because of that i don't have on-screen buttons. A command line argument for showing the buttons would be nice.
The text was updated successfully, but these errors were encountered: