From f7d6bc55b233da0a2ec757fa78650cd2dfa6f8bd Mon Sep 17 00:00:00 2001 From: HaoboGu Date: Sat, 3 Feb 2024 23:24:19 +0800 Subject: [PATCH] fix(core): fix mouse direction Signed-off-by: HaoboGu --- rmk/src/keyboard.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rmk/src/keyboard.rs b/rmk/src/keyboard.rs index 4d2900ce..33644eaf 100644 --- a/rmk/src/keyboard.rs +++ b/rmk/src/keyboard.rs @@ -431,6 +431,8 @@ impl< if key_state.pressed { // Update mouse report match key { + // TODO: Add accerated mode when pressing the mouse key + // https://github.com/qmk/qmk_firmware/blob/master/docs/feature_mouse_keys.md#accelerated-mode KeyCode::MouseUp => { self.other_report.y = -1; } @@ -444,10 +446,10 @@ impl< self.other_report.x = 1; } KeyCode::MouseWheelUp => { - self.other_report.wheel = -1; + self.other_report.wheel = 1; } KeyCode::MouseWheelDown => { - self.other_report.wheel = 1; + self.other_report.wheel = -1; } KeyCode::MouseBtn1 => self.other_report.buttons |= 0b1, KeyCode::MouseBtn2 => self.other_report.buttons |= 0b10,