diff options
author | syntax-magic <dan.syntaxmagic@gmail.com> | 2022-09-25 21:53:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-25 21:53:16 -0700 |
commit | 04b93bd2a9940bc194b512797a6a9a205c77e8c1 (patch) | |
tree | 21e426daf8d2f3df9835d001204d2b92ed4a4239 | |
parent | fe7ee4961c85ce646165a5e5844576fe342849b2 (diff) | |
download | qmk_firmware-04b93bd2a9940bc194b512797a6a9a205c77e8c1.tar.gz qmk_firmware-04b93bd2a9940bc194b512797a6a9a205c77e8c1.zip |
[Keymap] Switched keys around in RIGHFN layer and updated indicator lights to green (#18465)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: syntax-magic <dkim.8881@gmail.com>
-rw-r--r-- | keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c | 125 |
1 files changed, 60 insertions, 65 deletions
diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c index 5029d557dd..495e664e36 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/dan/keymap.c @@ -16,17 +16,17 @@ #include QMK_KEYBOARD_H enum layers { - _ALPHA, - _LEFTFN, - _RIGHTFN, - _NUMPAD, - _LEAGUE, - _PUBG, - _OVERWATCH, - _STARCRAFT, - _TETRIS, - _CLEAN, - _RGB + _ALPHA, + _LEFTFN, + _RIGHTFN, + _NUMPAD, + _LEAGUE, + _PUBG, + _OVERWATCH, + _STARCRAFT, + _TETRIS, + _CLEAN, + _RGB }; #define ALPHA TO(_ALPHA) @@ -67,9 +67,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | Left | Down | Up |Right |CTRL+/|HANJA | [ | ] | ) | : | " | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| PGUP | PGDN | Home | End | CAPS |PRNTSR| ( | , | . | / | Enter| + * | Shift| PGUP | PGDN | Home | End | CAPS |PRNTSR| ( | , | . | / |Return| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | RGB | [ | ] | Alt | Trns | Space | _ | + | INS | | | Ent. | + * | RGB | [ | ] | Alt | Trns | Space | _ | + | INS | | | Enter| * `-----------------------------------------------------------------------------------' */ [_LEFTFN] = LAYOUT_planck_mit( @@ -79,50 +79,50 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB, KC_LBRC, KC_RBRC, KC_LALT, KC_TRNS, KC_SPC, KC_UNDS, KC_PLUS, KC_INS, KC_PIPE, KC_PENT ), - /* RIGHTFN * ,-----------------------------------------------------------------------------------. - * | | | | | | | | Pause|SCRLCK| | F11 | F12 | + * | | | | | | | | F12 | F11 | F10 | F9 |Scllck| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | | | | | | | F1 | F2 | F3 | F4 | F5 | + * | Ctrl | | | | | | | F8 | F7 | F6 | F5 | Pause| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| | | | | | | F6 | F7 | F8 | F9 | F10 | + * | Shift| | | | | | | F4 | F3 | F2 | F1 | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | Alt | | Space | Trns | | | | | * `-----------------------------------------------------------------------------------' */ [_RIGHTFN] = LAYOUT_planck_mit( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PAUS, KC_SCRL, KC_NO, KC_F11, KC_F12, - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - KC_NO, KC_NO, KC_NO, KC_LALT, KC_NO, KC_SPC, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12, KC_F11, KC_F10, KC_F9, KC_PAUS, + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F8, KC_F7, KC_F6, KC_F5, KC_SCRL, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F4, KC_F3, KC_F2, KC_F1, KC_NO, + KC_NO, KC_NO, KC_NO, KC_LALT, KC_NO, KC_SPC, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO ), /* NUMPAD * ,-----------------------------------------------------------------------------------. * | * | 7 | 8 | 9 | NumLk| | | | | | | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Alt | 4 | 5 | 6 | Enter| | | | | | | | + * | Alt | 4 | 5 | 6 |Return| | | | | | Shift| | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | - | 1 | 2 | 3 | Bksp | | | | | Ctrl | Shift|Return| + * | - | 1 | 2 | 3 | Bksp | | | | | | Ctrl |Return| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Trns | , | + | . | 0 | Space |LEAGUE| PUBG | OVWCh| SC |TETRIS| + * | Trns | , | + | . | 0 | Space |LEAGUE| PUBG | OVWCh| SC |TETRIS| * `-----------------------------------------------------------------------------------' */ [_NUMPAD] = LAYOUT_planck_mit( - KC_PAST, KC_P7, KC_P8, KC_P9, KC_NLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, - KC_LALT, KC_P4, KC_P5, KC_P6, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_LSFT, KC_ENT, + KC_ASTR, KC_P7, KC_P8, KC_P9, KC_NLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, + KC_LALT, KC_P4, KC_P5, KC_P6, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT, KC_NO, + KC_PMNS, KC_P1, KC_P2, KC_P3, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_ENT, KC_TRNS, KC_COMM, KC_PPLS, KC_PDOT, KC_0, KC_SPC, LEAGUE, PUBG, OVERWATCH, STARCRAFT, TETRIS ), + /* LEAGUE * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | 5 | Y | | | O | P | ESC | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | A | S | D | F | | | | | L | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | 6 | 4 | 1 | B | | | | | | Enter| + * | Shift| Z | 6 | 4 | 1 | B | | | | | |Return| * |------+------+------+------+------+------+------+------+------+------+------+------| * | 3 | X | C | Alt | 2 | Space | | | | | ALPHA| * `-----------------------------------------------------------------------------------' @@ -140,16 +140,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | 1 | A | S | D | F | G | H | J | K | L | | F7 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | 3 | X | C | V | B | M | . | | | F9 | + * | Shift| Z | 3 | X | C | V | B | M | , | . | | F9 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | 5 | 4 | Alt | 2 | Space | 6 | 8 | 7 | 9 | ALPHA| * `-----------------------------------------------------------------------------------' */ [_PUBG] = LAYOUT_planck_mit( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, - KC_1, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_F7, - KC_LSFT, KC_Z, KC_3, KC_X, KC_C, KC_V, KC_B, KC_M, KC_DOT, KC_NO, KC_NO, KC_F9, - KC_LCTL, KC_5, KC_4, KC_LALT, KC_2, KC_SPC, KC_6, KC_8, KC_7, KC_9, ALPHA + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC, + KC_1, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_F7, + KC_LSFT, KC_Z, KC_3, KC_X, KC_C, KC_V, KC_B, KC_M, KC_COMM, KC_DOT, KC_NO, KC_F9, + KC_LCTL, KC_5, KC_4, KC_LALT, KC_2, KC_SPC, KC_6, KC_8, KC_7, KC_9, ALPHA ), /* OVERWATCH @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | 1 | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Return| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | | | Alt | 2 | Space | Bksp | | | | ALPHA| * `-----------------------------------------------------------------------------------' @@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Return| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Esc | | | Alt | F1 | Space | F10 | Pause|Delete| | ALPHA| * `-----------------------------------------------------------------------------------' @@ -206,10 +206,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_A, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_NO, KC_NO, KC_LALT, KC_S, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, ALPHA - ), -/* TETRIS +/* CLEAN * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -257,7 +256,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46} */ + void rgb_matrix_indicators_user(void) { + uint8_t red[3] = {50, 5, 0}; + uint8_t yellow[3] = {50, 50, 0}; + uint8_t blue[3] = {0, 15, 50}; + uint8_t green[3] = {15, 33, 1}; + uint8_t white[3] = {255, 255, 255}; + switch (get_highest_layer(layer_state)) { case _ALPHA: break; @@ -268,65 +274,54 @@ void rgb_matrix_indicators_user(void) { case _NUMPAD: break; case _LEAGUE: - rgb_matrix_set_color(1, 15, 15, 15); - rgb_matrix_set_color(2, 15, 15, 15); - rgb_matrix_set_color(3, 15, 15, 15); - rgb_matrix_set_color(4, 15, 15, 15); - rgb_matrix_set_color(15, 50, 40, 0); - rgb_matrix_set_color(16, 50, 5, 0); - rgb_matrix_set_color(29, 0, 15, 50); - rgb_matrix_set_color(10, 20, 2, 15); + rgb_matrix_set_color(15, yellow[0], yellow[1], yellow[2]); + rgb_matrix_set_color(16, red[0], red[1], red[2]); + rgb_matrix_set_color(29, blue[0], blue[1], blue[2]); + rgb_matrix_set_color(42, green[0], green[1], green[2]); + break; case _PUBG: - rgb_matrix_set_color(12, 15, 15, 15); - rgb_matrix_set_color(40, 15, 15, 15); - rgb_matrix_set_color(42, 3, 3, 50); - rgb_matrix_set_color(43, 5, 50, 8); - rgb_matrix_set_color(44, 50, 35, 0); - rgb_matrix_set_color(45, 30, 30, 15); + rgb_matrix_set_color(43, green[0], green[1], green[2]); + break; case _OVERWATCH: - rgb_matrix_set_color(11, 80, 20, 0); - rgb_matrix_set_color(46, 80, 20, 0); + rgb_matrix_set_color(44, green[0], green[1], green[2]); break; case _STARCRAFT: - rgb_matrix_set_color(11, 5, 80, 15); - rgb_matrix_set_color(46, 5, 80, 15); + rgb_matrix_set_color(45, green[0], green[1], green[2]); break; case _TETRIS: - rgb_matrix_set_color(2, 60, 10, 20); - rgb_matrix_set_color(13, 60, 10, 20); - rgb_matrix_set_color(14, 60, 10, 20); - rgb_matrix_set_color(15, 60, 10, 20); + rgb_matrix_set_color(46, green[0], green[1], green[2]); break; case _CLEAN: - rgb_matrix_set_color_all(255, 255, 255); + rgb_matrix_set_color_all(white[0], white[1], white[2]); break; case _RGB: break; } - led_t led_state = host_keyboard_led_state(); + led_t led_state = host_keyboard_led_state(); //Capslock led if (led_state.caps_lock) { - rgb_matrix_set_color(12, 145, 145, 145); + rgb_matrix_set_color(12, green[0], green[1], green[2]); } //Numlock led - if (!led_state.num_lock) { - rgb_matrix_set_color(0, 145, 145, 145); + if (led_state.num_lock) { + } else { + rgb_matrix_set_color(11, green[0], green[1], green[2]); } //Scroll lock led if (led_state.scroll_lock) { - rgb_matrix_set_color(24, 145, 145, 145); + rgb_matrix_set_color(23, green[0], green[1], green[2]); } } |