Adds duration args to allow arbitrary duration of keyevent press
This will be helpful to debug longer duration key press. This has
also been one of the requested features asked in stackoverflows (some
people tried to seed events directly to evdev as workaround).
New commands:
keyevent --duration <duration_ms> <keycode>
This will be mutually exclusive with --longpress, meaning that only one
of them can be passed. This 'duration_ms' will also be applied when
combined with other args ('--doubletap', '--delay').
Bug: 335533324
Test: atest InputShellCommandTest
Test: adb shell input keyevent --duration 1000
Change-Id: I3a86f5c4b89b435bc984b09ba6f504a59b5e0918
2 files changed