diff --git a/repos/ports/src/virtualbox5/frontend/console.cc b/repos/ports/src/virtualbox5/frontend/console.cc index 9bfc7f54c6..5154a16953 100644 --- a/repos/ports/src/virtualbox5/frontend/console.cc +++ b/repos/ports/src/virtualbox5/frontend/console.cc @@ -167,7 +167,9 @@ void GenodeConsole::_handle_input() auto curr_mouse_button_bits = [&] () { return (_key_status[Input::BTN_LEFT] ? MouseButtonState_LeftButton : 0) | (_key_status[Input::BTN_RIGHT] ? MouseButtonState_RightButton : 0) - | (_key_status[Input::BTN_MIDDLE] ? MouseButtonState_MiddleButton : 0); + | (_key_status[Input::BTN_MIDDLE] ? MouseButtonState_MiddleButton : 0) + | (_key_status[Input::BTN_SIDE] ? MouseButtonState_XButton1 : 0) + | (_key_status[Input::BTN_EXTRA] ? MouseButtonState_XButton2 : 0); }; unsigned const old_mouse_button_bits = curr_mouse_button_bits(); diff --git a/repos/ports/src/virtualbox5/frontend/console.h b/repos/ports/src/virtualbox5/frontend/console.h index 2b37739566..2bceea9d11 100644 --- a/repos/ports/src/virtualbox5/frontend/console.h +++ b/repos/ports/src/virtualbox5/frontend/console.h @@ -132,13 +132,6 @@ class GenodeConsole : public Console { bool _key_status[Input::KEY_MAX + 1]; - static bool _mouse_button(Input::Keycode keycode) - { - return keycode == Input::BTN_LEFT - || keycode == Input::BTN_RIGHT - || keycode == Input::BTN_MIDDLE; - } - void _handle_input(); void _handle_mode_change(); void _handle_cb_rom_change(); diff --git a/repos/ports/src/virtualbox6/input_adapter.h b/repos/ports/src/virtualbox6/input_adapter.h index e9e757238d..1411f7b205 100644 --- a/repos/ports/src/virtualbox6/input_adapter.h +++ b/repos/ports/src/virtualbox6/input_adapter.h @@ -42,7 +42,9 @@ struct Input_adapter { return keycode == Input::BTN_LEFT || keycode == Input::BTN_RIGHT - || keycode == Input::BTN_MIDDLE; + || keycode == Input::BTN_MIDDLE + || keycode == Input::BTN_SIDE + || keycode == Input::BTN_EXTRA; } void handle_input_event(Input::Event const &); @@ -105,7 +107,9 @@ void Input_adapter::Mouse::handle_input_event(Input::Event const &ev) auto curr_mouse_button_bits = [&] () { return (_key_status[Input::BTN_LEFT] ? MouseButtonState_LeftButton : 0) | (_key_status[Input::BTN_RIGHT] ? MouseButtonState_RightButton : 0) - | (_key_status[Input::BTN_MIDDLE] ? MouseButtonState_MiddleButton : 0); + | (_key_status[Input::BTN_MIDDLE] ? MouseButtonState_MiddleButton : 0) + | (_key_status[Input::BTN_SIDE] ? MouseButtonState_XButton1 : 0) + | (_key_status[Input::BTN_EXTRA] ? MouseButtonState_XButton2 : 0); }; unsigned const old_mouse_button_bits = curr_mouse_button_bits();