summaryrefslogtreecommitdiffstats
path: root/keyboards/lily58/keymaps/yuchi
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/lily58/keymaps/yuchi')
-rw-r--r--keyboards/lily58/keymaps/yuchi/config.h20
-rw-r--r--keyboards/lily58/keymaps/yuchi/keymap.c114
-rw-r--r--keyboards/lily58/keymaps/yuchi/rules.mk3
3 files changed, 30 insertions, 107 deletions
diff --git a/keyboards/lily58/keymaps/yuchi/config.h b/keyboards/lily58/keymaps/yuchi/config.h
index 58bbdc5e9d..130b5642e1 100644
--- a/keyboards/lily58/keymaps/yuchi/config.h
+++ b/keyboards/lily58/keymaps/yuchi/config.h
@@ -28,25 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
// #define EE_HANDS
-#define SSD1306OLED
+//#define OLED_DRIVER
#define USE_SERIAL_PD2
#define TAPPING_FORCE_HOLD
-#define TAPPING_TERM 100
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 27
-#define RGBLIGHT_LIMIT_VAL 120
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
-
-// Underglow
-/*
-#undef RGBLED_NUM
-#define RGBLED_NUM 14 // Number of LEDs
-#define RGBLIGHT_ANIMATIONS
-#define RGBLIGHT_SLEEP
-*/ \ No newline at end of file
+#define TAPPING_TERM 100 \ No newline at end of file
diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c
index d258fbcbc0..37230696fc 100644
--- a/keyboards/lily58/keymaps/yuchi/keymap.c
+++ b/keyboards/lily58/keymaps/yuchi/keymap.c
@@ -8,26 +8,13 @@
#include "ssd1306.h"
#endif
-
-extern keymap_config_t keymap_config;
-
-#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 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
+enum layer_number {
+ _QWERTY = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
};
@@ -53,17 +40,17 @@ 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, \
- LOWER,KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, RAISE \
+ MO(_LOWER),KC_LGUI, KC_LALT, LT(_LOWER,KC_SPC), LT(_RAISE,KC_ENT), KC_BSPC, KC_RGUI, MO(_RAISE) \
),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
+ * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | ~ | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - |
+ * | | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
- * | | | | | | |-------| |-------| | _ | + | { | } | | |
+ * | | | | | | |-------| |-------| | | ` | + | { | } | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE |
* | | | |/ / \ \ | | | |
@@ -71,20 +58,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LOWER] = LAYOUT( \
_______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,\
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
- _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \
- _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_GRAVE, KC_PLUS, KC_LCBR, KC_RCBR, _______, \
_______, _______, _______, _______, _______, _______, _______, _______\
),
/* RAISE
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+ * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | |
+ * | | | | | | |-------. ,-------| | Left | Down | Up |Right | |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
- * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ |
+ * | | | | | | |-------| |-------| + | = | [ | ] | \ | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE |
* | | | |/ / \ \ | | | |
@@ -93,9 +80,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = LAYOUT( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \
- KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, \
_______, _______, _______, _______, _______, _______, _______, _______ \
),
@@ -105,9 +92,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
- * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ |
+ * | | | | | | |-------. ,-------| | | | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
- * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- |
+ * | | | | | | |-------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE |
* | | | |/ / \ \ | | | |
@@ -116,13 +103,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) {
@@ -133,12 +119,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
@@ -148,7 +128,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation;
}
-// When add source files to SRC in rules.mk, you can use functions.
+// When you add source files to SRC in rules.mk, you can use functions.
const char *read_layer_state(void);
const char *read_logo(void);
void set_keylog(uint16_t keycode, keyrecord_t *record);
@@ -160,12 +140,8 @@ const char *read_keylogs(void);
// void set_timelog(void);
// const char *read_timelog(void);
-void matrix_scan_user(void) {
- iota_gfx_task();
-}
-
-void matrix_render_user(struct CharacterMatrix *matrix) {
- if (is_master) {
+void oled_task_user(void) {
+ if (is_keyboard_master()) {
// If you want to change the display of OLED, you need to change here
oled_write_ln(read_layer_state(), false);
oled_write_ln(read_keylog(), false);
@@ -177,8 +153,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) {
oled_write(read_logo(), false);
}
}
-
-#endif//SSD1306OLED
+#endif // OLED_DRIVER_ENABLE
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
@@ -187,42 +162,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;
}
diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk
index 0db9ac50fa..45bf4cfc3a 100644
--- a/keyboards/lily58/keymaps/yuchi/rules.mk
+++ b/keyboards/lily58/keymaps/yuchi/rules.mk
@@ -13,8 +13,9 @@ MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
SWAP_HANDS_ENABLE = no # Enable one-hand typing
+OLED_DRIVER_ENABLE= yes # OLED display
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend