Skip to content

Commit

Permalink
fix(core): fix mouse direction
Browse files Browse the repository at this point in the history
Signed-off-by: HaoboGu <[email protected]>
  • Loading branch information
HaoboGu committed Feb 3, 2024
1 parent 7afc0aa commit f7d6bc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rmk/src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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,
Expand Down

0 comments on commit f7d6bc5

Please sign in to comment.