#include "process_midi.h"
#endif
+
+#ifdef ENCODER_ENABLE
+#include "encoder.h"
+#endif
+
#ifdef AUDIO_ENABLE
#ifndef GOODBYE_SONG
#define GOODBYE_SONG SONG(GOODBYE_SOUND)
keypos_t key = record->event.key;
uint16_t keycode;
- #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+ #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
/* TODO: Use store_or_get_action() or a similar function. */
if (!disable_action_cache) {
uint8_t layer;
#ifdef TAP_DANCE_ENABLE
process_tap_dance(keycode, record) &&
#endif
- #ifndef DISABLE_LEADER
+ #ifdef LEADER_ENABLE
process_leader(keycode, record) &&
#endif
- #ifndef DISABLE_CHORDING
- process_chording(keycode, record) &&
- #endif
#ifdef COMBO_ENABLE
process_combo(keycode, record) &&
#endif
PLAY_SONG(ag_norm_song);
#endif
break;
+ case MAGIC_TOGGLE_ALT_GUI:
+ keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
+ keymap_config.swap_ralt_rgui = !keymap_config.swap_ralt_rgui;
+ #ifdef AUDIO_ENABLE
+ if (keymap_config.swap_ralt_rgui) {
+ PLAY_SONG(ag_swap_song);
+ } else {
+ PLAY_SONG(ag_norm_song);
+ }
+ #endif
+ break;
case MAGIC_TOGGLE_NKRO:
keymap_config.nkro = !keymap_config.nkro;
break;
}
void matrix_init_quantum() {
+ if (!eeconfig_is_enabled() && !eeconfig_is_disabled()) {
+ eeconfig_init();
+ }
#ifdef BACKLIGHT_ENABLE
backlight_init_ports();
#endif
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_init();
#endif
+ #ifdef ENCODER_ENABLE
+ encoder_init();
+ #endif
matrix_init_kb();
}
rgb_matrix_task_counter = ((rgb_matrix_task_counter + 1) % (RGB_MATRIX_SKIP_FRAMES + 1));
#endif
+ #ifdef ENCODER_ENABLE
+ encoder_read();
+ #endif
+
matrix_scan_kb();
}
#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN)