diff --git a/src/key_events.cpp b/src/key_events.cpp index 30bb1193..25db39dc 100644 --- a/src/key_events.cpp +++ b/src/key_events.cpp @@ -117,7 +117,9 @@ void releaseKey(Key mappedKey) { releaseKeyRaw(mappedKey); } - +boolean isModifierKeyActive(Key mappedKey) { + return Keyboard.isModifierActive(mappedKey.keyCode); +} void sendKeyboardReport() { Keyboard.sendReport(); diff --git a/src/key_events.h b/src/key_events.h index a73a2bbb..d0333fdc 100644 --- a/src/key_events.h +++ b/src/key_events.h @@ -56,6 +56,8 @@ void releaseKeyRaw(Key mappedKey); /** Flushes any pending regular key switch events and sends them out */ void sendKeyboardReport(); +boolean isModifierKeyActive(Key mappedKey); + void initializeConsumerControl(); void pressConsumer(Key mappedKey);