mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
Add --prefer-text option
Expose an option to configure how key/text events are forwarded to the Android device. Enabling the option avoids issues when combining multiple keys to enter special characters, but breaks the expected behavior of alpha keys in games (typically WASD). Fixes <https://github.com/Genymobile/scrcpy/issues/650>
This commit is contained in:
@@ -42,6 +42,7 @@ static struct input_manager input_manager = {
|
||||
.controller = &controller,
|
||||
.video_buffer = &video_buffer,
|
||||
.screen = &screen,
|
||||
.prefer_text = false, // initialized later
|
||||
};
|
||||
|
||||
// init SDL and set appropriate hints
|
||||
@@ -414,6 +415,8 @@ scrcpy(const struct scrcpy_options *options) {
|
||||
show_touches_waited = true;
|
||||
}
|
||||
|
||||
input_manager.prefer_text = options->prefer_text;
|
||||
|
||||
ret = event_loop(options->display, options->control);
|
||||
LOGD("quit...");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user