pull/389/head
Michael Richters 7 years ago
parent c112cc615d
commit d33deda114

@ -136,7 +136,7 @@ void Qukeys::flushKey(bool qukey_state, uint8_t keyswitch_state) {
memcpy(Keyboard.keyReport.allkeys, hid_report.allkeys, sizeof(hid_report));
// 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);
// 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
uint32_t current_time = millis();
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);
} else if (current_time > key_queue_[0].flush_time) {
flushKey(QUKEY_STATE_ALTERNATE, IS_PRESSED | WAS_PRESSED);

@ -105,7 +105,7 @@ class Qukeys : public KaleidoscopePlugin {
//static uint8_t keyswitch_state[];
// Qukey state bitfield
static uint8_t qukey_state_[(TOTAL_KEYS)/8 + ((TOTAL_KEYS)%8 ? 1 : 0)];
static uint8_t qukey_state_[(TOTAL_KEYS) / 8 + ((TOTAL_KEYS) % 8 ? 1 : 0)];
static bool getQukeyState(uint8_t addr) {
return bitRead(qukey_state_[addr / 8], addr % 8);
}

Loading…
Cancel
Save