Skip to content

Commit 08b94b1

Browse files
authored
fix button direction to match flipper orientation
1 parent 7007db8 commit 08b94b1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

views/bt_mouse.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ static void bt_mouse_process(BtMouse* bt_mouse, InputEvent* event) {
8383
void* model,
8484
{
8585
UNUSED(model);
86-
if(event->key == InputKeyLeft) {
86+
if(event->key == InputKeyUp) {
8787
if(event->type == InputTypePress) {
8888
bt_mouse_button_state(bt_mouse, HID_MOUSE_BTN_LEFT, true);
8989
} else if(event->type == InputTypeRelease) {
9090
bt_mouse_button_state(bt_mouse, HID_MOUSE_BTN_LEFT, false);
9191
}
92-
} else if(event->key == InputKeyRight) {
92+
} else if(event->key == InputKeyDown) {
9393
if(event->type == InputTypePress) {
9494
bt_mouse_button_state(bt_mouse, HID_MOUSE_BTN_RIGHT, true);
9595
} else if(event->type == InputTypeRelease) {
@@ -101,11 +101,11 @@ static void bt_mouse_process(BtMouse* bt_mouse, InputEvent* event) {
101101
} else if(event->type == InputTypeRelease) {
102102
bt_mouse_button_state(bt_mouse, HID_MOUSE_BTN_WHEEL, false);
103103
}
104-
} else if(event->key == InputKeyUp) {
104+
} else if(event->key == InputKeyRight) {
105105
if(event->type == InputTypePress) {
106106
bt_mouse->wheel = MOUSE_SCROLL;
107107
}
108-
} else if(event->key == InputKeyDown) {
108+
} else if(event->key == InputKeyLeft) {
109109
if(event->type == InputTypePress) {
110110
bt_mouse->wheel = -MOUSE_SCROLL;
111111
}

views/usb_mouse.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ static void usb_mouse_process(UsbMouse* usb_mouse, InputEvent* event) {
2929
void* model,
3030
{
3131
UNUSED(model);
32-
if(event->key == InputKeyLeft) {
32+
if(event->key == InputKeyUp) {
3333
if(event->type == InputTypePress) {
3434
furi_hal_hid_mouse_press(HID_MOUSE_BTN_LEFT);
3535
} else if(event->type == InputTypeRelease) {
3636
furi_hal_hid_mouse_release(HID_MOUSE_BTN_LEFT);
3737
}
38-
} else if(event->key == InputKeyRight) {
38+
} else if(event->key == InputKeyDown) {
3939
if(event->type == InputTypePress) {
4040
furi_hal_hid_mouse_press(HID_MOUSE_BTN_RIGHT);
4141
} else if(event->type == InputTypeRelease) {
@@ -47,11 +47,11 @@ static void usb_mouse_process(UsbMouse* usb_mouse, InputEvent* event) {
4747
} else if(event->type == InputTypeRelease) {
4848
furi_hal_hid_mouse_release(HID_MOUSE_BTN_WHEEL);
4949
}
50-
} else if(event->key == InputKeyUp) {
50+
} else if(event->key == InputKeyRight) {
5151
if(event->type == InputTypePress) {
5252
furi_hal_hid_mouse_scroll(MOUSE_SCROLL);
5353
}
54-
} else if(event->key == InputKeyDown) {
54+
} else if(event->key == InputKeyLeft) {
5555
if(event->type == InputTypePress) {
5656
furi_hal_hid_mouse_scroll(-MOUSE_SCROLL);
5757
}

0 commit comments

Comments
 (0)