forked from mirrors/qmk_firmware
Mbsurfer Let's Split keymap updates (#1787)
* Fix mbsurfer let's split layout RGB indicators when both lower and raise are pressed * Update mbsurfer let's split keymap with new RGB key codes for modes * Clean up mbsurfer keymap matrix layout
This commit is contained in:
parent
03de0c8575
commit
01bf8e1643
1 changed files with 57 additions and 30 deletions
|
@ -136,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,------------------------------------------ ------------------------------------------.
|
* ,------------------------------------------ ------------------------------------------.
|
||||||
* | | Reset| | | | | | | | | | | Del |
|
* | Reset| | Plain|Breath|Rainbw| Swirl| | Snake|Knight| Xmas |Grdent| | Del |
|
||||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||||
* | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
|
* | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||||
|
@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `------------------------------------------ ------------------------------------------'
|
* `------------------------------------------ ------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = KEYMAP( \
|
[_ADJUST] = KEYMAP( \
|
||||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
RESET, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, KC_DEL, \
|
||||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, \
|
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_S_ESC, C_A_DEL \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_S_ESC, C_A_DEL \
|
||||||
|
@ -193,45 +193,72 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
case LOWER:
|
case LOWER:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_LOWER);
|
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
||||||
|
|
||||||
|
if (IS_LAYER_OFF(_RAISE) && IS_LAYER_OFF(_ADJUST)) {
|
||||||
// Save current RGB info
|
// Save current RGB info
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_config.mode;
|
||||||
RGB_current_hue = rgblight_config.hue;
|
RGB_current_hue = rgblight_config.hue;
|
||||||
|
|
||||||
// Set RGB to Blue
|
// Set RGB to Blue
|
||||||
rgblight_mode(1);
|
rgblight_mode(1);
|
||||||
rgblight_setrgb(0, 0, 254);
|
rgblight_setrgb(0, 0, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
|
||||||
|
if (IS_LAYER_ON(_ADJUST)){
|
||||||
|
// Set RGB to cyan
|
||||||
|
rgblight_setrgb(0, 255, 255);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
layer_off(_LOWER);
|
layer_off(_LOWER);
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
|
||||||
|
if (IS_LAYER_OFF(_RAISE) && IS_LAYER_OFF(_ADJUST)) {
|
||||||
// Reset RGB
|
// Reset RGB
|
||||||
rgblight_mode(RGB_current_mode);
|
rgblight_mode(RGB_current_mode);
|
||||||
rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val);
|
rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val);
|
||||||
|
} else if (IS_LAYER_ON(_RAISE)){
|
||||||
|
// Set RGB to Red
|
||||||
|
rgblight_setrgb(0, 255, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case RAISE:
|
case RAISE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_RAISE);
|
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
||||||
|
|
||||||
|
if (IS_LAYER_OFF(_LOWER) && IS_LAYER_OFF(_ADJUST)) {
|
||||||
// Save current RGB info
|
// Save current RGB info
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_config.mode;
|
||||||
RGB_current_hue = rgblight_config.hue;
|
RGB_current_hue = rgblight_config.hue;
|
||||||
|
|
||||||
// Set RGB to Green
|
// Set RGB to Green
|
||||||
rgblight_mode(1);
|
rgblight_mode(1);
|
||||||
rgblight_setrgb(0, 254, 0);
|
rgblight_setrgb(0, 255, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
|
||||||
|
if (IS_LAYER_ON(_ADJUST)){
|
||||||
|
// Set RGB to cyan
|
||||||
|
rgblight_setrgb(0, 255, 255);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
layer_off(_RAISE);
|
layer_off(_RAISE);
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
|
||||||
|
if (IS_LAYER_OFF(_LOWER) && IS_LAYER_OFF(_ADJUST)) {
|
||||||
// Reset RGB
|
// Reset RGB
|
||||||
rgblight_mode(RGB_current_mode);
|
rgblight_mode(RGB_current_mode);
|
||||||
rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val);
|
rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val);
|
||||||
|
} else if (IS_LAYER_ON(_LOWER)){
|
||||||
|
// Set RGB to Blue
|
||||||
|
rgblight_setrgb(0, 0, 255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue