diff options
author | Ryan <[email protected]> | 2024-07-03 18:35:54 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-03 18:35:54 +1000 |
commit | f8596b40a4bb15a1881138baa8b8787277e2e622 (patch) | |
tree | 551e145c341b2a7e9f8ee9f2573f4f1e8ebbfbe9 /quantum/action.c | |
parent | bc0c69570b8a8b1d9a754a280053e49a825b24d7 (diff) | |
download | qmk_firmware-f8596b40a4bb15a1881138baa8b8787277e2e622.tar.gz qmk_firmware-f8596b40a4bb15a1881138baa8b8787277e2e622.zip |
Normalise mouse keycodes (#23975)
Diffstat (limited to 'quantum/action.c')
-rw-r--r-- | quantum/action.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/quantum/action.c b/quantum/action.c index 74ef55e5eb..a39631ba3e 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -329,7 +329,7 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) { // should mousekeys send report, or does something else handle this? switch (mouse_keycode) { # if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) - case KC_MS_BTN1 ... KC_MS_BTN8: + case QK_MOUSE_BUTTON_1 ... QK_MOUSE_BUTTON_8: // let pointing device handle the buttons // expand if/when it handles more of the code # if defined(POINTING_DEVICE_ENABLE) @@ -351,8 +351,8 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) { #ifdef PS2_MOUSE_ENABLE // make sure that ps2 mouse has button report synced - if (KC_MS_BTN1 <= mouse_keycode && mouse_keycode <= KC_MS_BTN3) { - uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - KC_MS_BTN1); + if (QK_MOUSE_BUTTON_1 <= mouse_keycode && mouse_keycode <= QK_MOUSE_BUTTON_3) { + uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - QK_MOUSE_BUTTON_1); tp_buttons = pressed ? tp_buttons | tmp_button_msk : tp_buttons & ~tmp_button_msk; } #endif |