Normalise mouse keycodes (#23975)
This commit is contained in:
parent
bc0c69570b
commit
f8596b40a4
19 changed files with 426 additions and 209 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue