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 {
// If it's not a qukey, proceed:
if (qukey_index == QUKEY_NOT_FOUND)
return mapped_key; return mapped_key;
// Otherwise, queue the qukey: // Otherwise, queue the key and stop processing:
enqueue(key_addr); enqueue(key_addr);
return Key_NoKey; // is this right? return Key_NoKey;
}
} }
// 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