Skip to content

Instantly share code, notes, and snippets.

@csarron
Created April 20, 2018 02:08
Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save csarron/b3ab1fc6e5e9da622d675c59137ef2a8 to your computer and use it in GitHub Desktop.
Save csarron/b3ab1fc6e5e9da622d675c59137ef2a8 to your computer and use it in GitHub Desktop.
Scrcpy Shortcuts

Scrcpy Shortcuts

Action Shortcut
switch fullscreen mode Ctrl+f
resize window to 1:1 (pixel-perfect) Ctrl+g
resize window to remove black borders Ctrl+x | Double-click¹
click on HOME Ctrl+h | Middle-click
click on BACK Ctrl+b | Right-click²
click on APP_SWITCH Ctrl+m
click on VOLUME_UP Ctrl++
click on VOLUME_DOWN Ctrl+-
click on POWER Ctrl+p
turn screen on Right-click²
paste computer clipboard to device Ctrl+v
enable/disable FPS counter (on stdout) Ctrl+i

¹Double-click on black borders to remove them.
²Right-click turns the screen on if it was off, presses BACK otherwise.

@sur0g
Copy link

sur0g commented Apr 3, 2021

Is there something for turning screen off?

If you want to keep your phone active but not waste your battery, use -S like so: scrcpy -S

@AndroidDeveloperLB
Copy link

@sur0g This works. Thank you very much.

I want to avoid the console (running on Windows OS). I know I can edit the scrcpy-noconsole.vbs file to be, as such, for example:

CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe -S --always-on-top", 0, false

But is there a better way? Can I create a shortcut to it and pass the parameters then, without modifying this file?
It was possible in the past to start scrcpy without console easier. Now for some reason I need this file (or create a copy of it and then modify it) ...

Currently what I did is to copy and modify it, to reach the command as such:

CreateObject("Wscript.Shell").Run "cmd /c C:\android\scrcpy\scrcpy.exe -S --always-on-top", 0, false

@will326
Copy link

will326 commented Jun 1, 2021

Existe algo para desligar a tela?

Pressione LAlt + O quando a janela rápida estiver focada para desligar a tela do telefone. Atualmente, a única maneira de ligá-lo novamente é pressionar o botão liga / desliga do telefone fisicamente.

To turn it back on, press Alt + Shift + O

@DandyJoshua14
Copy link

For me it's Ctrl + s for APP_SWITCH. Ctrl + m doesn't work.

Same here

@saktibuana
Copy link

For me the volume control shortcut doesn't work

@AndroidDeveloperLB
Copy link

@saktibuana For some reason, it requires you to use the left-ALT, and not the right-ALT.
I wish both worked, or just the right one, because I prefer to use a single hand for this.

@khanalrahul
Copy link

Is there any way to pin scrcpy window always at the top in windows? I am tired of loosing small that small window upon a click on other opened windows.

@AndroidDeveloperLB
Copy link

@khanalrahul I use this shortcut on Windows OS:

CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe -S --always-on-top", 0, false

Probably very similar on other OSs.
Sadly, on some cases it loses on-top, probably because of other apps that do it.

@khanalrahul
Copy link

@khanalrahul I use this shortcut on Windows OS:

CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe -S --always-on-top", 0, false

Probably very similar on other OSs.
Sadly, on some cases it loses on-top, probably because of other apps that do it.

I didnot get what actually to do. Where to write this code? Can you describe for me please?

CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe -S --always-on-top", 0, false

@AndroidDeveloperLB
Copy link

@khanalrahul Just like the file you already have when extracting ScrCpy, I made a new one and called it "scrcpy - screen turned off.vbs" .

I've put it on the folder of ScrCpy, and it works fine.

@ravindragullapalli
Copy link

ravindragullapalli commented Sep 21, 2021

According to this: Genymobile/scrcpy#103 (comment)
The volume up and down are actually Ctrl+↑ and Ctrl+↓ (and seems to be not just on the dev branch anymore)

Ctrl+↑ and Ctrl+↓ is working for me. Thanks.

@trancephorm
Copy link

trancephorm commented Dec 19, 2021

Right CTRL-s is a shortcut here for task list on Ubuntu 20.04

Copy link

ghost commented Mar 28, 2022

Im on v1.23 win 10. Shortcuts don't work on my machine.
Trying to rotate image to the vertical but get these messages -
"server] WARN: Could not inject char u+263a"
"server] WARN: Could not inject char u+264o"

@booradlee
Copy link

On Windows
alt + o = Device Screen Off
alt + shift + o = Device Screen On
alt + p = Power Button Press therefore turning screen on and off. Unless Device Screen is Off shown above.

This helped me out, maybe a refactoring of the command shortcuts information would be a neat little project.

@booradlee
Copy link

https://gist.github.com/booradlee/515c2c474ac505301ba8990cb6aca765 Added a few Windows commands, still need to test the linux ones.

@booradlee
Copy link

@khanalrahul I use this shortcut on Windows OS:

CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe -S --always-on-top", 0, false

Probably very similar on other OSs.
Sadly, on some cases it loses on-top, probably because of other apps that do it.

I didnot get what actually to do. Where to write this code? Can you describe for me please?

CreateObject("Wscript.Shell").Run "cmd /c scrcpy.exe -S --always-on-top", 0, false

scrcpy --always-on-top

@shatlyk-jr
Copy link

on some devices alt works instead of ctrl.
(sorry for bad english)

@UsmonWasTaken
Copy link

Can we customize keyboard shortcuts?

@girng
Copy link

girng commented Oct 28, 2022

is there a hotkey for the motion of "dragging down and releasing" to do a refresh?

@booradlee
Copy link

booradlee commented Oct 28, 2022

@girng use your mouse click and drag, not sure about hotkey.

@girng
Copy link

girng commented Oct 28, 2022

@girng use your mouse click and drag, not sure about hotkey.

yeah the mouse works was just curious if there was a hotkey or something that could simulate it. ty

@ArmenKocharyan
Copy link

on some devices alt works instead of ctrl. (sorry for bad english)

Thank you very very much!

@cor-of-org
Copy link

cor-of-org commented Nov 24, 2022

In response to the 'how to turn the screen off'.

double-tap in the status bar. tap anywhere to get the screen back.

@cor-of-org
Copy link

Can we customize keyboard shortcuts?

I second this.

@function1983
Copy link

The volume up and down are actually Ctrl+↑ and Ctrl+↓ (and seems to be not just on the dev branch anymore)

On my linux machine, it's now Alt+↑ and Alt+↓

@AndroidDeveloperLB
Copy link

@function1983 It's also on Windows.
Though, for me it's only left-Alt.
Perhaps the right-Alt is used for really reaching Alt key of the device, or something.

@ckevangelista
Copy link

Is there a way to simulate pressing power and volume down at the same time?

@IamSZaidH
Copy link

For me the volume control shortcut doesn't work

the shortcut for volume is ALT+⬆️ or ALT+⬇️

@leelax22
Copy link

leelax22 commented Oct 6, 2023

The volume up and down are actually Ctrl+↑ and Ctrl+↓ (and seems to be not just on the dev branch anymore)

On my linux machine, it's now Alt+↑ and Alt+↓

windows11 + galaxy s21+ env, it works too. Thanks.

@Aman-s-ingh
Copy link

Is there a way to simulate pressing power and volume down at the same time?

you can press CTL/ALT and then press P and ^(UP) at the same time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment