pressConsumer/releaseConsumer -> pressConsumerControl / releaseConsumerControl

ditto for SystemControl
pull/144/merge
Jesse Vincent 7 years ago
parent f5aaedffd5
commit 4ee9ca4e63
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -12,15 +12,15 @@ static bool handleSyntheticKeyswitchEvent(Key mappedKey, uint8_t keyState) {
return false; return false;
} else if (mappedKey.flags & IS_CONSUMER) { } else if (mappedKey.flags & IS_CONSUMER) {
if (keyIsPressed(keyState)) { if (keyIsPressed(keyState)) {
pressConsumer(mappedKey); pressConsumerControl(mappedKey);
} else if (keyWasPressed(keyState)) { } else if (keyWasPressed(keyState)) {
releaseConsumer(mappedKey); releaseConsumerControl(mappedKey);
} }
} else if (mappedKey.flags & IS_SYSCTL) { } else if (mappedKey.flags & IS_SYSCTL) {
if (keyIsPressed(keyState)) { if (keyIsPressed(keyState)) {
pressSystem(mappedKey); pressSystemControl(mappedKey);
} else if (keyWasPressed(keyState)) { } else if (keyWasPressed(keyState)) {
releaseSystem(mappedKey); releaseSystemControl(mappedKey);
} }
} else if (mappedKey.flags & SWITCH_TO_KEYMAP) { } else if (mappedKey.flags & SWITCH_TO_KEYMAP) {
// Should not happen, handled elsewhere. // Should not happen, handled elsewhere.
@ -129,11 +129,11 @@ void initializeConsumerControl() {
ConsumerControl.begin(); ConsumerControl.begin();
} }
void pressConsumer(Key mappedKey) { void pressConsumerControl(Key mappedKey) {
ConsumerControl.press(mappedKey.keyCode); ConsumerControl.press(mappedKey.keyCode);
} }
void releaseConsumer(Key mappedKey) { void releaseConsumerControl(Key mappedKey) {
ConsumerControl.release(mappedKey.keyCode); ConsumerControl.release(mappedKey.keyCode);
} }
@ -142,11 +142,11 @@ void initializeSystemControl() {
SystemControl.begin(); SystemControl.begin();
} }
void pressSystem(Key mappedKey) { void pressSystemControl(Key mappedKey) {
SystemControl.press(mappedKey.keyCode); SystemControl.press(mappedKey.keyCode);
} }
void releaseSystem(Key mappedKey) { void releaseSystemControl(Key mappedKey) {
SystemControl.release(); SystemControl.release();
} }

@ -60,13 +60,13 @@ boolean isModifierKeyActive(Key mappedKey);
void initializeConsumerControl(); void initializeConsumerControl();
void pressConsumer(Key mappedKey); void pressConsumerControl(Key mappedKey);
void releaseConsumer(Key mappedKey); void releaseConsumerControl(Key mappedKey);
void initializeSystemControl(); void initializeSystemControl();
void pressSystem(Key mappedKey); void pressSystemControl(Key mappedKey);
void releaseSystem(Key mappedKey); void releaseSystemControl(Key mappedKey);
void initializeMouse(); void initializeMouse();

Loading…
Cancel
Save