Merge branch 'master' of ssh://github.com/keyboardio/KeyboardioFirmware

pull/45/head
Jesse Vincent 8 years ago
commit 87ce165f8b

@ -60,6 +60,8 @@ cRGB Model01::led_get_crgb_at(uint8_t i) {
return leftHand.ledData.leds[i];
} else if (i<64) {
return rightHand.ledData.leds[i-32] ;
} else {
return {0, 0, 0};
}
}

@ -50,6 +50,9 @@ Key lookup_key(byte keymap, byte row, byte col) {
}
void handle_key_event(Key mappedKey, byte row, byte col, uint8_t currentState, uint8_t previousState) {
if (mappedKey.raw == Key_NoKey.raw) {
mappedKey = lookup_key(temporary_keymap, row, col);
}
for (byte i = 0; eventHandlers[i] != NULL && i < HOOK_MAX; i++) {
custom_handler_t handler = eventHandlers[i];
if ((*handler)(mappedKey, row, col, currentState, previousState))
@ -61,10 +64,10 @@ bool handle_key_event_default(Key mappedKey, byte row, byte col, uint8_t current
//for every newly pressed button, figure out what logical key it is and send a key down event
// for every newly released button, figure out what logical key it is and send a key up event
Key baseKey = Key_NoKey;
if (mappedKey.raw == Key_NoKey.raw) {
mappedKey = lookup_key(temporary_keymap, row, col);
baseKey = lookup_key(primary_keymap, row, col);
}
Key baseKey = lookup_key(primary_keymap, row, col);
if ((baseKey.flags & SWITCH_TO_KEYMAP
|| baseKey.flags & SWITCH_TO_KEYMAP_MOMENTARY)) {

Loading…
Cancel
Save