Skip to content

Instantly share code, notes, and snippets.

@jacob-pro
Last active July 6, 2021 10:45
Show Gist options
  • Save jacob-pro/70dbc258f06b1b469d03c482479f8f92 to your computer and use it in GitHub Desktop.
Save jacob-pro/70dbc258f06b1b469d03c482479f8f92 to your computer and use it in GitHub Desktop.
Control Android camera from PC keyboard
.\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