Skip to content

Instantly share code, notes, and snippets.

@csarron
Created April 20, 2018 02:08
Show Gist options
  • 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.

@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)

@itsusmon
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

@Alex-Kochhh
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

@boognish-rising
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.

left alt (lalt) is the default modifier, but it can be changed using --shortcut-mod. Possible keys are lctrl, rctrl, lalt, ralt, lsuper and rsuper. For example:

# use RCtrl for shortcuts
scrcpy --shortcut-mod=rctrl

# or, per your stated preference - use either LAlt or RAlt for shortcuts
scrcpy --shortcut-mod=lalt,ralt

PS - I know I'm responding to a 4+ year old post, but it's less for @AndroidDeveloperLB, who more than likely figured it out by now, and more for the countless scrcpy users that, much like I did, find themselves here due to it being the first Google search result for "scrcpy shortcuts"

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