mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Toggle "raw key events" via shortcut
The "raw key events" mode may need to be toggled while scrcpy is running (e.g. to type text then play a game). Remove the command-line argument and bind Ctrl+k to toggle the mode.
This commit is contained in:
parent
9de332bbe5
commit
7cd1e39766
5 changed files with 21 additions and 42 deletions
|
|
@ -220,6 +220,13 @@ void input_manager_process_key(struct input_manager *input_manager,
|
|||
switch_fps_counter_state(input_manager->frames);
|
||||
}
|
||||
return;
|
||||
case SDLK_k:
|
||||
if (!repeat && event->type == SDL_KEYDOWN) {
|
||||
input_manager->raw_key_events ^= SDL_TRUE; // toggle
|
||||
LOGI("Raw key events mode %s",
|
||||
input_manager->raw_key_events ? "enabled" : "disabled");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue