From c4f3a768d5478cf27c8dd16aca409a45a670bc16 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 c10e53af..b8a8c846 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_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; -- GitLab