diff options
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h | 1 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | 42 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | 22 | ||||
| -rw-r--r-- | keyboards/melody96/keymaps/konstantin/keymap.c | 2 | ||||
| -rw-r--r-- | keyboards/melody96/keymaps/konstantin/rules.mk | 21 | ||||
| -rw-r--r-- | keyboards/wasdat/keymaps/konstantin/rules.mk | 18 | ||||
| -rw-r--r-- | keyboards/whitefox/keymaps/konstantin/rules.mk | 22 |
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 16387fa2f..4b511eb84 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #define LAYER_FN | 3 | #define LAYER_FN |
| 4 | #define SEND_STRING_CLEAN | ||
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index b348b0b7b..c5c8c0963 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | |||
| @@ -10,7 +10,7 @@ enum layers_keymap { | |||
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | void eeconfig_init_keymap(void) { | 12 | void eeconfig_init_keymap(void) { |
| 13 | rgblight_sethsv(MODERN_DOLCH_RED.h, MODERN_DOLCH_RED.s, MODERN_DOLCH_RED.v); | 13 | rgblight_sethsv(MODERN_DOLCH_RED); |
| 14 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); | 14 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); |
| 15 | } | 15 | } |
| 16 | 16 | ||
| @@ -31,6 +31,46 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 31 | } | 31 | } |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | static bool skip_caps = false; | ||
| 35 | |||
| 36 | static void fn_light(uint32_t state) { | ||
| 37 | if (IS_LAYER_ON_STATE(state, L_FN)) { | ||
| 38 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 39 | rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); | ||
| 40 | skip_caps = true; | ||
| 41 | } else { | ||
| 42 | rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; | ||
| 43 | rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); | ||
| 44 | rgblight_mode_noeeprom(saved.mode); | ||
| 45 | } | ||
| 46 | // caps_light will be called automatically after this | ||
| 47 | } | ||
| 48 | |||
| 49 | static void caps_light(uint8_t usb_led) { | ||
| 50 | if (skip_caps) { | ||
| 51 | skip_caps = false; | ||
| 52 | return; // Skip calls triggered by the Fn layer turning on | ||
| 53 | } | ||
| 54 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
| 55 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 56 | rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); | ||
| 57 | } else { | ||
| 58 | fn_light(layer_state); // Caps is off, check if Fn light should be on | ||
| 59 | } | ||
| 60 | } | ||
| 61 | |||
| 62 | uint32_t layer_state_set_keymap(uint32_t state) { | ||
| 63 | static uint32_t prev_state = L_BASE; | ||
| 64 | if (IS_LAYER_ON_STATE(state, L_FN) != IS_LAYER_ON_STATE(prev_state, L_FN)) { | ||
| 65 | fn_light(state); // Fn state changed since last time | ||
| 66 | } | ||
| 67 | return prev_state = state; | ||
| 68 | } | ||
| 69 | |||
| 70 | void led_set_keymap(uint8_t usb_led) { | ||
| 71 | caps_light(usb_led); | ||
| 72 | } | ||
| 73 | |||
| 34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 74 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 35 | /* Base layer | 75 | /* Base layer |
| 36 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ | 76 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ |
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index f7cf0758b..7262c6db6 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no | 1 | BACKLIGHT_ENABLE = no |
| 2 | COMMAND_ENABLE = yes | 2 | BOOTMAGIC_ENABLE = no |
| 3 | CONSOLE_ENABLE = no | 3 | COMMAND_ENABLE = yes |
| 4 | EXTRAKEY_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | MOUSEKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | NKRO_ENABLE = yes | 6 | MOUSEKEY_ENABLE = yes |
| 7 | TAP_DANCE_ENABLE = yes | 7 | NKRO_ENABLE = yes |
| 8 | UNICODEMAP_ENABLE = no | 8 | RGBLIGHT_ENABLE = yes |
| 9 | 9 | SPACE_CADET_ENABLE = no | |
| 10 | BACKLIGHT_ENABLE = yes | 10 | TAP_DANCE_ENABLE = yes |
| 11 | RGBLIGHT_ENABLE = yes | 11 | UNICODEMAP_ENABLE = no |
diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index c2b043104..e02ba0f85 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | #include "konstantin.h" | 2 | #include "konstantin.h" |
| 3 | 3 | ||
| 4 | static const HSV *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; | 4 | static const HSV *colors[] = { &godspeed_blue, &godspeed_yellow }; |
| 5 | static const size_t cnum = sizeof colors / sizeof *colors; | 5 | static const size_t cnum = sizeof colors / sizeof *colors; |
| 6 | static size_t cidx = 0; | 6 | static size_t cidx = 0; |
| 7 | 7 | ||
diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 47a859d08..995402cb0 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no | 1 | BACKLIGHT_ENABLE = no |
| 2 | COMMAND_ENABLE = yes | 2 | BOOTMAGIC_ENABLE = no |
| 3 | CONSOLE_ENABLE = no | 3 | COMMAND_ENABLE = yes |
| 4 | EXTRAKEY_ENABLE = yes | 4 | CONSOLE_ENABLE = no |
| 5 | MOUSEKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | NKRO_ENABLE = yes | 6 | MOUSEKEY_ENABLE = yes |
| 7 | TAP_DANCE_ENABLE = yes | 7 | NKRO_ENABLE = yes |
| 8 | UNICODEMAP_ENABLE = yes | 8 | RGBLIGHT_ENABLE = yes |
| 9 | 9 | SPACE_CADET_ENABLE = no | |
| 10 | BACKLIGHT_ENABLE = no | 10 | TAP_DANCE_ENABLE = yes |
| 11 | UNICODEMAP_ENABLE = yes | ||
diff --git a/keyboards/wasdat/keymaps/konstantin/rules.mk b/keyboards/wasdat/keymaps/konstantin/rules.mk index 4bb1ee658..041d32114 100644 --- a/keyboards/wasdat/keymaps/konstantin/rules.mk +++ b/keyboards/wasdat/keymaps/konstantin/rules.mk | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no | 1 | BACKLIGHT_ENABLE = no |
| 2 | COMMAND_ENABLE = yes | 2 | BOOTMAGIC_ENABLE = no |
| 3 | CONSOLE_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | EXTRAKEY_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | MOUSEKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | NKRO_ENABLE = yes | 6 | MOUSEKEY_ENABLE = yes |
| 7 | TAP_DANCE_ENABLE = yes | 7 | NKRO_ENABLE = yes |
| 8 | UNICODEMAP_ENABLE = yes | 8 | SPACE_CADET_ENABLE = no |
| 9 | TAP_DANCE_ENABLE = yes | ||
| 10 | UNICODEMAP_ENABLE = yes | ||
diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 625ef346c..bced6e8a7 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no | 1 | BACKLIGHT_ENABLE = no |
| 2 | COMMAND_ENABLE = yes | 2 | BOOTMAGIC_ENABLE = no |
| 3 | CONSOLE_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | EXTRAKEY_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | MOUSEKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | NKRO_ENABLE = yes | 6 | MOUSEKEY_ENABLE = yes |
| 7 | TAP_DANCE_ENABLE = yes | 7 | NKRO_ENABLE = yes |
| 8 | UNICODEMAP_ENABLE = yes | 8 | SPACE_CADET_ENABLE = no |
| 9 | 9 | TAP_DANCE_ENABLE = yes | |
| 10 | BACKLIGHT_ENABLE = no | 10 | UNICODEMAP_ENABLE = yes |
| 11 | VISUALIZER_ENABLE = no | 11 | VISUALIZER_ENABLE = no |
