keyToggledO* camelcasing

pull/389/head
Jesse Vincent 7 years ago
parent f79b3b5f7d
commit b244cec410
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -126,7 +126,7 @@ Key OneShot::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_st
if (!state_.all) { if (!state_.all) {
if (!isOS(mapped_key)) { if (!isOS(mapped_key)) {
if (isMasked(row, col)) { if (isMasked(row, col)) {
if (key_toggled_off(key_state)) if (keyToggledOff(key_state))
unmask(row, col); unmask(row, col);
return Key_NoKey; return Key_NoKey;
} }
@ -135,9 +135,9 @@ Key OneShot::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_st
} }
idx = mapped_key.raw - ranges::OS_FIRST; idx = mapped_key.raw - ranges::OS_FIRST;
if (key_toggled_off(key_state)) { if (keyToggledOff(key_state)) {
clearPressed(idx); clearPressed(idx);
} else if (key_toggled_on(key_state)) { } else if (keyToggledOn(key_state)) {
start_time_ = millis(); start_time_ = millis();
setPressed(idx); setPressed(idx);
setOneShot(idx); setOneShot(idx);
@ -156,20 +156,20 @@ Key OneShot::eventHandlerHook(Key mapped_key, byte row, byte col, uint8_t key_st
idx = mapped_key.raw - ranges::OS_FIRST; idx = mapped_key.raw - ranges::OS_FIRST;
if (isSticky(idx)) { if (isSticky(idx)) {
if (key_toggled_on(key_state)) { // maybe on _off instead? if (keyToggledOn(key_state)) { // maybe on _off instead?
saveAsPrevious(mapped_key); saveAsPrevious(mapped_key);
clearSticky(idx); clearSticky(idx);
cancelOneShot(idx); cancelOneShot(idx);
} }
} else { } else {
if (key_toggled_off(key_state)) { if (keyToggledOff(key_state)) {
clearPressed(idx); clearPressed(idx);
if ((millis() - start_time_) >= hold_time_out) { if ((millis() - start_time_) >= hold_time_out) {
cancelOneShot(idx); cancelOneShot(idx);
} }
} }
if (key_toggled_on(key_state)) { if (keyToggledOn(key_state)) {
setPressed(idx); setPressed(idx);
if (isSameAsPrevious(mapped_key)) { if (isSameAsPrevious(mapped_key)) {
setSticky(idx); setSticky(idx);

Loading…
Cancel
Save