aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-06-01 04:56:53 +0000
committerQMK Bot <hello@qmk.fm>2021-06-01 04:56:53 +0000
commitd64a853b552885ed8d154793fc2506f727a670a7 (patch)
tree53a8fdf69cf462c8bbdef973a58e5471fc84633c
parent554c36a0555998c57b78a5e66074b8292b0e9577 (diff)
parent5a06813b105277998b80771f094059047916f4e4 (diff)
downloadqmk_firmware-d64a853b552885ed8d154793fc2506f727a670a7.tar.gz
qmk_firmware-d64a853b552885ed8d154793fc2506f727a670a7.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/capsunlocked/cu80/v2_ansi/rgb/rules.mk2
-rw-r--r--keyboards/capsunlocked/cu80/v2_iso/rgb/rules.mk2
-rw-r--r--keyboards/mt64rgb/keymaps/via/keymap.c31
-rw-r--r--keyboards/nopunin10did/jabberwocky/keymaps/via/keymap.c42
-rw-r--r--keyboards/rubi/keymaps/default/keymap.c31
-rw-r--r--keyboards/rubi/keymaps/via/keymap.c31
-rw-r--r--keyboards/rubi/rubi.c35
7 files changed, 106 insertions, 68 deletions
diff --git a/keyboards/capsunlocked/cu80/v2_ansi/rgb/rules.mk b/keyboards/capsunlocked/cu80/v2_ansi/rgb/rules.mk
index ed84f1d8c..d213c84de 100644
--- a/keyboards/capsunlocked/cu80/v2_ansi/rgb/rules.mk
+++ b/keyboards/capsunlocked/cu80/v2_ansi/rgb/rules.mk
@@ -1,2 +1,4 @@
1RGB_MATRIX_ENABLE = yes # Enable RGB matrix 1RGB_MATRIX_ENABLE = yes # Enable RGB matrix
2RGB_MATRIX_DRIVER = WS2812 # Set Driver to WS2812 2RGB_MATRIX_DRIVER = WS2812 # Set Driver to WS2812
3
4LTO_ENABLE = yes
diff --git a/keyboards/capsunlocked/cu80/v2_iso/rgb/rules.mk b/keyboards/capsunlocked/cu80/v2_iso/rgb/rules.mk
index ed84f1d8c..d213c84de 100644
--- a/keyboards/capsunlocked/cu80/v2_iso/rgb/rules.mk
+++ b/keyboards/capsunlocked/cu80/v2_iso/rgb/rules.mk
@@ -1,2 +1,4 @@
1RGB_MATRIX_ENABLE = yes # Enable RGB matrix 1RGB_MATRIX_ENABLE = yes # Enable RGB matrix
2RGB_MATRIX_DRIVER = WS2812 # Set Driver to WS2812 2RGB_MATRIX_DRIVER = WS2812 # Set Driver to WS2812
3
4LTO_ENABLE = yes
diff --git a/keyboards/mt64rgb/keymaps/via/keymap.c b/keyboards/mt64rgb/keymaps/via/keymap.c
index a182e1a6a..7a9a2c144 100644
--- a/keyboards/mt64rgb/keymaps/via/keymap.c
+++ b/keyboards/mt64rgb/keymaps/via/keymap.c
@@ -1,18 +1,18 @@
1 /* Copyright 2020 MT<704340378@qq.com> 1 /* Copyright 2020 MT<704340378@qq.com>
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or 5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version. 6 * (at your option) any later version.
7 * 7 *
8 * This program is distributed in the hope that it will be useful, 8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 * 12 *
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18 18
@@ -44,8 +44,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), 45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
46}; 46};
47
47void rgb_matrix_indicators_user(void) { 48void rgb_matrix_indicators_user(void) {
48 if (!g_suspend_state && layer_state_is(1)) { 49 if (layer_state_is(1)) {
49 rgb_matrix_set_color(77,0xFF, 0x80, 0x00); 50 rgb_matrix_set_color(77,0xFF, 0x80, 0x00);
50 } 51 }
51 if (host_keyboard_led_state().caps_lock) { 52 if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/nopunin10did/jabberwocky/keymaps/via/keymap.c b/keyboards/nopunin10did/jabberwocky/keymaps/via/keymap.c
index 375fc939b..cce550590 100644
--- a/keyboards/nopunin10did/jabberwocky/keymaps/via/keymap.c
+++ b/keyboards/nopunin10did/jabberwocky/keymaps/via/keymap.c
@@ -18,29 +18,29 @@
18 18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 20
21[0] = LAYOUT_RH_ANY( 21[0] = LAYOUT_rh_any(
22 22
23KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 , KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_INS ,KC_DEL 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KC_V ,KC_B ,MO(1), MO(1), KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_INT1,KC_RSFT,KC_UP , KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT, 27KC_LSFT,KC_NUBS,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,MO(1), MO(1), KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_INT1,KC_RSFT,KC_UP , KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT,
28 KC_LCTL,KC_LGUI, KC_LALT,KC_MENU,KC_SPC , KC_SPC , KC_ALGR, KC_RGUI,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT, KC_P0 ,KC_P0 ,KC_PDOT,KC_PENT), 28 KC_LCTL,KC_LGUI, KC_LALT,KC_MENU,KC_SPC , KC_SPC , KC_ALGR, KC_RGUI,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT, KC_P0 ,KC_P0 ,KC_PDOT,KC_PENT),
29 29
30 30
31[1] = LAYOUT_RH_ANY( 31[1] = LAYOUT_rh_any(
32RESET ,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, 32RESET ,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
33 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 33 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
34 _______,_______,_______,_______,RESET ,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 34 _______,_______,_______,_______,RESET ,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
35 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 35 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
36_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 36_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
37 _______,_______, _______,_______,_______, _______, _______, _______,_______,_______,_______,_______, _______,_______,_______,_______), 37 _______,_______, _______,_______,_______, _______, _______, _______,_______,_______,_______,_______, _______,_______,_______,_______),
38 38
39[2] = LAYOUT_RH_ANY( 39[2] = LAYOUT_rh_any(
40_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, 40_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
41 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 41 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
42 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 42 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
43 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 43 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
44_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______, 44_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,
45 _______,_______, _______,_______,_______, _______, _______, _______,_______,_______,_______,_______, _______,_______,_______,_______), 45 _______,_______, _______,_______,_______, _______, _______, _______,_______,_______,_______,_______, _______,_______,_______,_______),
46}; 46};
diff --git a/keyboards/rubi/keymaps/default/keymap.c b/keyboards/rubi/keymaps/default/keymap.c
index 054e3ce23..e0e7290df 100644
--- a/keyboards/rubi/keymaps/default/keymap.c
+++ b/keyboards/rubi/keymaps/default/keymap.c
@@ -56,3 +56,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
56 KC_TRNS, KC_TRNS 56 KC_TRNS, KC_TRNS
57 ), 57 ),
58}; 58};
59
60bool encoder_update_user(uint8_t index, bool clockwise) {
61 if (index == 0) {
62 if (get_highest_layer(layer_state) == 0) {
63 uint16_t mapped_code = 0;
64 if (clockwise) {
65 mapped_code = handle_encoder_cw();
66 } else {
67 mapped_code = handle_encoder_ccw();
68 }
69 if (mapped_code != 0) {
70 tap_code16(mapped_code);
71 }
72 } else {
73 if (clockwise) {
74 if (oled_mode == OLED_MODE_CALC) {
75 handle_encoder_cw();
76 } else if (oled_mode == OLED_MODE_DEFAULT) {
77 change_encoder_mode(false);
78 }
79 } else {
80 if (oled_mode == OLED_MODE_CALC) {
81 handle_encoder_ccw();
82 } else if (oled_mode == OLED_MODE_DEFAULT) {
83 change_encoder_mode(true);
84 }
85 }
86 }
87 }
88 return true;
89}
diff --git a/keyboards/rubi/keymaps/via/keymap.c b/keyboards/rubi/keymaps/via/keymap.c
index 3003db888..1e8cb70c7 100644
--- a/keyboards/rubi/keymaps/via/keymap.c
+++ b/keyboards/rubi/keymaps/via/keymap.c
@@ -51,3 +51,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
51 KC_TRNS, KC_TRNS 51 KC_TRNS, KC_TRNS
52 ), 52 ),
53}; 53};
54
55bool encoder_update_user(uint8_t index, bool clockwise) {
56 if (index == 0) {
57 if (get_highest_layer(layer_state) == 0) {
58 uint16_t mapped_code = 0;
59 if (clockwise) {
60 mapped_code = handle_encoder_cw();
61 } else {
62 mapped_code = handle_encoder_ccw();
63 }
64 if (mapped_code != 0) {
65 tap_code16(mapped_code);
66 }
67 } else {
68 if (clockwise) {
69 if (oled_mode == OLED_MODE_CALC) {
70 handle_encoder_cw();
71 } else if (oled_mode == OLED_MODE_DEFAULT) {
72 change_encoder_mode(false);
73 }
74 } else {
75 if (oled_mode == OLED_MODE_CALC) {
76 handle_encoder_ccw();
77 } else if (oled_mode == OLED_MODE_DEFAULT) {
78 change_encoder_mode(true);
79 }
80 }
81 }
82 }
83 return true;
84}
diff --git a/keyboards/rubi/rubi.c b/keyboards/rubi/rubi.c
index 6cdf8302c..50e5fcf78 100644
--- a/keyboards/rubi/rubi.c
+++ b/keyboards/rubi/rubi.c
@@ -73,36 +73,7 @@ bool led_update_kb(led_t led_state) {
73 return true; 73 return true;
74} 74}
75 75
76__attribute__ ((weak)) void encoder_update_user(uint8_t index, bool clockwise) { 76bool encoder_update_kb(uint8_t index, bool clockwise) {
77 if (index == 0) { 77 if (!encoder_update_user(index, clockwise)) { return false; }
78 if (get_highest_layer(layer_state) == 0) { 78 return true;
79 uint16_t mapped_code = 0;
80 if (clockwise) {
81 mapped_code = handle_encoder_cw();
82 } else {
83 mapped_code = handle_encoder_ccw();
84 }
85 if (mapped_code != 0) {
86 tap_code16(mapped_code);
87 }
88 } else {
89 if (clockwise) {
90 if (oled_mode == OLED_MODE_CALC) {
91 handle_encoder_cw();
92 } else if (oled_mode == OLED_MODE_DEFAULT) {
93 change_encoder_mode(false);
94 }
95 } else {
96 if (oled_mode == OLED_MODE_CALC) {
97 handle_encoder_ccw();
98 } else if (oled_mode == OLED_MODE_DEFAULT) {
99 change_encoder_mode(true);
100 }
101 }
102 }
103 }
104}
105
106void encoder_update_kb(uint8_t index, bool clockwise) {
107 encoder_update_user(index, clockwise);
108} 79}