Provide actions for the extra mouse buttons

Bind APP_SWITCH to button 4 and expand notification panel on button 5.

PR #2258 <https://github.com/Genymobile/scrcpy/pull/2258>

Signed-off-by: Romain Vimont <rom@rom1v.com>
pull/2264/head
brunoais 3 years ago committed by Romain Vimont
parent d0739911a3
commit b9c3f65fd8

@ -661,6 +661,14 @@ input_manager_process_mouse_button(struct input_manager *im,
if (!im->forward_all_clicks) {
int action = down ? ACTION_DOWN : ACTION_UP;
if (control && event->button == SDL_BUTTON_X1) {
action_app_switch(im->controller, action);
return;
}
if (control && event->button == SDL_BUTTON_X2 && down) {
expand_notification_panel(im->controller);
return;
}
if (control && event->button == SDL_BUTTON_RIGHT) {
press_back_or_turn_screen_on(im->controller, action);
return;

Loading…
Cancel
Save