mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-24 18:25:01 +06:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
77e3f8704a
@ -16,17 +16,17 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
enum layers {
|
enum layers {
|
||||||
_ALPHA,
|
_ALPHA,
|
||||||
_LEFTFN,
|
_LEFTFN,
|
||||||
_RIGHTFN,
|
_RIGHTFN,
|
||||||
_NUMPAD,
|
_NUMPAD,
|
||||||
_LEAGUE,
|
_LEAGUE,
|
||||||
_PUBG,
|
_PUBG,
|
||||||
_OVERWATCH,
|
_OVERWATCH,
|
||||||
_STARCRAFT,
|
_STARCRAFT,
|
||||||
_TETRIS,
|
_TETRIS,
|
||||||
_CLEAN,
|
_CLEAN,
|
||||||
_RGB
|
_RGB
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ALPHA TO(_ALPHA)
|
#define ALPHA TO(_ALPHA)
|
||||||
@ -67,9 +67,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Left | Down | Up |Right |CTRL+/|HANJA | [ | ] | ) | : | " |
|
* | 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(
|
[_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
|
RGB, KC_LBRC, KC_RBRC, KC_LALT, KC_TRNS, KC_SPC, KC_UNDS, KC_PLUS, KC_INS, KC_PIPE, KC_PENT
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
/* RIGHTFN
|
/* 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 | | | | |
|
* | | | | Alt | | Space | Trns | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_RIGHTFN] = LAYOUT_planck_mit(
|
[_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_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_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
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_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
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
|
KC_NO, KC_NO, KC_NO, KC_LALT, KC_NO, KC_SPC, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
),
|
),
|
||||||
|
|
||||||
/* NUMPAD
|
/* NUMPAD
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | * | 7 | 8 | 9 | NumLk| | | | | | | Bksp |
|
* | * | 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(
|
[_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_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_NO, KC_NO,
|
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_LCTL, KC_LSFT, KC_ENT,
|
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
|
KC_TRNS, KC_COMM, KC_PPLS, KC_PDOT, KC_0, KC_SPC, LEAGUE, PUBG, OVERWATCH, STARCRAFT, TETRIS
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
/* LEAGUE
|
/* LEAGUE
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | Tab | Q | W | E | R | 5 | Y | | | O | P | ESC |
|
* | Tab | Q | W | E | R | 5 | Y | | | O | P | ESC |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | A | S | D | F | | | | | L | | |
|
* | 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|
|
* | 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 |
|
* | 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|
|
* | Ctrl | 5 | 4 | Alt | 2 | Space | 6 | 8 | 7 | 9 | ALPHA|
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_PUBG] = LAYOUT_planck_mit(
|
[_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_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_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_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
|
KC_LCTL, KC_5, KC_4, KC_LALT, KC_2, KC_SPC, KC_6, KC_8, KC_7, KC_9, ALPHA
|
||||||
),
|
),
|
||||||
|
|
||||||
/* OVERWATCH
|
/* OVERWATCH
|
||||||
@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | 1 | A | S | D | F | G | H | J | K | L | ; | " |
|
* | 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|
|
* | 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 | ; | ' |
|
* | 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|
|
* | 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_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_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
|
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}
|
{36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void rgb_matrix_indicators_user(void) {
|
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)) {
|
switch (get_highest_layer(layer_state)) {
|
||||||
case _ALPHA:
|
case _ALPHA:
|
||||||
break;
|
break;
|
||||||
@ -268,65 +274,54 @@ void rgb_matrix_indicators_user(void) {
|
|||||||
case _NUMPAD:
|
case _NUMPAD:
|
||||||
break;
|
break;
|
||||||
case _LEAGUE:
|
case _LEAGUE:
|
||||||
rgb_matrix_set_color(1, 15, 15, 15);
|
rgb_matrix_set_color(15, yellow[0], yellow[1], yellow[2]);
|
||||||
rgb_matrix_set_color(2, 15, 15, 15);
|
rgb_matrix_set_color(16, red[0], red[1], red[2]);
|
||||||
rgb_matrix_set_color(3, 15, 15, 15);
|
rgb_matrix_set_color(29, blue[0], blue[1], blue[2]);
|
||||||
rgb_matrix_set_color(4, 15, 15, 15);
|
rgb_matrix_set_color(42, green[0], green[1], green[2]);
|
||||||
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);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _PUBG:
|
case _PUBG:
|
||||||
rgb_matrix_set_color(12, 15, 15, 15);
|
rgb_matrix_set_color(43, green[0], green[1], green[2]);
|
||||||
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);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _OVERWATCH:
|
case _OVERWATCH:
|
||||||
rgb_matrix_set_color(11, 80, 20, 0);
|
rgb_matrix_set_color(44, green[0], green[1], green[2]);
|
||||||
rgb_matrix_set_color(46, 80, 20, 0);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _STARCRAFT:
|
case _STARCRAFT:
|
||||||
rgb_matrix_set_color(11, 5, 80, 15);
|
rgb_matrix_set_color(45, green[0], green[1], green[2]);
|
||||||
rgb_matrix_set_color(46, 5, 80, 15);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _TETRIS:
|
case _TETRIS:
|
||||||
rgb_matrix_set_color(2, 60, 10, 20);
|
rgb_matrix_set_color(46, green[0], green[1], green[2]);
|
||||||
rgb_matrix_set_color(13, 60, 10, 20);
|
|
||||||
rgb_matrix_set_color(14, 60, 10, 20);
|
|
||||||
rgb_matrix_set_color(15, 60, 10, 20);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _CLEAN:
|
case _CLEAN:
|
||||||
rgb_matrix_set_color_all(255, 255, 255);
|
rgb_matrix_set_color_all(white[0], white[1], white[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case _RGB:
|
case _RGB:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
led_t led_state = host_keyboard_led_state();
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
|
||||||
//Capslock led
|
//Capslock led
|
||||||
if (led_state.caps_lock) {
|
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
|
//Numlock led
|
||||||
if (!led_state.num_lock) {
|
if (led_state.num_lock) {
|
||||||
rgb_matrix_set_color(0, 145, 145, 145);
|
} else {
|
||||||
|
rgb_matrix_set_color(11, green[0], green[1], green[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Scroll lock led
|
//Scroll lock led
|
||||||
if (led_state.scroll_lock) {
|
if (led_state.scroll_lock) {
|
||||||
rgb_matrix_set_color(24, 145, 145, 145);
|
rgb_matrix_set_color(23, green[0], green[1], green[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user