Skip to content

Commit bdacb2c

Browse files
authored
[Keymap] Drashna keymap fixups (qmk#14140)
1 parent d053338 commit bdacb2c

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

layouts/community/ortho_4x12/drashna/keymap.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
215215
uint8_t this_mod = get_mods();
216216
uint8_t this_led = host_keyboard_leds();
217217
uint8_t this_osm = get_oneshot_mods();
218-
bool is_ez;
219218
# ifdef KEYBOARD_planck_ez
220-
is_ez = true;
219+
# define THUMB_LED 41
220+
# else
221+
# define THUMB_LED 42
221222
# endif
222-
223+
# define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__)
223224
# if defined(RGBLIGHT_ENABLE)
224225
if (!userspace_config.rgb_layer_change)
225226
# else
@@ -265,16 +266,16 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
265266

266267
switch (get_highest_layer(default_layer_state)) {
267268
case _DEFAULT_LAYER_1:
268-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF);
269+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_1_RGB);
269270
break;
270271
case _DEFAULT_LAYER_2:
271-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF);
272+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_2_RGB);
272273
break;
273274
case _DEFAULT_LAYER_3:
274-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00);
275+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_3_RGB);
275276
break;
276277
case _DEFAULT_LAYER_4:
277-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21);
278+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_4_RGB);
278279
break;
279280
}
280281

users/drashna/drashna.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
172172
return state;
173173
}
174174

175-
state = layer_state_set_keymap(state);
176175
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
177176
#if defined(RGBLIGHT_ENABLE)
178177
state = layer_state_set_rgb_light(state);
@@ -188,6 +187,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
188187
}
189188
}
190189
#endif
190+
state = layer_state_set_keymap(state);
191191
return state;
192192
}
193193

users/drashna/drashna.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,15 @@ enum userspace_layers {
7676
#endif
7777

7878
#define DEFAULT_LAYER_1_HSV HSV_CYAN
79-
#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN
79+
#define DEFAULT_LAYER_2_HSV HSV_CHARTREUSE
8080
#define DEFAULT_LAYER_3_HSV HSV_MAGENTA
8181
#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD
8282

83+
#define DEFAULT_LAYER_1_RGB RGB_CYAN
84+
#define DEFAULT_LAYER_2_RGB RGB_CHARTREUSE
85+
#define DEFAULT_LAYER_3_RGB RGB_MAGENTA
86+
#define DEFAULT_LAYER_4_RGB RGB_GOLDENROD
87+
8388
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
8489
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
8590
void matrix_init_keymap(void);

users/drashna/transport_sync.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ void keyboard_post_init_transport_sync(void) {
7171

7272
void user_transport_update(void) {
7373
if (is_keyboard_master()) {
74-
# ifdef OLED_ENABLE
75-
user_state.oled_on = is_oled_on();
76-
# endif
77-
7874
transport_keymap_config = keymap_config.raw;
7975
transport_userspace_config = userspace_config.raw;
8076
#ifdef AUDIO_ENABLE
@@ -89,13 +85,6 @@ void user_transport_update(void) {
8985
#endif
9086

9187
} else {
92-
# ifdef OLED_ENABLE
93-
if (user_state.oled_on) {
94-
oled_on();
95-
} else {
96-
oled_off();
97-
}
98-
# endif
9988
keymap_config.raw = transport_keymap_config;
10089
userspace_config.raw = transport_userspace_config;
10190
#ifdef UNICODE_ENABLE

0 commit comments

Comments
 (0)