Using ADBKeyboard for injecting text.
This commit is contained in:
committed by
Romain Vimont
parent
576814bcec
commit
e970b4bda3
@@ -668,6 +668,7 @@ guess_record_format(const char *filename) {
|
||||
#define OPT_FORWARD_ALL_CLICKS 1023
|
||||
#define OPT_LEGACY_PASTE 1024
|
||||
#define OPT_ENCODER_NAME 1025
|
||||
#define OPT_USE_ADB_KEYBOARD 1026
|
||||
|
||||
bool
|
||||
scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
|
||||
@@ -709,6 +710,7 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
|
||||
{"show-touches", no_argument, NULL, 't'},
|
||||
{"stay-awake", no_argument, NULL, 'w'},
|
||||
{"turn-screen-off", no_argument, NULL, 'S'},
|
||||
{"use-adb-keyboard", no_argument, NULL, OPT_USE_ADB_KEYBOARD},
|
||||
{"verbosity", required_argument, NULL, 'V'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{"window-title", required_argument, NULL, OPT_WINDOW_TITLE},
|
||||
@@ -794,6 +796,9 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
|
||||
case 'S':
|
||||
opts->turn_screen_off = true;
|
||||
break;
|
||||
case OPT_USE_ADB_KEYBOARD:
|
||||
opts->use_adb_keyboard = true;
|
||||
break;
|
||||
case 't':
|
||||
opts->show_touches = true;
|
||||
break;
|
||||
|
||||
@@ -320,6 +320,7 @@ scrcpy(const struct scrcpy_options *options) {
|
||||
.codec_options = options->codec_options,
|
||||
.encoder_name = options->encoder_name,
|
||||
.force_adb_forward = options->force_adb_forward,
|
||||
.use_adb_keyboard = options->use_adb_keyboard,
|
||||
};
|
||||
if (!server_start(&server, options->serial, ¶ms)) {
|
||||
return false;
|
||||
|
||||
@@ -82,6 +82,7 @@ struct scrcpy_options {
|
||||
bool forward_key_repeat;
|
||||
bool forward_all_clicks;
|
||||
bool legacy_paste;
|
||||
bool use_adb_keyboard;
|
||||
};
|
||||
|
||||
#define SCRCPY_OPTIONS_DEFAULT { \
|
||||
@@ -129,6 +130,7 @@ struct scrcpy_options {
|
||||
.forward_key_repeat = true, \
|
||||
.forward_all_clicks = false, \
|
||||
.legacy_paste = false, \
|
||||
.use_adb_keyboard = false, \
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -295,6 +295,7 @@ execute_server(struct server *server, const struct server_params *params) {
|
||||
params->stay_awake ? "true" : "false",
|
||||
params->codec_options ? params->codec_options : "-",
|
||||
params->encoder_name ? params->encoder_name : "-",
|
||||
params->use_adb_keyboard ? "true" : "false",
|
||||
};
|
||||
#ifdef SERVER_DEBUGGER
|
||||
LOGI("Server debugger waiting for a client on device port "
|
||||
|
||||
@@ -59,6 +59,7 @@ struct server_params {
|
||||
bool show_touches;
|
||||
bool stay_awake;
|
||||
bool force_adb_forward;
|
||||
bool use_adb_keyboard;
|
||||
};
|
||||
|
||||
// init default values
|
||||
|
||||
Reference in New Issue
Block a user