Provide actions for the extra mouse buttons
Bind APP_SWITCH to button 4 and expand notification panel on button 5.
PR <https://github.com/Genymobile/scrcpy/pull/2258>
@@ -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;
