skeletyl: rgb on active shift (#1)

<!--- Provide a general summary of your changes in the title above. -->

<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->

## Description

<!--- Describe your changes in detail here. -->

## Types of Changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply. -->
- [ ] Core
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Keyboard (addition or update)
- [ ] Keymap/layout/userspace (addition or update)
- [ ] Documentation

## Issues Fixed or Closed by This PR

*

## Checklist

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project: [**C**](https://docs.qmk.fm/#/coding_conventions_c), [**Python**](https://docs.qmk.fm/#/coding_conventions_python)
- [ ] I have read the [**PR Checklist** document](https://docs.qmk.fm/#/pr_checklist) and have made the appropriate changes.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing).
- [ ] I have added tests to cover my changes.
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Reviewed-on: #1
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2024-03-25 14:21:38 +01:00 committed by mg
parent 01edbf0974
commit 0a2e842dca
3 changed files with 18 additions and 11 deletions

View File

@ -17,3 +17,4 @@
#define RGB_TRIGGER_ON_KEYDOWN // Triggers RGB keypress events on key down. This makes RGB control feel more responsive. This may cause RGB to not function properly on some boards
// rgb timeout; https://gist.github.com/aashreys/01cb34605a290a7cfb94a856bdabc94c?permalink_comment_id=4520204#gistcomment-4520204
#define RGB_MATRIX_TIMEOUT 180000 // = 3min; number of milliseconds to wait until rgb automatically turns off
#define SPLIT_MODS_ENABLE

View File

@ -8,9 +8,15 @@ void keyboard_post_init_user(void) {
rgblight_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
}
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
// https://colorpicker.me/#fff115
// shift rgb
uint8_t mods = get_mods() | get_weak_mods() | get_oneshot_mods();
if ((mods) & MOD_MASK_SHIFT ) {
rgb_matrix_set_color_all(31, 206, 211); // turquoise
};
// layer rgb
for (uint8_t i = led_min; i < led_max; i++) {
switch(get_highest_layer(layer_state|default_layer_state)) {
// https://colorpicker.me/#fff115
case 0:
rgblight_sethsv(4, 75, 150); // warmhite (werte = hue, saturation, value)
break;
@ -91,10 +97,10 @@ combo_t key_combos[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Buchstaben - white
[0] = LAYOUT_split_3x5_3(
LT(0,KC_Q), LT(0,KC_W), LT(0,KC_F), KC_P, KC_B, KC_J, KC_L, KC_U, DE_Z, KC_BSPC,
LT(0,KC_A), KC_R, LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), KC_I, KC_O,
DE_Y, LT(0,KC_X), LT(0,KC_C), LSFT_T(KC_D), LT(0,KC_V), KC_K, LSFT_T(KC_H), DE_COMM, DE_DOT, DE_MINS,
XXXXXXX, LT(3, KC_DEL), LT(2, KC_ENT), LT(1, KC_SPC), MO(3), XXXXXXX
LT(0,KC_Q), LT(0,KC_W), LT(0,KC_F), KC_P, KC_B, KC_J, KC_L, KC_U, DE_Z, KC_BSPC,
LT(0,KC_A), KC_R, LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), KC_I, KC_O,
DE_Y, LT(0,KC_X), LT(0,KC_C), LSFT_T(KC_D), LT(0,KC_V), KC_K, LSFT_T(KC_H), DE_COMM, DE_DOT, DE_MINS,
XXXXXXX, LT(3, KC_DEL), LT(2, KC_ENT), LT(1, KC_SPC), MO(3), XXXXXXX
),
// Zahlen - orange
[1] = LAYOUT_split_3x5_3(
@ -106,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Sym - blue
[2] = LAYOUT_split_3x5_3(
DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC,
DE_EXLM, DE_DQUO, LSFT(DE_ACUT ), DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_EXLM, DE_DQUO, LSFT(DE_ACUT), DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_TILD, XXXXXXX, DE_ACUT, XXXXXXX, DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH,
XXXXXXX, _______, _______, _______, _______, XXXXXXX
),

View File

@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Sym - blue
[2] = LAYOUT_split_3x5_2(
DE_CIRC, DE_LBRC, DE_LPRN, DE_LPRN, DE_SECT, DE_PERC, DE_RCBR, DE_RPRN, DE_RBRC, KC_BSPC,
DE_EXLM, DE_DQUO, LSFT(DE_ACUT ), DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_EXLM, DE_DQUO, LSFT(DE_ACUT), DE_QUOT, DE_SLSH, RALT(DE_SS), DE_DLR, DE_AMPR, DE_ASTR, DE_QUES,
DE_TILD, XXXXXXX, DE_ACUT, XXXXXXX, DE_LABK , DE_RABK , XXXXXXX, DE_PLUS, DE_EQL, DE_HASH,
_______, _______, _______, _______
),
@ -62,10 +62,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
// Media - yellow
[4] = LAYOUT_split_3x5_2(
RGB_TOG, RGB_HUI, RGB_HUD, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_MOD, RGB_SAI, RGB_SAD, XXXXXXX, KC_MUTE, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_RMOD, RGB_VAI, RGB_VAD, KC_MPLY, KC_VOLD, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______, _______, _______
RGB_TOG, RGB_HUI, RGB_HUD, KC_PSCR, KC_VOLU, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_MOD, RGB_SAI, RGB_SAD, XXXXXXX, KC_MUTE, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_RMOD, RGB_VAI, RGB_VAD, KC_MPLY, KC_VOLD, KC_VOLD, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______, _______, _______
),
// Diacretics - dark red
[5] = LAYOUT_split_3x5_2(