Fixed a couple places where we were using the old key names

pull/133/head
Jesse Vincent 8 years ago
parent ad93cc0a83
commit 944a15aa1c
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -42,19 +42,19 @@ static bool handle_keyswitch_event_default(Key mappedKey, byte row, byte col, ui
void press_key(Key mappedKey) {
if (mappedKey.flags & SHIFT_HELD) {
Keyboard.press(Key_LShift.keyCode);
Keyboard.press(Key_LeftShift.keyCode);
}
if (mappedKey.flags & CTRL_HELD) {
Keyboard.press(Key_LCtrl.keyCode);
Keyboard.press(Key_LeftControl.keyCode);
}
if (mappedKey.flags & LALT_HELD) {
Keyboard.press(Key_LAlt.keyCode);
Keyboard.press(Key_LeftAlt.keyCode);
}
if (mappedKey.flags & RALT_HELD) {
Keyboard.press(Key_RAlt.keyCode);
Keyboard.press(Key_RightAlt.keyCode);
}
if (mappedKey.flags & GUI_HELD) {
Keyboard.press(Key_LGUI.keyCode);
Keyboard.press(Key_LeftGui.keyCode);
}
Keyboard.press(mappedKey.keyCode);
}
@ -62,19 +62,19 @@ void press_key(Key mappedKey) {
void release_key(Key mappedKey) {
if (mappedKey.flags & SHIFT_HELD) {
Keyboard.release(Key_LShift.keyCode);
Keyboard.release(Key_LeftShift.keyCode);
}
if (mappedKey.flags & CTRL_HELD) {
Keyboard.release(Key_LCtrl.keyCode);
Keyboard.release(Key_LeftControl.keyCode);
}
if (mappedKey.flags & LALT_HELD) {
Keyboard.release(Key_LAlt.keyCode);
Keyboard.release(Key_LeftAlt.keyCode);
}
if (mappedKey.flags & RALT_HELD) {
Keyboard.release(Key_RAlt.keyCode);
Keyboard.release(Key_RightAlt.keyCode);
}
if (mappedKey.flags & GUI_HELD) {
Keyboard.release(Key_LGUI.keyCode);
Keyboard.release(Key_LeftGui.keyCode);
}
Keyboard.release(mappedKey.keyCode);
}

Loading…
Cancel
Save