diff --git a/src/key_events.cpp b/src/key_events.cpp index d178b17f..c71f9a30 100644 --- a/src/key_events.cpp +++ b/src/key_events.cpp @@ -64,32 +64,32 @@ void initializeKeyboard() { Keyboard.begin(); } -void pressKeyRaw(Key mappedKey) { +void pressRawKey(Key mappedKey) { Keyboard.press(mappedKey.keyCode); } void pressKey(Key mappedKey) { if (mappedKey.flags & SHIFT_HELD) { - pressKeyRaw(Key_LeftShift); + pressRawKey(Key_LeftShift); } if (mappedKey.flags & CTRL_HELD) { - pressKeyRaw(Key_LeftControl); + pressRawKey(Key_LeftControl); } if (mappedKey.flags & LALT_HELD) { - pressKeyRaw(Key_LeftAlt); + pressRawKey(Key_LeftAlt); } if (mappedKey.flags & RALT_HELD) { - pressKeyRaw(Key_RightAlt); + pressRawKey(Key_RightAlt); } if (mappedKey.flags & GUI_HELD) { - pressKeyRaw(Key_LeftGui); + pressRawKey(Key_LeftGui); } - pressKeyRaw(mappedKey); + pressRawKey(mappedKey); } -void releaseKeyRaw(Key mappedKey) { +void releaseRawKey(Key mappedKey) { Keyboard.release(mappedKey.keyCode); } @@ -100,21 +100,21 @@ void releaseAllKeys() { void releaseKey(Key mappedKey) { if (mappedKey.flags & SHIFT_HELD) { - releaseKeyRaw(Key_LeftShift); + releaseRawKey(Key_LeftShift); } if (mappedKey.flags & CTRL_HELD) { - releaseKeyRaw(Key_LeftControl); + releaseRawKey(Key_LeftControl); } if (mappedKey.flags & LALT_HELD) { - releaseKeyRaw(Key_LeftAlt); + releaseRawKey(Key_LeftAlt); } if (mappedKey.flags & RALT_HELD) { - releaseKeyRaw(Key_RightAlt); + releaseRawKey(Key_RightAlt); } if (mappedKey.flags & GUI_HELD) { - releaseKeyRaw(Key_LeftGui); + releaseRawKey(Key_LeftGui); } - releaseKeyRaw(mappedKey); + releaseRawKey(mappedKey); } boolean isModifierKeyActive(Key mappedKey) { @@ -151,9 +151,7 @@ void releaseSystemControl(Key mappedKey) { } -/** Mouse events - * See above for commentary on connectionMask. */ - +// Mouse events void initializeMouse() { Mouse.begin(); @@ -175,8 +173,7 @@ void releaseMouseButtons(uint8_t buttons) { Mouse.release(buttons); } -/** Absolute mouse (grapahics tablet) events - * See above for commentary on connectionMask. */ +/** Absolute mouse (grapahics tablet) events */ void initializeAbsoluteMouse() { AbsoluteMouse.begin(); diff --git a/src/key_events.h b/src/key_events.h index a9207b0c..3295f051 100644 --- a/src/key_events.h +++ b/src/key_events.h @@ -51,8 +51,8 @@ void initializeKeyboard(); void pressKey(Key mappedKey); void releaseKey(Key mappedKey); void releaseAllKeys(); -void pressKeyRaw(Key mappedKey); -void releaseKeyRaw(Key mappedKey); +void pressRawKey(Key mappedKey); +void releaseRawKey(Key mappedKey); /** Flushes any pending regular key switch events and sends them out */ void sendKeyboardReport();