@@ -83,13 +83,13 @@ static void bt_mouse_process(BtMouse* bt_mouse, InputEvent* event) {
83
83
void * model ,
84
84
{
85
85
UNUSED (model );
86
- if (event -> key == InputKeyLeft ) {
86
+ if (event -> key == InputKeyUp ) {
87
87
if (event -> type == InputTypePress ) {
88
88
bt_mouse_button_state (bt_mouse , HID_MOUSE_BTN_LEFT , true);
89
89
} else if (event -> type == InputTypeRelease ) {
90
90
bt_mouse_button_state (bt_mouse , HID_MOUSE_BTN_LEFT , false);
91
91
}
92
- } else if (event -> key == InputKeyRight ) {
92
+ } else if (event -> key == InputKeyDown ) {
93
93
if (event -> type == InputTypePress ) {
94
94
bt_mouse_button_state (bt_mouse , HID_MOUSE_BTN_RIGHT , true);
95
95
} else if (event -> type == InputTypeRelease ) {
@@ -101,11 +101,11 @@ static void bt_mouse_process(BtMouse* bt_mouse, InputEvent* event) {
101
101
} else if (event -> type == InputTypeRelease ) {
102
102
bt_mouse_button_state (bt_mouse , HID_MOUSE_BTN_WHEEL , false);
103
103
}
104
- } else if (event -> key == InputKeyUp ) {
104
+ } else if (event -> key == InputKeyRight ) {
105
105
if (event -> type == InputTypePress ) {
106
106
bt_mouse -> wheel = MOUSE_SCROLL ;
107
107
}
108
- } else if (event -> key == InputKeyDown ) {
108
+ } else if (event -> key == InputKeyLeft ) {
109
109
if (event -> type == InputTypePress ) {
110
110
bt_mouse -> wheel = - MOUSE_SCROLL ;
111
111
}
0 commit comments