void on_key_press(uint8_t key, bool event) { if (USB_is_sleeping()) USB_wakeup(); else LAYOUT_set_key_state(key, event); }
void keymap_actuate(const uint8_t row, const uint8_t col, const int16_t idle_time) { #ifdef SIMPLE_DEVICE const uint8_t code = getmap(row,col); #else const uint8_t code = translate_code(getmap(row,col)); #endif /* SIMPLE_DEVICE */ const uint8_t action = getaction(row,col); const uint8_t tapkey = gettapkey(row,col); #ifdef KEYMAP_MEMORY_SAVE g_matrixlayer[row][col] = g_layer_select; #else g_matrixcode[row][col] = code; g_matrixaction[row][col] = action; g_matrixtapkey[row][col] = tapkey; #endif /* KEYMAP_MEMORY_SAVE */ doubletap_down(row,col,idle_time); handle_code_actuate(code, action, tapkey); #ifdef MAX_NUMBER_OF_BACKLIGHTS backlight_react(); #endif /* MAX_NUMBER_OF_BACKLIGHTS */ USB_wakeup(); }