aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/lily58/keymaps/lily58l/config.h39
-rw-r--r--keyboards/lily58/keymaps/lily58l/keymap.c330
-rw-r--r--keyboards/lily58/keymaps/lily58l/readme.md24
-rw-r--r--keyboards/lily58/keymaps/lily58l/rules.mk1
-rw-r--r--keyboards/lily58/light/config.h53
-rw-r--r--keyboards/lily58/light/info.json18
-rw-r--r--keyboards/lily58/light/light.c16
-rw-r--r--keyboards/lily58/light/light.h50
-rw-r--r--keyboards/lily58/light/rules.mk3
-rw-r--r--keyboards/lily58/lily58.h2
10 files changed, 536 insertions, 0 deletions
diff --git a/keyboards/lily58/keymaps/lily58l/config.h b/keyboards/lily58/keymaps/lily58l/config.h
new file mode 100644
index 000000000..efecbb844
--- /dev/null
+++ b/keyboards/lily58/keymaps/lily58l/config.h
@@ -0,0 +1,39 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6Copyright 2020 Ben Roesner (keycapsss.com)
7
8This program is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#pragma once
23
24/* Select hand configuration */
25#define MASTER_LEFT
26// #define MASTER_RIGHT
27// #define EE_HANDS
28
29#ifdef RGBLIGHT_ENABLE
30# define RGBLIGHT_ANIMATIONS
31# define RGBLIGHT_HUE_STEP 6 // number of steps to cycle through the hue by
32# define RGBLIGHT_SAT_STEP 6 // number of steps to increment the saturation by
33# define RGBLIGHT_VAL_STEP 6 // number of steps to increment the brightness by
34# define RGBLIGHT_SLEEP // the RGB lighting will be switched off when the host goes to sleep
35#endif
36
37// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
38// #define SPLIT_USB_DETECT
39// #define NO_USB_STARTUP_CHECK
diff --git a/keyboards/lily58/keymaps/lily58l/keymap.c b/keyboards/lily58/keymaps/lily58l/keymap.c
new file mode 100644
index 000000000..6683d2242
--- /dev/null
+++ b/keyboards/lily58/keymaps/lily58l/keymap.c
@@ -0,0 +1,330 @@
1 /* Copyright 2017 F_YUUCHI
2 * Copyright 2020 Drashna Jaelre <@drashna>
3 * Copyright 2020 Ben Roesner (keycapsss.com)
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include QMK_KEYBOARD_H
20
21
22extern uint8_t is_master;
23
24enum layers {
25 _QWERTY,
26 _LOWER,
27 _RAISE,
28 _ADJUST,
29};
30
31#define RAISE MO(_RAISE)
32#define LOWER MO(_LOWER)
33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35
36/* QWERTY
37 * ,-----------------------------------------. ,-----------------------------------------.
38 * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
39 * |------+------+------+------+------+------| |------+------+------+------+------+------|
40 * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - |
41 * |------+------+------+------+------+------| |------+------+------+------+------+------|
42 * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
43 * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
44 * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
45 * `-----------------------------------------/ / \ \-----------------------------------------'
46 * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI |
47 * | | | |/ / \ \ | | | |
48 * `----------------------------' '------''--------------------'
49 */
50
51 [_QWERTY] = LAYOUT(
52 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
53 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
54 KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
55 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,
56 KC_LALT, KC_LGUI,LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI
57),
58/* LOWER
59 * ,-----------------------------------------. ,-----------------------------------------.
60 * | | | | | | | | | | | | | |
61 * |------+------+------+------+------+------| |------+------+------+------+------+------|
62 * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
63 * |------+------+------+------+------+------| |------+------+------+------+------+------|
64 * | ` | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - |
65 * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
66 * | | | | | | |-------| |-------| | _ | + | { | } | | |
67 * `-----------------------------------------/ / \ \-----------------------------------------'
68 * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI |
69 * | | | |/ / \ \ | | | |
70 * `----------------------------' '------''--------------------'
71 */
72[_LOWER] = LAYOUT(
73 _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,
74 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
75 KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD,
76 _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
77 _______, _______, _______, _______, _______, _______, _______, _______
78),
79/* RAISE
80 * ,-----------------------------------------. ,-----------------------------------------.
81 * | | | | | | | | | | | | | |
82 * |------+------+------+------+------+------| |------+------+------+------+------+------|
83 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
84 * |------+------+------+------+------+------| |------+------+------+------+------+------|
85 * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | |
86 * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
87 * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ |
88 * `-----------------------------------------/ / \ \-----------------------------------------'
89 * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI |
90 * | | | |/ / \ \ | | | |
91 * `----------------------------' '------''--------------------'
92 */
93
94[_RAISE] = LAYOUT(
95 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
96 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
97 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX,
98 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
99 _______, _______, _______, _______, _______, _______, _______, _______
100),
101/* ADJUST
102 * ,-----------------------------------------. ,-----------------------------------------.
103 * | | | | | | | | | | | | | |
104 * |------+------+------+------+------+------| |------+------+------+------+------+------|
105 * | | | | | | | | | | | | | |
106 * |------+------+------+------+------+------| |------+------+------+------+------+------|
107 * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ |
108 * |------+------+------+------+------+------| | | |------+------+------+------+------+------|
109 * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- |
110 * `-----------------------------------------/ / \ \-----------------------------------------'
111 * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI |
112 * | | | |/ / \ \ | | | |
113 * `----------------------------' '------''--------------------'
114 */
115 [_ADJUST] = LAYOUT(
116 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
117 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
118 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI,
119 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,
120 _______, _______, _______, _______, _______, _______, _______, _______
121 )
122};
123
124layer_state_t layer_state_set_user(layer_state_t state) {
125 state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
126 return state;
127}
128
129//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk
130#ifdef OLED_DRIVER_ENABLE
131
132oled_rotation_t oled_init_user(oled_rotation_t rotation) {
133 if (is_keyboard_master()) {
134 return OLED_ROTATION_270;
135 } else {
136 return OLED_ROTATION_0;
137 }
138}
139
140void render_lily58_logo(void) {
141 static const char PROGMEM lily58_logo[] = {
142 // 'logo', 128x32px
143 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00,
144 0x80, 0xe0, 0x70, 0x3c, 0x0e, 0x06, 0x0e, 0x3c, 0x70, 0xe0, 0x80, 0x00, 0x00, 0xc0, 0xc0, 0x00,
145 0xc0, 0xc0, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00,
146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x80,
147 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
148 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00,
149 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00,
150 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0xc0, 0x80, 0x80, 0x80, 0x81, 0x83, 0x83,
152 0x07, 0x07, 0x0c, 0x18, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x01, 0xff, 0xfc, 0x80, 0xb6, 0xb6, 0x80,
153 0xb0, 0xb0, 0x00, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf1, 0x00, 0x00, 0x00, 0x00, 0xff,
155 0xff, 0x00, 0x00, 0x00, 0x30, 0xf0, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xf0,
156 0x30, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xe1, 0x71, 0x71, 0xf1, 0xf1, 0xe1, 0xc1, 0x81, 0x00, 0x00,
157 0x00, 0x00, 0x0c, 0x3f, 0xff, 0xf3, 0xe1, 0xc1, 0xc1, 0x81, 0x81, 0xc3, 0xff, 0x7f, 0x1c, 0x00,
158 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
159 0x20, 0x70, 0x78, 0xdc, 0xcc, 0x86, 0x06, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
160 0x01, 0x03, 0x02, 0x06, 0x84, 0xe1, 0xfb, 0x38, 0x1c, 0x0c, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
161 0x01, 0x01, 0x03, 0x03, 0x06, 0x86, 0xcc, 0xdc, 0x78, 0x70, 0x20, 0x00, 0xff, 0xff, 0x80, 0x80,
162 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
163 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x7e, 0xf8, 0xe0, 0xf0, 0x7e, 0x1f, 0x03, 0x00,
164 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xe1, 0xff, 0x7f, 0x3f, 0x00,
165 0x00, 0x00, 0x3e, 0xff, 0xff, 0xc1, 0xc0, 0x80, 0x81, 0x81, 0xc3, 0xc3, 0xff, 0xfe, 0x3c, 0x00,
166 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
167 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x06, 0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x06,
168 0x06, 0x02, 0x03, 0x01, 0x01, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x06, 0x04, 0x04, 0x04, 0x04,
169 0x06, 0x06, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
170 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
171 0x01, 0x01, 0x01, 0x00, 0x00, 0x60, 0x60, 0x70, 0x38, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00,
172 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
173 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
174 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00
175};
176 oled_write_raw_P(lily58_logo, sizeof(lily58_logo));
177}
178
179
180# define KEYLOG_LEN 6
181char keylog_str[KEYLOG_LEN] = {};
182uint8_t keylogs_str_idx = 0;
183uint16_t log_timer = 0;
184
185const char code_to_name[60] = {
186 ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
187 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
188 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
189 '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
190 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
191 '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
192
193void add_keylog(uint16_t keycode) {
194 if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
195 keycode = keycode & 0xFF;
196 }
197
198 for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
199 keylog_str[i] = keylog_str[i - 1];
200 }
201 if (keycode < 60) {
202 keylog_str[0] = code_to_name[keycode];
203 }
204 keylog_str[KEYLOG_LEN - 1] = 0;
205
206 log_timer = timer_read();
207}
208
209void update_log(void) {
210 if (timer_elapsed(log_timer) > 750) {
211 add_keylog(0);
212 }
213}
214
215void render_keylogger_status(void) {
216 oled_write_P(PSTR("KLogr"), false);
217 oled_write(keylog_str, false);
218}
219
220void render_default_layer_state(void) {
221 oled_write_P(PSTR("Layer"), false);
222 oled_write_P(PSTR(" "), false);
223 switch (get_highest_layer(layer_state)) {
224 case _QWERTY:
225 oled_write_P(PSTR("QRTY"), false);
226 break;
227 case _LOWER:
228 oled_write_ln_P(PSTR("LOW"), false);
229 break;
230 case _RAISE:
231 oled_write_P(PSTR("HIGH"), false);
232 break;
233 case _ADJUST:
234 oled_write_ln_P(PSTR("ADJ"), false);
235 break;
236 default:
237 oled_write_ln_P(PSTR("Undefined"), false);
238 }
239}
240
241void render_keylock_status(led_t led_state) {
242 oled_write_ln_P(PSTR("Lock"), false);
243 oled_write_P(PSTR(" "), false);
244 oled_write_P(PSTR("N"), led_state.num_lock);
245 oled_write_P(PSTR("C"), led_state.caps_lock);
246 oled_write_ln_P(PSTR("S"), led_state.scroll_lock);
247}
248
249void render_mod_status(uint8_t modifiers) {
250 oled_write_ln_P(PSTR("Mods"), false);
251 oled_write_P(PSTR(" "), false);
252 oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
253 oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL));
254 oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT));
255 oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI));
256}
257
258void render_status_main(void) {
259 // Show keyboard layout
260 render_default_layer_state();
261 // Add a empty line
262 oled_write_P(PSTR("-----"), false);
263 // Show host keyboard led status
264 render_keylock_status(host_keyboard_led_state());
265 // Add a empty line
266 oled_write_P(PSTR("-----"), false);
267 // Show modifier status
268 render_mod_status(get_mods());
269 // Add a empty line
270 oled_write_P(PSTR("-----"), false);
271 render_keylogger_status();
272}
273
274void oled_task_user(void) {
275 update_log();
276 if (is_keyboard_master()) {
277 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
278 } else {
279 render_lily58_logo();
280 }
281}
282
283bool process_record_user(uint16_t keycode, keyrecord_t *record) {
284 if (record->event.pressed) {
285 add_keylog(keycode);
286 }
287 return true;
288}
289#endif // OLED_DRIVER_ENABLE
290
291
292// Rotary encoder related code
293#ifdef ENCODER_ENABLE
294void encoder_update_user(uint8_t index, bool clockwise) {
295 if (index == 0) { // Encoder on master side
296 if(IS_LAYER_ON(_RAISE)) { // on Raise layer
297 // Cursor control
298 if (clockwise) {
299 tap_code(KC_MNXT);
300 } else {
301 tap_code(KC_MPRV);
302 }
303 }
304 else {
305 if (clockwise) {
306 tap_code(KC_VOLU);
307 } else {
308 tap_code(KC_VOLD);
309 }
310 }
311 }
312 else if (index == 1) { // Encoder on slave side
313 if(IS_LAYER_ON(_LOWER)) { // on Lower layer
314 //
315 if (clockwise) {
316 tap_code(KC_RIGHT);
317 } else {
318 tap_code(KC_LEFT);
319 }
320 }
321 else {
322 if (clockwise) {
323 tap_code(KC_DOWN);
324 } else {
325 tap_code(KC_UP);
326 }
327 }
328 }
329}
330#endif
diff --git a/keyboards/lily58/keymaps/lily58l/readme.md b/keyboards/lily58/keymaps/lily58l/readme.md
new file mode 100644
index 000000000..68af9241a
--- /dev/null
+++ b/keyboards/lily58/keymaps/lily58l/readme.md
@@ -0,0 +1,24 @@
1# Lily58L
2<img src="https://keycapsss.com/media/image/21/2b/68/lily58l-split-keyboard-rgb-led-1.jpg" width="400">
3
4A modified Lily58 pcb, with underglow, per key rgb light and rotary encoder support.
5- SK6812 Mini-E per key led's (58x) for easy soldering
6- 6x SK6812 Mini led's per side for underglow
7- Support for 1 rotary encoder on each side
8
9Left encoder: volume up/down, next/previous track on RAISE layer
10Right encoder: cursor down/up, right/left on LOWER layer
11
12* Keyboard Maintainer: BenRoe [GitHub](https://github.com/BenRoe) / [Twitter](https://twitter.com/keycapsss)
13* Hardware Supported: Pro Micro, or Elite-C
14* Hardware Availability: [Keycapsss.com](https://keycapsss.com)
15
16Make example for this keyboard (after setting up your build environment):
17
18 make lily58/light:lily58l
19
20Flashing example for this keyboard:
21
22 make lily58/light:lily58l:flash
23
24See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/lily58/keymaps/lily58l/rules.mk b/keyboards/lily58/keymaps/lily58l/rules.mk
new file mode 100644
index 000000000..fcfd2225b
--- /dev/null
+++ b/keyboards/lily58/keymaps/lily58l/rules.mk
@@ -0,0 +1 @@
EXTRAKEY_ENABLE = yes
diff --git a/keyboards/lily58/light/config.h b/keyboards/lily58/light/config.h
new file mode 100644
index 000000000..1893dde8e
--- /dev/null
+++ b/keyboards/lily58/light/config.h
@@ -0,0 +1,53 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3Copyright 2015 Jack Humbert
4Copyright 2017 F_YUUCHI
5Copyright 2020 Ben Roesner (keycapsss.com)
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0x7983
25#define PRODUCT_ID 0x4C4C // "LL"
26#define DEVICE_VER 0x0100
27#define MANUFACTURER Keycapsss
28#define PRODUCT Lily58L
29
30/* key matrix size */
31// Rows are doubled-up
32#define MATRIX_ROWS 10
33#define MATRIX_COLS 6
34
35// wiring of each half
36#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
37#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
38
39/* Set 0 if debouncing isn't needed */
40#define DEBOUNCE 5
41
42#define SOFT_SERIAL_PIN D2
43
44#define RGB_DI_PIN D3
45#define RGBLED_SPLIT { 35, 35 }
46#define RGBLED_NUM 70
47#define RGBLIGHT_SPLIT
48#define RGBLIGHT_LIMIT_VAL 120
49
50#define ENCODERS_PAD_A { F4 }
51#define ENCODERS_PAD_B { F5 }
52#define ENCODERS_PAD_A_RIGHT { F5 }
53#define ENCODERS_PAD_B_RIGHT { F4 }
diff --git a/keyboards/lily58/light/info.json b/keyboards/lily58/light/info.json
new file mode 100644
index 000000000..a305103a9
--- /dev/null
+++ b/keyboards/lily58/light/info.json
@@ -0,0 +1,18 @@
1{
2 "keyboard_name": "Lily58",
3 "url": "https://keycapsss.com",
4 "maintainer": "BenRoe",
5 "width": 16.5,
6 "height": 5.25,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5},
11 {"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5},
12 {"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5},
13 {"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5},
14 {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.15}
15 ]
16 }
17 }
18}
diff --git a/keyboards/lily58/light/light.c b/keyboards/lily58/light/light.c
new file mode 100644
index 000000000..57a0df93d
--- /dev/null
+++ b/keyboards/lily58/light/light.c
@@ -0,0 +1,16 @@
1/*
2Copyright 2020 Ben Roesner (keycapsss.com)
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include "lily58.h"
16
diff --git a/keyboards/lily58/light/light.h b/keyboards/lily58/light/light.h
new file mode 100644
index 000000000..833ad13d0
--- /dev/null
+++ b/keyboards/lily58/light/light.h
@@ -0,0 +1,50 @@
1#pragma once
2
3#include "lily58.h"
4
5#include "quantum.h"
6
7
8#ifndef FLIP_HALF
9#define LAYOUT( \
10 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
11 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
12 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
13 L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \
14 L41, L42, L43, L44, R41, R42, R43, R44 \
15 ) \
16 { \
17 { L00, L01, L02, L03, L04, L05 }, \
18 { L10, L11, L12, L13, L14, L15 }, \
19 { L20, L21, L22, L23, L24, L25 }, \
20 { L30, L31, L32, L33, L34, L35 }, \
21 { KC_NO, L41, L42, L43, L44, L45 }, \
22 { R05, R04, R03, R02, R01, R00 }, \
23 { R15, R14, R13, R12, R11, R10 }, \
24 { R25, R24, R23, R22, R21, R20 }, \
25 { R35, R34, R33, R32, R31, R30 }, \
26 { KC_NO, R44, R43, R42, R41, R40 } \
27 }
28#else
29// Keymap with right side flipped
30// (TRRS jack on both halves are to the right)
31#define LAYOUT( \
32 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
33 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
34 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
35 L30, L31, L32, L33, L34, L35, L45, R30, R31, R32, R33, R34, R35, R45, \
36 L41, L42, L43, L44, R41, R42, R43, R44 \
37 ) \
38 { \
39 { L00, L01, L02, L03, L04, L05 }, \
40 { L10, L11, L12, L13, L14, L15 }, \
41 { L20, L21, L22, L23, L24, L25 }, \
42 { L30, L31, L32, L33, L34, L35 }, \
43 { KC_NO, L41, L42, L43, L44, L45 }, \
44 { R00, R01, R02, R03, R04, R05 }, \
45 { R10, R11, R12, R13, R14, R15 }, \
46 { R20, R21, R22, R23, R24, R25 }, \
47 { R30, R31, R32, R33, R34, R35 }, \
48 { KC_NO, R41, R42, R43, R44, R45 } \
49 }
50#endif
diff --git a/keyboards/lily58/light/rules.mk b/keyboards/lily58/light/rules.mk
new file mode 100644
index 000000000..d4957d98e
--- /dev/null
+++ b/keyboards/lily58/light/rules.mk
@@ -0,0 +1,3 @@
1ENCODER_ENABLE = yes # ENables the use of one or more encoders
2RGBLIGHT_ENABLE = yes # Enable keyboard RGB light
3LTO_ENABLE = yes # significantly reduce the compiled size, but disable the legacy TMK Macros and Functions features
diff --git a/keyboards/lily58/lily58.h b/keyboards/lily58/lily58.h
index 064f847dd..4f6f262bb 100644
--- a/keyboards/lily58/lily58.h
+++ b/keyboards/lily58/lily58.h
@@ -2,4 +2,6 @@
2 2
3#ifdef KEYBOARD_lily58_rev1 3#ifdef KEYBOARD_lily58_rev1
4 #include "rev1.h" 4 #include "rev1.h"
5#elif KEYBOARD_lily58_light
6 #include "light.h"
5#endif 7#endif