From 532843d85649693fb0fa4b5d4c482b0f1db943de Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 6 Nov 2019 23:21:03 +0100 Subject: [PATCH] Always prefer text events by default This improves text input, but it breaks the expected behavior in games again: . To get the previous behavior back, pass an explicit option: scrcpy --prefer-text-events=non-alpha --- app/scrcpy.1 | 2 +- app/src/main.c | 4 ++-- app/src/scrcpy.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scrcpy.1 b/app/scrcpy.1 index 0091c60f..6e2e9ee6 100644 --- a/app/scrcpy.1 +++ b/app/scrcpy.1 @@ -69,7 +69,7 @@ Possible \fImode\fRs are "always" (every text is sent as text), "non-alpha" (only letters are sent as a sequence of key events, other characters are sent as text) and "never" (every text is sent as a sequence of key events). -Default is "non-alpha". +Default is "always". .TP .BI "\-\-push\-target " path diff --git a/app/src/main.c b/app/src/main.c index accd9ab9..3fd7ba40 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -73,10 +73,10 @@ static void usage(const char *arg0) { " device.\n" " Possible values are:\n" " always:\n" - " Every text is sent as text.\n" + " Every text is sent as text. (default)\n" " non-alpha:\n" " Only letters are sent as a sequence of key events, other\n" - " characters are sent as text. (default)\n" + " characters are sent as text.\n" " never:\n" " Every text is sent as a sequence of key events.\n" "\n" diff --git a/app/src/scrcpy.h b/app/src/scrcpy.h index 4c78968e..168efa5b 100644 --- a/app/src/scrcpy.h +++ b/app/src/scrcpy.h @@ -35,7 +35,7 @@ struct scrcpy_options { .window_title = NULL, \ .push_target = NULL, \ .record_format = RECORDER_FORMAT_AUTO, \ - .text_events_pref = PREFER_TEXT_EVENTS_NON_ALPHA, \ + .text_events_pref = PREFER_TEXT_EVENTS_ALWAYS, \ .port = DEFAULT_LOCAL_PORT, \ .max_size = DEFAULT_LOCAL_PORT, \ .bit_rate = DEFAULT_BIT_RATE, \