aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Elwert <belak@coded.io>2017-06-16 10:57:53 -0700
committerKaleb Elwert <belak@coded.io>2017-06-16 10:57:58 -0700
commitef4abfeb3105e03f752d9d1c7b0ad4edecbef75a (patch)
treeb5961980809baca932728529de9faa10dd9c8e13
parentd9ffd77ee78ee64dd8689bbfb54b5dcd150d7a10 (diff)
downloadqmk_firmware-ef4abfeb3105e03f752d9d1c7b0ad4edecbef75a.tar.gz
qmk_firmware-ef4abfeb3105e03f752d9d1c7b0ad4edecbef75a.zip
ergodox: initial addition of belak theme
Imported from external repo https://github.com/belak/ergodox-layout at commit 233008ad8c46a85cb118fca0be093c3e751075b0
-rw-r--r--keyboards/ergodox/keymaps/belak/LICENSE21
-rw-r--r--keyboards/ergodox/keymaps/belak/Makefile6
-rw-r--r--keyboards/ergodox/keymaps/belak/README.md79
-rw-r--r--keyboards/ergodox/keymaps/belak/keymap.c367
-rw-r--r--keyboards/ergodox/keymaps/belak/visualizer.c49
5 files changed, 522 insertions, 0 deletions
diff --git a/keyboards/ergodox/keymaps/belak/LICENSE b/keyboards/ergodox/keymaps/belak/LICENSE
new file mode 100644
index 000000000..b462ba30e
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/LICENSE
@@ -0,0 +1,21 @@
1MIT License
2
3Copyright (c) 2016 Kaleb Elwert
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
diff --git a/keyboards/ergodox/keymaps/belak/Makefile b/keyboards/ergodox/keymaps/belak/Makefile
new file mode 100644
index 000000000..8a6beea59
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/Makefile
@@ -0,0 +1,6 @@
1TAP_DANCE_ENABLE=yes
2UNICODE_ENABLE=yes
3
4ifndef QUANTUM_DIR
5 include ../../../../Makefile
6endif
diff --git a/keyboards/ergodox/keymaps/belak/README.md b/keyboards/ergodox/keymaps/belak/README.md
new file mode 100644
index 000000000..30484e6e2
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/README.md
@@ -0,0 +1,79 @@
1# Belak's Ergodox Layout
2
3This has been based off of [emacs\_osx\_dk](https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/ergodox/keymaps/emacs_osx_dk)
4from the main qmk repo. However, I've taken some of the ideas for the thumbs
5from [dvorak\_emacs](https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/ergodox/keymaps/dvorak_emacs)
6and tweaked it a bit based on the keycaps I have.
7
8This keyboard is intended for use in emacs (one of the main reasons for easy
9access to modifiers) but it could be useful in other instances as well.
10
11The main repo is used as a testbed, so sometimes the layout may be in a strange
12state. The qmk version should be relatively stable.
13
14## Instructions
15
16This is currently being used on a regular ergodox, but it should work fine on
17the infinity as well. Though, you may have to modify the commands to build and
18flash the firmware to match the separate halves as defined in the infinity
19documentation.
20
21If you are using this keymap in the qmk repo, you should be able to just run
22`make ergodox-belak-teensy`. If you're using this externally (I sometimes make
23changes before syncing them to qmk), use the following instructions:
24
251. Clone the main qmk repo
262. Clone this to `$QMK/keyboards/ergodox/keymaps/belak-external`
273. Run `make ergodox-belak-external-teensy` from the root of the qmk repo.
28
29## Changelog
30
31Fifth Revision
32
33* Change layer keys to tap-dance keys which cycle through additional layers
34* Add a few emoji keys (in preparation for an emoji layer)
35
36Fourth Revision
37
38* Remove media layer
39* Add a layer which swaps control and gui on the thumb keys.
40* Add some basic code to save settings to the eeprom
41* Save the state of the keys swapped in the thumb in the eeprom
42
43Third Revision
44
45* Add numpad layer and remove numpad from symbols layer
46* Disable media layer
47* Add arrow keys on ijkl to the symbols layer
48* Replace ALT on held enter and held delete with GUI (for better OSX
49 compatibility, as there's already an ALT key relatively close)
50* Replace keys above enter and delete with temporary layer switch buttons not
51 matching the other layer switch for that hand.
52* Reindent and space out most of the layer definitions
53
54Second Revision
55
56* Clean up definitions to make differences between layers easier to see
57* Remove old LCD code
58* Add new LCD code based on fredizzimo's branch
59
60First Revision
61
62* Reverse grave and escape
63
64Initial Version
65
66* Copy from emacs\_osx\_dk
67* "Fix" right alt
68* Change thumb keys to match default layout (backspace, delete, enter, space)
69* Add modifiers to thumb keys (ctrl to backspace and space, alt to delete and
70 enter)
71* Replace the RAlt below the brackets with LGui and RGui
72* Remove LCtrl and RCtrl from the keys above shift
73* Add browser forward, and move browser back
74* "Fix" the order of volume keys
75
76## Repository
77
78The original code for this is kept at https://github.com/belak/ergodox-layout and
79is synced to qmk every few main revisions.
diff --git a/keyboards/ergodox/keymaps/belak/keymap.c b/keyboards/ergodox/keymaps/belak/keymap.c
new file mode 100644
index 000000000..d10567a78
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/keymap.c
@@ -0,0 +1,367 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4#include "eeconfig.h"
5
6#define LAYER_ON(pos) ((layer_state) & (1<<(pos)))
7#define _______ KC_TRNS
8
9#define EECONFIG_BELAK_MAGIC (uint16_t)0xBE42
10
11// NOTE: This is just a number that's a bit beyond the end of what's already
12// defined. As there is no other define we can base this on, it may need to be
13// changed in the future. The initial value here is used as a placeholder with a
14// magic word, similar to the normal eeconfig. Note that all the storage being
15// used needs to fit inside the 32 bytes of the Ergodox Infinity.
16#define EECONFIG_BELAK (uint16_t *)16
17
18// The correct way to do this would be how the normal eeconfig handles it and
19// use a bitfield. However, the eeprom has a ton of space which isn't being
20// used so I don't really care and have a separate byte for every setting.
21#define EECONFIG_BELAK_SWAP_GUI_CTRL (uint8_t *)18
22
23static uint8_t swap_gui_ctrl = 0;
24static uint8_t td_led_override = 0;
25
26enum belak_keycodes {
27 // Function codes
28 BEL_F0 = SAFE_RANGE,
29 BEL_F1,
30
31 E_SHRUG,
32 E_TFLIP,
33 E_TSET,
34};
35
36inline void tap(uint16_t keycode) {
37 register_code(keycode);
38 unregister_code(keycode);
39};
40
41// TODO: Add LED support to the tap dance by using the advanced macro
42#define LTOGGLE TD(TD_LAYER_TOGGLE)
43
44#define BASE 0 // default layer
45#define SYMB 1 // symbols
46#define NUMP 2 // numpad
47#define SWPH 3 // swap gui/ctrl on the hands
48
49enum belak_td {
50 TD_LAYER_TOGGLE = 0,
51};
52
53void belak_td_each(qk_tap_dance_state_t *state, void *user_data);
54void belak_td_finished(qk_tap_dance_state_t *state, void *user_data);
55void belak_td_reset(qk_tap_dance_state_t *state, void *user_data);
56
57qk_tap_dance_action_t tap_dance_actions[] = {
58 [TD_LAYER_TOGGLE] = ACTION_TAP_DANCE_FN_ADVANCED(belak_td_each, belak_td_finished, belak_td_reset),
59};
60
61const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62/* Keymap 0: Basic layer
63 *
64 * ,--------------------------------------------------. ,--------------------------------------------------.
65 * | Esc | 1 | 2 | 3 | 4 | 5 | L1 | | L2 | 6 | 7 | 8 | 9 | 0 | = |
66 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
67 * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | - |
68 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
69 * | \ | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
70 * |--------+------+------+------+------+------| LGui | | RGui |------+------+------+------+------+--------|
71 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
72 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
73 * |Layers| LCtrl| Left | Right| LAlt | | RAlt | Up | Down | RCtrl|Layers|
74 * `----------------------------------' `----------------------------------'
75 * ,-------------. ,--------------.
76 * | ~L2 | Ins | | Grv | ~L1 |
77 * ,-------|------|------| |------+-------+-------.
78 * | Back | | Home | | PgUp | | |
79 * | Space | Del |------| |------| Enter | Space |
80 * | | | End | | PgDn | | |
81 * `---------------------' `----------------------'
82 */
83 [BASE] = KEYMAP( // layer 0 : default
84 // left hand
85 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB),
86 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
87 CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G,
88 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI,
89 LTOGGLE, KC_LCTRL, KC_LEFT,KC_RGHT,KC_LALT,
90 MO(NUMP),KC_INS,
91 KC_HOME,
92 CTL_T(KC_BSPC),GUI_T(KC_DEL),KC_END,
93 // right hand
94 TG(NUMP), KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
95 KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
96 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
97 KC_RGUI, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
98 KC_RALT,KC_UP, KC_DOWN,KC_RCTRL, LTOGGLE,
99 KC_GRV, MO(SYMB),
100 KC_PGUP,
101 KC_PGDN, GUI_T(KC_ENT), CTL_T(KC_SPC)
102 ),
103/* Keymap 1: Symbol Layer
104 *
105 * ,--------------------------------------------------. ,--------------------------------------------------.
106 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
107 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
108 * | | ! | @ | { | } | | | | | | Up | | Up | | | F12 |
109 * |--------+------+------+------+------+------| TFLIP| | TSET |------+------+------+------+------+--------|
110 * | | # | $ | ( | ) | ` |------| |------| Down | Left | Down | Rght | | |
111 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
112 * | | % | ^ | [ | ] | ~ | SHRUG| | | & | | | | | |
113 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
114 * |LClear| | | | | | | | | |LClear|
115 * `----------------------------------' `----------------------------------'
116 * ,-------------. ,-------------.
117 * | TOGL | | | | TOGL |
118 * ,------|------|------| |------+------+------.
119 * | | | | | | | |
120 * | | |------| |------| | |
121 * | | | | | | | |
122 * `--------------------' `--------------------'
123 */
124 [SYMB] = KEYMAP(
125 // left hand
126 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, E_TFLIP,
127 _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, E_TSET,
128 _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
129 _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, E_SHRUG,
130 BEL_F1, _______, _______, _______, _______,
131 BEL_F0, _______,
132 _______,
133 _______, _______, _______,
134 // right hand
135 _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
136 _______, KC_UP, _______, KC_UP, _______, _______, KC_F12,
137 KC_DOWN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
138 _______, KC_AMPR, _______, _______, _______, _______, _______,
139 _______, _______, _______, _______, BEL_F1,
140 _______, BEL_F0,
141 _______,
142 _______, _______, _______
143 ),
144/* Keymap 2: Numpad Layer
145 *
146 * ,--------------------------------------------------. ,--------------------------------------------------.
147 * | | | | | | | | | | | | | | | |
148 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
149 * | | | | | | | | | | | 7 | 8 | 9 | * | |
150 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
151 * | | | | | | |------| |------| | 4 | 5 | 6 | + | |
152 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
153 * | | | | | | | | | | | 1 | 2 | 3 | \ | |
154 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
155 * |LClear| | | | | | 0 | 0 | . | = |LClear|
156 * `----------------------------------' `----------------------------------'
157 * ,-------------. ,-------------.
158 * | TOGL | | | | TOGL |
159 * ,------|------|------| |------+------+------.
160 * | | | | | | | |
161 * | | |------| |------| | |
162 * | | | | | | | |
163 * `--------------------' `--------------------'
164 */
165 [NUMP] = KEYMAP(
166 // left hand
167 _______, _______, _______, _______, _______, _______, _______,
168 _______, _______, _______, _______, _______, _______, _______,
169 _______, _______, _______, _______, _______, _______,
170 _______, _______, _______, _______, _______, _______, _______,
171 BEL_F1, _______, _______, _______, _______,
172 BEL_F0, _______,
173 _______,
174 _______, _______, _______,
175 // right hand
176 _______, _______, _______, _______, _______, _______, _______,
177 _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______,
178 _______, KC_4, KC_5, KC_6, KC_PLUS, _______,
179 _______, _______, KC_1, KC_2, KC_3, KC_BSLS, _______,
180 KC_0, KC_0, KC_DOT, KC_EQL, BEL_F1,
181 _______, BEL_F0,
182 _______,
183 _______, _______, _______
184 ),
185/* Keymap 3: Swap control and gui on the thumb */
186 [SWPH] = KEYMAP(
187 // left hand
188 _______, _______, _______, _______, _______, _______, _______,
189 _______, _______, _______, _______, _______, _______, _______,
190 _______, _______, _______, _______, _______, _______,
191 _______, _______, _______, _______, _______, _______, _______,
192 _______, _______, _______, _______, _______,
193 _______, _______,
194 _______,
195 GUI_T(KC_BSPC), CTL_T(KC_DEL), _______,
196 // right hand
197 _______, _______, _______, _______, _______, _______, _______,
198 _______, _______, _______, _______, _______, _______, _______,
199 _______, _______, _______, _______, _______, _______,
200 _______, _______, _______, _______, _______, _______, _______,
201 _______, _______, _______, _______, _______,
202 _______, _______,
203 _______,
204 _______, CTL_T(KC_ENT), GUI_T(KC_SPC)
205 ),
206};
207
208// Runs just one time when the keyboard initializes.
209void matrix_init_user(void) {
210 // If our magic word wasn't set properly, we need to zero out the settings.
211 if (eeprom_read_word(EECONFIG_BELAK) != EECONFIG_BELAK_MAGIC) {
212 eeprom_update_word(EECONFIG_BELAK, EECONFIG_BELAK_MAGIC);
213 eeprom_update_byte(EECONFIG_BELAK_SWAP_GUI_CTRL, 0);
214 }
215
216 if (eeprom_read_byte(EECONFIG_BELAK_SWAP_GUI_CTRL)) {
217 layer_on(SWPH);
218 swap_gui_ctrl = 1;
219 }
220};
221
222// Runs constantly in the background, in a loop.
223void matrix_scan_user(void) {
224 ergodox_board_led_off();
225 ergodox_right_led_1_off();
226 ergodox_right_led_2_off();
227 ergodox_right_led_3_off();
228
229 switch (td_led_override) {
230 case 1:
231 ergodox_right_led_1_on();
232 break;
233 case 2:
234 ergodox_right_led_2_on();
235 break;
236 default:
237 // Layer 1 and 2 are both overlay layers, so they could both be on. This
238 // means we can't use the lazy check of checking for the first significant
239 // bit.
240 if (LAYER_ON(SYMB)) {
241 ergodox_right_led_1_on();
242 }
243 if (LAYER_ON(NUMP)) {
244 ergodox_right_led_2_on();
245 }
246 }
247};
248
249bool process_record_user(uint16_t keycode, keyrecord_t *record) {
250 switch (keycode) {
251 case BEL_F0:
252 if(record->event.pressed){
253 swap_gui_ctrl = !swap_gui_ctrl;
254 eeprom_update_byte(EECONFIG_BELAK_SWAP_GUI_CTRL, swap_gui_ctrl);
255
256 if (swap_gui_ctrl) {
257 layer_on(SWPH);
258 } else {
259 layer_off(SWPH);
260 }
261
262 return false;
263 }
264 break;
265 case BEL_F1:
266 if(record->event.pressed){
267 layer_off(SYMB);
268 layer_off(NUMP);
269
270 return false;
271 }
272 break;
273 case E_SHRUG: // ¯\_(ツ)_/¯
274 if (record->event.pressed) {
275 process_unicode((0x00AF|QK_UNICODE), record); // Hand
276 tap(KC_BSLS); // Arm
277 register_code(KC_RSFT);
278 tap(KC_UNDS); // Arm
279 tap(KC_LPRN); // Head
280 unregister_code(KC_RSFT);
281 process_unicode((0x30C4|QK_UNICODE), record); // Face
282 register_code(KC_RSFT);
283 tap(KC_RPRN); // Head
284 tap(KC_UNDS); // Arm
285 unregister_code(KC_RSFT);
286 tap(KC_SLSH); // Arm
287 process_unicode((0x00AF|QK_UNICODE), record); // Hand
288 }
289 return false;
290 break;
291 case E_TFLIP: // (╯°□°)╯ ︵ ┻━┻
292 if (record->event.pressed) {
293 register_code(KC_RSFT);
294 tap(KC_9);
295 unregister_code(KC_RSFT);
296 process_unicode((0x256F|QK_UNICODE), record); // Arm
297 process_unicode((0x00B0|QK_UNICODE), record); // Eye
298 process_unicode((0x25A1|QK_UNICODE), record); // Mouth
299 process_unicode((0x00B0|QK_UNICODE), record); // Eye
300 register_code(KC_RSFT);
301 tap(KC_0);
302 unregister_code(KC_RSFT);
303 process_unicode((0x256F|QK_UNICODE), record); // Arm
304 tap(KC_SPC);
305 process_unicode((0x0361|QK_UNICODE), record); // Flippy
306 tap(KC_SPC);
307 process_unicode((0x253B|QK_UNICODE), record); // Table
308 process_unicode((0x2501|QK_UNICODE), record); // Table
309 process_unicode((0x253B|QK_UNICODE), record); // Table
310 }
311 return false;
312 break;
313 case E_TSET: // ┬──┬ ノ( ゜-゜ノ)
314 if (record->event.pressed) {
315 process_unicode((0x252C|QK_UNICODE), record); // Table
316 process_unicode((0x2500|QK_UNICODE), record); // Table
317 process_unicode((0x2500|QK_UNICODE), record); // Table
318 process_unicode((0x252C|QK_UNICODE), record); // Table
319 tap(KC_SPC);
320 process_unicode((0x30CE|QK_UNICODE), record); // Arm
321 register_code(KC_RSFT);
322 tap(KC_9);
323 unregister_code(KC_RSFT);
324 tap(KC_SPC);
325 process_unicode((0x309C|QK_UNICODE), record); // Eye
326 tap(KC_MINS);
327 process_unicode((0x309C|QK_UNICODE), record); // Eye
328 process_unicode((0x30CE|QK_UNICODE), record); // Arm
329 register_code(KC_RSFT);
330 tap(KC_0);
331 unregister_code(KC_RSFT);
332 }
333 return false;
334 break;
335 }
336
337 return true;
338}
339
340void belak_td_each(qk_tap_dance_state_t *state, void *user_data) {
341 switch (state->count) {
342 case 1:
343 td_led_override = 1;
344 break;
345 case 2:
346 td_led_override = 2;
347 break;
348 default:
349 reset_tap_dance(state);
350 }
351}
352
353void belak_td_finished(qk_tap_dance_state_t *state, void *user_data) {
354 switch (state->count) {
355 case 1:
356 layer_on(SYMB);
357 break;
358 case 2:
359 layer_on(NUMP);
360 break;
361 }
362 td_led_override = 0;
363}
364
365void belak_td_reset(qk_tap_dance_state_t *state, void *user_data) {
366 td_led_override = 0;
367}
diff --git a/keyboards/ergodox/keymaps/belak/visualizer.c b/keyboards/ergodox/keymaps/belak/visualizer.c
new file mode 100644
index 000000000..b92890a66
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/visualizer.c
@@ -0,0 +1,49 @@
1/*
2Copyright 2017 Fred Sundvik
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18// Currently we are assuming that both the backlight and LCD are enabled
19// But it's entirely possible to write a custom visualizer that use only
20// one of them
21#ifndef LCD_BACKLIGHT_ENABLE
22#error This visualizer needs that LCD backlight is enabled
23#endif
24
25#ifndef LCD_ENABLE
26#error This visualizer needs that LCD is enabled
27#endif
28
29#include "simple_visualizer.h"
30
31static void get_visualizer_layer_and_color(visualizer_state_t* state) {
32 uint8_t saturation = 60;
33 if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
34 saturation = 255;
35 }
36
37 if (state->status.layer & 0x4) {
38 state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
39 state->layer_text = "Media";
40 }
41 else if (state->status.layer & 0x2) {
42 state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
43 state->layer_text = "Symbols";
44 }
45 else {
46 state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
47 state->layer_text = "Base";
48 }
49}