Merge remote-tracking branch 'qmk/master' into merge-2023-09-08
This commit is contained in:
@ -14,18 +14,21 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "keymap_introspection.h" // to get keymaps[][][]
|
||||
#include "eeprom.h"
|
||||
#include "progmem.h" // to read default from flash
|
||||
#include "quantum.h" // for send_string()
|
||||
#include "dynamic_keymap.h"
|
||||
#include "via.h" // for default VIA_EEPROM_ADDR_END
|
||||
#include <string.h>
|
||||
#include "keymap_introspection.h"
|
||||
#include "action.h"
|
||||
#include "eeprom.h"
|
||||
#include "progmem.h"
|
||||
#include "send_string.h"
|
||||
#include "keycodes.h"
|
||||
#include "action_tapping.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifdef VIA_ENABLE
|
||||
# include "via.h" // for VIA_EEPROM_CONFIG_END
|
||||
# include "via.h"
|
||||
# define DYNAMIC_KEYMAP_EEPROM_START (VIA_EEPROM_CONFIG_END)
|
||||
#else
|
||||
# include "eeconfig.h"
|
||||
# define DYNAMIC_KEYMAP_EEPROM_START (EECONFIG_SIZE)
|
||||
#endif
|
||||
|
||||
@ -272,22 +275,13 @@ void dynamic_keymap_reset(void) {
|
||||
for (int layer = 0; layer < DYNAMIC_KEYMAP_LAYER_COUNT; layer++) {
|
||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||
for (int column = 0; column < MATRIX_COLS; column++) {
|
||||
if (layer < keymap_layer_count()) {
|
||||
dynamic_keymap_set_keycode(layer, row, column, keycode_at_keymap_location_raw(layer, row, column));
|
||||
} else {
|
||||
dynamic_keymap_set_keycode(layer, row, column, KC_TRANSPARENT);
|
||||
}
|
||||
dynamic_keymap_set_keycode(layer, row, column, keycode_at_keymap_location_raw(layer, row, column));
|
||||
}
|
||||
}
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
for (int encoder = 0; encoder < NUM_ENCODERS; encoder++) {
|
||||
if (layer < encodermap_layer_count()) {
|
||||
dynamic_keymap_set_encoder(layer, encoder, true, keycode_at_encodermap_location_raw(layer, encoder, true));
|
||||
dynamic_keymap_set_encoder(layer, encoder, false, keycode_at_encodermap_location_raw(layer, encoder, false));
|
||||
} else {
|
||||
dynamic_keymap_set_encoder(layer, encoder, true, KC_TRANSPARENT);
|
||||
dynamic_keymap_set_encoder(layer, encoder, false, KC_TRANSPARENT);
|
||||
}
|
||||
dynamic_keymap_set_encoder(layer, encoder, true, keycode_at_encodermap_location_raw(layer, encoder, true));
|
||||
dynamic_keymap_set_encoder(layer, encoder, false, keycode_at_encodermap_location_raw(layer, encoder, false));
|
||||
}
|
||||
#endif // ENCODER_MAP_ENABLE
|
||||
}
|
||||
|
Reference in New Issue
Block a user