| 84 | } |
| 85 | |
| 86 | bool AdbShellInput::click_key(int key) |
| 87 | { |
| 88 | LogInfo << VAR(key); |
| 89 | |
| 90 | merge_replacement({ { "{KEY}", std::to_string(key) } }); |
| 91 | |
| 92 | auto argv_opt = click_key_argv_.gen(argv_replace_); |
| 93 | if (!argv_opt) { |
| 94 | return false; |
| 95 | } |
| 96 | |
| 97 | auto output_opt = startup_and_read_pipe(*argv_opt); |
| 98 | return output_opt && output_opt->empty(); |
| 99 | } |
| 100 | |
| 101 | bool AdbShellInput::input_text(const std::string& text) |
| 102 | { |