diff options
Diffstat (limited to 'mousekey.c')
| -rwxr-xr-x[-rw-r--r--] | mousekey.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mousekey.c b/mousekey.c index 69b75240f..76bd0fd36 100644..100755 --- a/mousekey.c +++ b/mousekey.c | |||
| @@ -63,10 +63,10 @@ void mousekey_decode(uint8_t code) | |||
| 63 | else if (code == KB_MS_BTN3) report.buttons |= MOUSE_BTN3; | 63 | else if (code == KB_MS_BTN3) report.buttons |= MOUSE_BTN3; |
| 64 | else if (code == KB_MS_BTN4) report.buttons |= MOUSE_BTN4; | 64 | else if (code == KB_MS_BTN4) report.buttons |= MOUSE_BTN4; |
| 65 | else if (code == KB_MS_BTN5) report.buttons |= MOUSE_BTN5; | 65 | else if (code == KB_MS_BTN5) report.buttons |= MOUSE_BTN5; |
| 66 | else if (code == KB_MS_WH_UP) report.v += 1; | 66 | else if (code == KB_MS_WH_UP) report.v += move_unit()/4; |
| 67 | else if (code == KB_MS_WH_DOWN) report.v -= 1; | 67 | else if (code == KB_MS_WH_DOWN) report.v -= move_unit()/4; |
| 68 | else if (code == KB_MS_WH_LEFT) report.h -= 1; | 68 | else if (code == KB_MS_WH_LEFT) report.h -= move_unit()/4; |
| 69 | else if (code == KB_MS_WH_RIGHT)report.h += 1; | 69 | else if (code == KB_MS_WH_RIGHT)report.h += move_unit()/4; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | bool mousekey_changed(void) | 72 | bool mousekey_changed(void) |
| @@ -87,7 +87,7 @@ void mousekey_send(void) | |||
| 87 | 87 | ||
| 88 | // send immediately when buttun state is changed | 88 | // send immediately when buttun state is changed |
| 89 | if (report.buttons == report_prev.buttons) { | 89 | if (report.buttons == report_prev.buttons) { |
| 90 | if (timer_elapsed(last_timer) < 5) { | 90 | if (timer_elapsed(last_timer) < 100) { |
| 91 | mousekey_clear_report(); | 91 | mousekey_clear_report(); |
| 92 | return; | 92 | return; |
| 93 | } | 93 | } |
