From b28adab86fecb4c4a617d790230100930a03f2b1 Mon Sep 17 00:00:00 2001 From: brunoais Date: Mon, 12 Apr 2021 10:15:33 +0100 Subject: [PATCH] Provide actions for the extra mouse buttons Bind APP_SWITCH to button 4 and expand notification panel on button 5. PR #2258 Signed-off-by: Romain Vimont --- app/src/input_manager.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/input_manager.c b/app/src/input_manager.c index c10e53af5d..803407f3a7 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -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_RIGHT && down) { + expand_notification_panel(im->controller); + return; + } if (control && event->button == SDL_BUTTON_RIGHT) { press_back_or_turn_screen_on(im->controller, action); return;