Last active
July 6, 2021 10:45
-
-
Save jacob-pro/70dbc258f06b1b469d03c482479f8f92 to your computer and use it in GitHub Desktop.
Control Android camera from PC keyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.\adb.exe devices | |
$run = $true | |
"Press space for shutter or X to exit" | |
while($run) { | |
$key = [Console]::ReadKey($true) | |
if($key.KeyChar -eq ' ') { | |
.\adb.exe shell "input keyevent KEYCODE_CAMERA" | |
} elseif($key.KeyChar -like 'x') { | |
$run = $false | |
} | |
} | |
.\adb.exe kill-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment