|
|
@ -89,18 +89,17 @@ Key MouseKeys_::eventHandlerHook(Key mappedKey, byte row, byte col, uint8_t keyS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (key_is_pressed(keyState)) {
|
|
|
|
if (key_is_pressed(keyState)) {
|
|
|
|
if (mappedKey.keyCode & KEY_MOUSE_WHEEL) {
|
|
|
|
if (mappedKey.keyCode & KEY_MOUSE_WHEEL) {
|
|
|
|
scrollWheel (mappedKey.keyCode);
|
|
|
|
scrollWheel(mappedKey.keyCode);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
else
|
|
|
|
|
|
|
|
mouseMoveIntent |= mappedKey.keyCode;
|
|
|
|
mouseMoveIntent |= mappedKey.keyCode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (key_toggled_on(keyState)) {
|
|
|
|
} else if (key_toggled_on(keyState)) {
|
|
|
|
if (mappedKey.keyCode & KEY_MOUSE_WARP && mappedKey.flags & IS_MOUSE_KEY) {
|
|
|
|
if (mappedKey.keyCode & KEY_MOUSE_WARP && mappedKey.flags & IS_MOUSE_KEY) {
|
|
|
|
// we don't pass in the left and up values because those are the
|
|
|
|
// we don't pass in the left and up values because those are the
|
|
|
|
// default, "no-op" conditionals
|
|
|
|
// default, "no-op" conditionals
|
|
|
|
MouseWrapper.warp( ((mappedKey.keyCode & KEY_MOUSE_WARP_END) ? WARP_END : 0x00) |
|
|
|
|
MouseWrapper.warp(((mappedKey.keyCode & KEY_MOUSE_WARP_END) ? WARP_END : 0x00) |
|
|
|
|
((mappedKey.keyCode & KEY_MOUSE_DOWN) ? WARP_DOWN : 0x00) |
|
|
|
|
((mappedKey.keyCode & KEY_MOUSE_DOWN) ? WARP_DOWN : 0x00) |
|
|
|
|
((mappedKey.keyCode & KEY_MOUSE_RIGHT) ? WARP_RIGHT : 0x00) );
|
|
|
|
((mappedKey.keyCode & KEY_MOUSE_RIGHT) ? WARP_RIGHT : 0x00));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -111,7 +110,7 @@ MouseKeys_::MouseKeys_(void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
MouseKeys_::begin (void) {
|
|
|
|
MouseKeys_::begin(void) {
|
|
|
|
event_handler_hook_use(eventHandlerHook);
|
|
|
|
event_handler_hook_use(eventHandlerHook);
|
|
|
|
loop_hook_use(loopHook);
|
|
|
|
loop_hook_use(loopHook);
|
|
|
|
}
|
|
|
|
}
|
|
|
|