|
|
@ -136,7 +136,7 @@ void Qukeys::flushKey(bool qukey_state, uint8_t keyswitch_state) {
|
|
|
|
memcpy(Keyboard.keyReport.allkeys, hid_report.allkeys, sizeof(hid_report));
|
|
|
|
memcpy(Keyboard.keyReport.allkeys, hid_report.allkeys, sizeof(hid_report));
|
|
|
|
|
|
|
|
|
|
|
|
// Last, if the key is still down, add its code back in
|
|
|
|
// Last, if the key is still down, add its code back in
|
|
|
|
if ( ! keyToggledOn(keyswitch_state) )
|
|
|
|
if (! keyToggledOn(keyswitch_state))
|
|
|
|
handleKeyswitchEvent(keycode, row, col, IS_PRESSED | WAS_PRESSED | INJECTED);
|
|
|
|
handleKeyswitchEvent(keycode, row, col, IS_PRESSED | WAS_PRESSED | INJECTED);
|
|
|
|
|
|
|
|
|
|
|
|
// Shift the queue, so key_queue[0] is always the first key that gets processed
|
|
|
|
// Shift the queue, so key_queue[0] is always the first key that gets processed
|
|
|
@ -245,7 +245,7 @@ void Qukeys::preReportHook(void) {
|
|
|
|
// state to the alternate keycode and add it to the report
|
|
|
|
// state to the alternate keycode and add it to the report
|
|
|
|
uint32_t current_time = millis();
|
|
|
|
uint32_t current_time = millis();
|
|
|
|
while (key_queue_length_ > 0) {
|
|
|
|
while (key_queue_length_ > 0) {
|
|
|
|
if ( lookupQukey(key_queue_[0].addr) == QUKEY_NOT_FOUND ) {
|
|
|
|
if (lookupQukey(key_queue_[0].addr) == QUKEY_NOT_FOUND) {
|
|
|
|
flushKey(QUKEY_STATE_PRIMARY, IS_PRESSED | WAS_PRESSED);
|
|
|
|
flushKey(QUKEY_STATE_PRIMARY, IS_PRESSED | WAS_PRESSED);
|
|
|
|
} else if (current_time > key_queue_[0].flush_time) {
|
|
|
|
} else if (current_time > key_queue_[0].flush_time) {
|
|
|
|
flushKey(QUKEY_STATE_ALTERNATE, IS_PRESSED | WAS_PRESSED);
|
|
|
|
flushKey(QUKEY_STATE_ALTERNATE, IS_PRESSED | WAS_PRESSED);
|
|
|
|