| 99 | } |
| 100 | |
| 101 | bool AdbShellInput::input_text(const std::string& text) |
| 102 | { |
| 103 | LogInfo << VAR(text); |
| 104 | |
| 105 | merge_replacement({ { "{TEXT}", text } }); |
| 106 | |
| 107 | auto argv_opt = input_text_argv_.gen(argv_replace_); |
| 108 | if (!argv_opt) { |
| 109 | return false; |
| 110 | } |
| 111 | |
| 112 | auto output_opt = startup_and_read_pipe(*argv_opt); |
| 113 | return output_opt && output_opt->empty(); |
| 114 | } |
| 115 | |
| 116 | bool AdbShellInput::key_down(int key) |
| 117 | { |