我可以使用类似的东西:
adb shell input keyevent 4
Run Code Online (Sandbox Code Playgroud)
这将发送一个"后退"按钮按下我的设备.我该如何发送长版?
谢谢
小智 23
您可以尝试以下命令:
adb shell input touchscreen swipe 170 187 170 187 2000
Run Code Online (Sandbox Code Playgroud)
您在屏幕上的申请位置是170,187; 延迟时间是2000(ms);
长按HOME键:
adb shell sendevent /dev/input/event2 1 172 1
adb shell sendevent /dev/input/event2 0 0 0
timeout 1
adb shell sendevent /dev/input/event2 1 172 0
adb shell sendevent /dev/input/event2 0 0 0
Run Code Online (Sandbox Code Playgroud)
你可以转到cmd并输入adb shell getevent | 找到"event2" ; 长按HOME键可以看到更多.
Nic*_*lko 15
自从在Android 4.4中进行此提交后,可以使用:
adb shell input keyevent --longpress KEYCODE_L
Run Code Online (Sandbox Code Playgroud)
这个其他提交进一步改善了行为.
| 归档时间: |
|
| 查看次数: |
32469 次 |
| 最近记录: |