Customize shortcut modifier

Add --shortcut-mod, and use Alt as default modifier.

This paves the way to forward the Ctrl key to the device.
This commit is contained in:
Romain Vimont
2020-07-17 00:00:42 +02:00
parent 63cb93d7d7
commit 1b76d9fd78
10 changed files with 392 additions and 109 deletions

View File

@@ -49,7 +49,13 @@ static struct input_manager input_manager = {
.video_buffer = &video_buffer,
.screen = &screen,
.repeat = 0,
.prefer_text = false, // initialized later
// initialized later
.prefer_text = false,
.sdl_shortcut_mods = {
.data = {0},
.count = 0,
},
};
#ifdef _WIN32
@@ -437,7 +443,8 @@ scrcpy(const struct scrcpy_options *options) {
}
}
input_manager.prefer_text = options->prefer_text;
input_manager_init(&input_manager, options->prefer_text,
&options->shortcut_mods);
ret = event_loop(options->display, options->control);
LOGD("quit...");