|
|
|
@ -8,7 +8,9 @@ Key Layer_::liveCompositeKeymap[ROWS][COLS];
|
|
|
|
|
uint8_t Layer_::activeLayers[ROWS][COLS];
|
|
|
|
|
Key(*Layer_::getKey)(uint8_t layer, byte row, byte col) = Layer.getKeyFromPROGMEM;
|
|
|
|
|
|
|
|
|
|
// The total number of defined layers in the firmware sketch keymaps[] array
|
|
|
|
|
// The total number of defined layers in the firmware sketch keymaps[]
|
|
|
|
|
// array. If the keymap wasn't defined using CREATE_KEYMAP() in the
|
|
|
|
|
// sketch file, LayerCount gets the default value of zero.
|
|
|
|
|
uint8_t LayerCount __attribute__((weak)) = 0;
|
|
|
|
|
|
|
|
|
|
static void handleKeymapKeyswitchEvent(Key keymapEntry, uint8_t keyState) {
|
|
|
|
@ -128,7 +130,8 @@ void Layer_::move(uint8_t layer) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Layer_::on(uint8_t layer) {
|
|
|
|
|
// If we're trying to turn on a layer that doesn't exist; abort
|
|
|
|
|
// If we're trying to turn on a layer that doesn't exist, abort (but
|
|
|
|
|
// if the keymap wasn't defined using CREATE_KEYMAP(), proceed anyway
|
|
|
|
|
if (LayerCount != 0 && layer >= LayerCount)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|