Simplify if(keyToggledOn)

pull/389/head
Michael Richters 7 years ago
parent 65163be9c7
commit abea4c281c

@ -191,17 +191,13 @@ Key Qukeys::keyScanHook(Key mapped_key, byte row, byte col, uint8_t key_state) {
// If the key was just pressed: // If the key was just pressed:
if (keyToggledOn(key_state)) { if (keyToggledOn(key_state)) {
// I think I may need to call maskKey() somewhere here, but I'm not sure // If the queue is empty and the key isn't a qukey, proceed:
if (key_queue_length_) { if (key_queue_length_ == 0 &&
enqueue(key_addr); qukey_index == QUKEY_NOT_FOUND)
} else { return mapped_key;
// If it's not a qukey, proceed: // Otherwise, queue the key and stop processing:
if (qukey_index == QUKEY_NOT_FOUND) enqueue(key_addr);
return mapped_key; return Key_NoKey;
// Otherwise, queue the qukey:
enqueue(key_addr);
return Key_NoKey; // is this right?
}
} }
// In all other cases, we need to know if the key is queued already // In all other cases, we need to know if the key is queued already

Loading…
Cancel
Save