diff options
Diffstat (limited to 'keyboards')
6 files changed, 23 insertions, 0 deletions
diff --git a/keyboards/doro67/multi/keymaps/konstantin/rules.mk b/keyboards/doro67/multi/keymaps/konstantin/rules.mk index 041d32114..c3a73fd84 100644 --- a/keyboards/doro67/multi/keymaps/konstantin/rules.mk +++ b/keyboards/doro67/multi/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index d00232205..46cc0a113 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c | |||
| @@ -14,8 +14,23 @@ void eeconfig_init_keymap(void) { | |||
| 14 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); | 14 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | bool indicator_light = false; | ||
| 18 | |||
| 17 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 19 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 18 | switch (keycode) { | 20 | switch (keycode) { |
| 21 | case RGB_TOG ... RGB_SPD: | ||
| 22 | // Disable RGB controls when Fn/Caps indicator lights are on | ||
| 23 | if (indicator_light) { | ||
| 24 | return false; | ||
| 25 | } | ||
| 26 | // Shift+Toggle = reset RGB | ||
| 27 | if (record->event.pressed && keycode == RGB_TOG && get_mods() & MOD_MASK_SHIFT) { | ||
| 28 | eeconfig_init_keymap(); | ||
| 29 | return false; | ||
| 30 | } | ||
| 31 | break; | ||
| 32 | |||
| 33 | // Combined RCtrl and layer | ||
| 19 | case RCTRL: | 34 | case RCTRL: |
| 20 | if (record->event.pressed) { | 35 | if (record->event.pressed) { |
| 21 | register_code(KC_RCTRL); | 36 | register_code(KC_RCTRL); |
| @@ -33,17 +48,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 33 | static inline void fn_light(void) { | 48 | static inline void fn_light(void) { |
| 34 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | 49 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); |
| 35 | rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); | 50 | rgblight_sethsv_noeeprom(modern_dolch_red.h, modern_dolch_red.s, rgblight_get_val()); |
| 51 | indicator_light = true; | ||
| 36 | } | 52 | } |
| 37 | 53 | ||
| 38 | static inline void caps_light(void) { | 54 | static inline void caps_light(void) { |
| 39 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | 55 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); |
| 40 | rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); | 56 | rgblight_sethsv_noeeprom(modern_dolch_cyan.h, modern_dolch_cyan.s, rgblight_get_val()); |
| 57 | indicator_light = true; | ||
| 41 | } | 58 | } |
| 42 | 59 | ||
| 43 | static inline void restore_light(void) { | 60 | static inline void restore_light(void) { |
| 44 | rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; | 61 | rgblight_config_t saved = { .raw = eeconfig_read_rgblight() }; |
| 45 | rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); | 62 | rgblight_sethsv_noeeprom(saved.hue, saved.sat, saved.val); |
| 46 | rgblight_mode_noeeprom(saved.mode); | 63 | rgblight_mode_noeeprom(saved.mode); |
| 64 | indicator_light = false; | ||
| 47 | } | 65 | } |
| 48 | 66 | ||
| 49 | static void check_light_layer(uint32_t state) { | 67 | static void check_light_layer(uint32_t state) { |
diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index 64428383c..c75488af6 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = no | 4 | CONSOLE_ENABLE = no |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | RGBLIGHT_ENABLE = yes | 9 | RGBLIGHT_ENABLE = yes |
diff --git a/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk b/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk index 041d32114..c3a73fd84 100644 --- a/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk +++ b/keyboards/maartenwut/wasdat/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 995402cb0..5b36eef2c 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = no | 4 | CONSOLE_ENABLE = no |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | RGBLIGHT_ENABLE = yes | 9 | RGBLIGHT_ENABLE = yes |
diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index bced6e8a7..c39175c97 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk | |||
| @@ -3,6 +3,7 @@ BOOTMAGIC_ENABLE = no | |||
| 3 | COMMAND_ENABLE = yes | 3 | COMMAND_ENABLE = yes |
| 4 | CONSOLE_ENABLE = yes | 4 | CONSOLE_ENABLE = yes |
| 5 | EXTRAKEY_ENABLE = yes | 5 | EXTRAKEY_ENABLE = yes |
| 6 | GRAVE_ESC_ENABLE = no | ||
| 6 | MOUSEKEY_ENABLE = yes | 7 | MOUSEKEY_ENABLE = yes |
| 7 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 8 | SPACE_CADET_ENABLE = no | 9 | SPACE_CADET_ENABLE = no |
