summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h1
-rw-r--r--keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c42
-rw-r--r--keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk22
-rw-r--r--keyboards/melody96/keymaps/konstantin/keymap.c2
-rw-r--r--keyboards/melody96/keymaps/konstantin/rules.mk21
-rw-r--r--keyboards/wasdat/keymaps/konstantin/rules.mk18
-rw-r--r--keyboards/whitefox/keymaps/konstantin/rules.mk22
7 files changed, 85 insertions, 43 deletions
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h
index 16387fa2f6..4b511eb848 100644
--- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h
+++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h
@@ -1,4 +1,3 @@
#pragma once
#define LAYER_FN
-#define SEND_STRING_CLEAN
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c
index b348b0b7bf..c5c8c09636 100644
--- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c
+++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c
@@ -10,7 +10,7 @@ enum layers_keymap {
};
void eeconfig_init_keymap(void) {
- rgblight_sethsv(MODERN_DOLCH_RED.h, MODERN_DOLCH_RED.s, MODERN_DOLCH_RED.v);
+ rgblight_sethsv(MODERN_DOLCH_RED);
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
}
@@ -31,6 +31,46 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
}
+static bool skip_caps = false;
+
+static void fn_light(uint32_t state) {
+ if (IS_LAYER_ON_STATE(state, L_FN)) {
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val());
+ skip_caps = true;
+ } else {
+ rgblight_config_t saved = { .raw = eeconfig_read_rgblight() };
+ rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val);
+ rgblight_mode_noeeprom(saved.mode);
+ }
+ // caps_light will be called automatically after this
+}
+
+static void caps_light(uint8_t usb_led) {
+ if (skip_caps) {
+ skip_caps = false;
+ return; // Skip calls triggered by the Fn layer turning on
+ }
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val());
+ } else {
+ fn_light(layer_state); // Caps is off, check if Fn light should be on
+ }
+}
+
+uint32_t layer_state_set_keymap(uint32_t state) {
+ static uint32_t prev_state = L_BASE;
+ if (IS_LAYER_ON_STATE(state, L_FN) != IS_LAYER_ON_STATE(prev_state, L_FN)) {
+ fn_light(state); // Fn state changed since last time
+ }
+ return prev_state = state;
+}
+
+void led_set_keymap(uint8_t usb_led) {
+ caps_light(usb_led);
+}
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base layer
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk
index f7cf0758b7..7262c6db66 100644
--- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk
+++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk
@@ -1,11 +1,11 @@
-BOOTMAGIC_ENABLE = no
-COMMAND_ENABLE = yes
-CONSOLE_ENABLE = no
-EXTRAKEY_ENABLE = yes
-MOUSEKEY_ENABLE = yes
-NKRO_ENABLE = yes
-TAP_DANCE_ENABLE = yes
-UNICODEMAP_ENABLE = no
-
-BACKLIGHT_ENABLE = yes
-RGBLIGHT_ENABLE = yes
+BACKLIGHT_ENABLE = no
+BOOTMAGIC_ENABLE = no
+COMMAND_ENABLE = yes
+CONSOLE_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+NKRO_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+SPACE_CADET_ENABLE = no
+TAP_DANCE_ENABLE = yes
+UNICODEMAP_ENABLE = no
diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c
index c2b0431047..e02ba0f85e 100644
--- a/keyboards/melody96/keymaps/konstantin/keymap.c
+++ b/keyboards/melody96/keymaps/konstantin/keymap.c
@@ -1,7 +1,7 @@
#include QMK_KEYBOARD_H
#include "konstantin.h"
-static const HSV *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW };
+static const HSV *colors[] = { &godspeed_blue, &godspeed_yellow };
static const size_t cnum = sizeof colors / sizeof *colors;
static size_t cidx = 0;
diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk
index 47a859d089..995402cb05 100644
--- a/keyboards/melody96/keymaps/konstantin/rules.mk
+++ b/keyboards/melody96/keymaps/konstantin/rules.mk
@@ -1,10 +1,11 @@
-BOOTMAGIC_ENABLE = no
-COMMAND_ENABLE = yes
-CONSOLE_ENABLE = no
-EXTRAKEY_ENABLE = yes
-MOUSEKEY_ENABLE = yes
-NKRO_ENABLE = yes
-TAP_DANCE_ENABLE = yes
-UNICODEMAP_ENABLE = yes
-
-BACKLIGHT_ENABLE = no
+BACKLIGHT_ENABLE = no
+BOOTMAGIC_ENABLE = no
+COMMAND_ENABLE = yes
+CONSOLE_ENABLE = no
+EXTRAKEY_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+NKRO_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+SPACE_CADET_ENABLE = no
+TAP_DANCE_ENABLE = yes
+UNICODEMAP_ENABLE = yes
diff --git a/keyboards/wasdat/keymaps/konstantin/rules.mk b/keyboards/wasdat/keymaps/konstantin/rules.mk
index 4bb1ee6588..041d321145 100644
--- a/keyboards/wasdat/keymaps/konstantin/rules.mk
+++ b/keyboards/wasdat/keymaps/konstantin/rules.mk
@@ -1,8 +1,10 @@
-BOOTMAGIC_ENABLE = no
-COMMAND_ENABLE = yes
-CONSOLE_ENABLE = yes
-EXTRAKEY_ENABLE = yes
-MOUSEKEY_ENABLE = yes
-NKRO_ENABLE = yes
-TAP_DANCE_ENABLE = yes
-UNICODEMAP_ENABLE = yes
+BACKLIGHT_ENABLE = no
+BOOTMAGIC_ENABLE = no
+COMMAND_ENABLE = yes
+CONSOLE_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+NKRO_ENABLE = yes
+SPACE_CADET_ENABLE = no
+TAP_DANCE_ENABLE = yes
+UNICODEMAP_ENABLE = yes
diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk
index 625ef346c8..bced6e8a70 100644
--- a/keyboards/whitefox/keymaps/konstantin/rules.mk
+++ b/keyboards/whitefox/keymaps/konstantin/rules.mk
@@ -1,11 +1,11 @@
-BOOTMAGIC_ENABLE = no
-COMMAND_ENABLE = yes
-CONSOLE_ENABLE = yes
-EXTRAKEY_ENABLE = yes
-MOUSEKEY_ENABLE = yes
-NKRO_ENABLE = yes
-TAP_DANCE_ENABLE = yes
-UNICODEMAP_ENABLE = yes
-
-BACKLIGHT_ENABLE = no
-VISUALIZER_ENABLE = no
+BACKLIGHT_ENABLE = no
+BOOTMAGIC_ENABLE = no
+COMMAND_ENABLE = yes
+CONSOLE_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+NKRO_ENABLE = yes
+SPACE_CADET_ENABLE = no
+TAP_DANCE_ENABLE = yes
+UNICODEMAP_ENABLE = yes
+VISUALIZER_ENABLE = no