|
|
|
@ -60,13 +60,15 @@ float carriedOverY =0;
|
|
|
|
|
|
|
|
|
|
#define EEPROM_LAYER_LOCATION 0
|
|
|
|
|
|
|
|
|
|
void save_current_layer(byte layer) {
|
|
|
|
|
void save_current_layer(byte layer)
|
|
|
|
|
{
|
|
|
|
|
Serial.print("telling eeprom thinks we're on layer ");
|
|
|
|
|
Serial.println(layer);
|
|
|
|
|
EEPROM.write(EEPROM_LAYER_LOCATION, layer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
byte load_current_layer() {
|
|
|
|
|
byte load_current_layer()
|
|
|
|
|
{
|
|
|
|
|
byte layer = EEPROM.read(EEPROM_LAYER_LOCATION);
|
|
|
|
|
Serial.print("eeprom thinks we're on layer ");
|
|
|
|
|
Serial.println(layer);
|
|
|
|
@ -227,8 +229,7 @@ void send_key_events(byte layer)
|
|
|
|
|
Keyboard.print("Keyboard.IO keyboard driver v0.00");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (mappedKey.rawKey == KEY_MOUSE_BTN_L || mappedKey.rawKey == KEY_MOUSE_BTN_M|| mappedKey.rawKey == KEY_MOUSE_BTN_R) {
|
|
|
|
|
} else if (mappedKey.rawKey == KEY_MOUSE_BTN_L || mappedKey.rawKey == KEY_MOUSE_BTN_M|| mappedKey.rawKey == KEY_MOUSE_BTN_R) {
|
|
|
|
|
if (key_toggled_on (switchState)) {
|
|
|
|
|
Mouse.press(mappedKey.rawKey);
|
|
|
|
|
} else if (key_is_pressed(switchState)) {
|
|
|
|
@ -313,8 +314,7 @@ void scan_matrix()
|
|
|
|
|
active_layer = keymaps[current_layer][row][col].rawKey;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (! (keymaps[active_layer][row][col].flags ^ ( SWITCH_TO_LAYER))) {
|
|
|
|
|
} else if (! (keymaps[active_layer][row][col].flags ^ ( SWITCH_TO_LAYER))) {
|
|
|
|
|
// switch layer and stay there
|
|
|
|
|
if (key_toggled_on(matrixState[row][col])) {
|
|
|
|
|
current_layer = active_layer = keymaps[current_layer][row][col].rawKey;
|
|
|
|
|