Update to 'new' keyswitch state API

pull/365/head
Jesse Vincent 8 years ago
parent 0808057864
commit 2d7388e42f
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -76,25 +76,25 @@ Key MouseKeys_::eventHandlerHook(Key mappedKey, byte row, byte col, uint8_t keyS
if (mappedKey.keyCode & KEY_MOUSE_BUTTON && !(mappedKey.keyCode & KEY_MOUSE_WARP)) {
uint8_t button = mappedKey.keyCode & ~KEY_MOUSE_BUTTON;
if (key_toggled_on(keyState)) {
if (keyToggledOn(keyState)) {
MouseWrapper.press_button(button);
} else if (key_toggled_off(keyState)) {
} else if (keyToggledOff(keyState)) {
MouseWrapper.release_button(button);
}
} else if (!(mappedKey.keyCode & KEY_MOUSE_WARP)) {
if (key_toggled_on(keyState)) {
if (keyToggledOn(keyState)) {
endTime = millis() + speedDelay;
accelEndTime = millis() + accelDelay;
wheelEndTime = 0;
}
if (key_is_pressed(keyState)) {
if (keyIsPressed(keyState)) {
if (mappedKey.keyCode & KEY_MOUSE_WHEEL) {
scrollWheel(mappedKey.keyCode);
} else {
mouseMoveIntent |= mappedKey.keyCode;
}
}
} else if (key_toggled_on(keyState)) {
} else if (keyToggledOn(keyState)) {
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
// default, "no-op" conditionals

Loading…
Cancel
Save