-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: clear previous field to make sure you always can type a new one
- Loading branch information
1 parent
29cbff0
commit ca40573
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import execAsync from '../utils/execAsync'; | ||
import * as Logger from '../utils/logger'; | ||
|
||
const adbClear = (): Promise<boolean> => { | ||
Logger.log(`🧹 Clearing the typed text`); | ||
return execAsync(` | ||
function clear_input() { | ||
adb shell input keyevent KEYCODE_MOVE_END | ||
adb shell input keyevent --longpress $(printf 'KEYCODE_DEL %.0s' {1..250}) | ||
} | ||
clear_input | ||
`).then(() => true); | ||
}; | ||
|
||
export default adbClear; |
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