提交 c4f3a768 编写于 作者: B brunoais 提交者: Romain Vimont

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: NRomain Vimont <rom@rom1v.com>
上级 b029b1de
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册