Skip to content

Commit

Permalink
Provide actions for the extra mouse buttons
Browse files Browse the repository at this point in the history
Bind APP_SWITCH to button 4 and expand notification panel on button 5.

PR #2258 <#2258>

Signed-off-by: Romain Vimont <[email protected]>
  • Loading branch information
brunoais authored and rom1v committed Apr 17, 2021
1 parent b029b1d commit b28adab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b28adab

Please sign in to comment.