summaryrefslogtreecommitdiff
path: root/keyboards/lily58/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/lily58/keymaps/default/keymap.c')
-rw-r--r--keyboards/lily58/keymaps/default/keymap.c74
1 files changed, 9 insertions, 65 deletions
diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c
index f0fbaa8b0d..52d401c5c5 100644
--- a/keyboards/lily58/keymaps/default/keymap.c
+++ b/keyboards/lily58/keymaps/default/keymap.c
@@ -8,26 +8,15 @@
#include "ssd1306.h"
#endif
-#ifdef RGBLIGHT_ENABLE
-//Following line allows macro to read current RGB settings
-extern rgblight_config_t rgblight_config;
-#endif
-
extern uint8_t is_master;
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 3
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
+enum layer_number {
+ _QWERTY = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
@@ -50,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
- KC_LALT, KC_LGUI,LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI \
+ KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_BSPC, KC_RGUI \
),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
@@ -112,14 +101,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT( \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
_______, _______, _______, _______, _______, _______, _______, _______ \
)
};
-int RGB_current_mode;
-
// Setting ADJUST layer RGB back to default
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
@@ -129,12 +116,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
}
}
-void matrix_init_user(void) {
- #ifdef RGBLIGHT_ENABLE
- RGB_current_mode = rgblight_config.mode;
- #endif
-}
-
//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk
#ifdef OLED_DRIVER_ENABLE
@@ -178,42 +159,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
// set_timelog();
}
-
- switch (keycode) {
- case QWERTY:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWERTY);
- }
- return false;
- break;
- case LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
return true;
-}
+} \ No newline at end of file