aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-07-03 08:07:02 +0000
committerQMK Bot <hello@qmk.fm>2021-07-03 08:07:02 +0000
commit8465d28d0fcf08139a13b54f2a1323874cf5a954 (patch)
treea2f1e8f46688b1fb2170797630c945960db302db
parentb45b9ed536151ded3ec8fd90d1d961632b8a2e73 (diff)
parentfdf71f1aa7c4720b469d0e11ec8169796cdf3930 (diff)
downloadqmk_firmware-8465d28d0fcf08139a13b54f2a1323874cf5a954.tar.gz
qmk_firmware-8465d28d0fcf08139a13b54f2a1323874cf5a954.zip
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--docs/feature_rgb_matrix.md33
-rw-r--r--layouts/community/65_ansi_blocker/stanrc85/keymap.c51
2 files changed, 84 insertions, 0 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 4bd8e1eb9..675b7a1be 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -694,6 +694,39 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
694} 694}
695``` 695```
696 696
697### Indicator Examples :id=indicator-examples
698
699Caps Lock indicator on alphanumeric flagged keys:
700```c
701void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
702 if (host_keyboard_led_state().caps_lock) {
703 for (uint8_t i = led_min; i <= led_max; i++) {
704 if (g_led_config.flags[i] & LED_FLAG_KEYLIGHT) {
705 rgb_matrix_set_color(i, RGB_RED);
706 }
707 }
708 }
709}
710```
711
712Layer indicator on all flagged keys:
713```c
714void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
715 for (uint8_t i = led_min; i <= led_max; i++) {
716 switch(get_highest_layer(layer_state|default_layer_state)) {
717 case RAISE:
718 rgb_matrix_set_color(i, RGB_BLUE);
719 break;
720 case LOWER:
721 rgb_matrix_set_color(i, RGB_YELLOW);
722 break;
723 default:
724 break;
725 }
726 }
727}
728```
729
697### Suspended state :id=suspended-state 730### Suspended state :id=suspended-state
698To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file. 731To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
699 732
diff --git a/layouts/community/65_ansi_blocker/stanrc85/keymap.c b/layouts/community/65_ansi_blocker/stanrc85/keymap.c
new file mode 100644
index 000000000..46fa4025d
--- /dev/null
+++ b/layouts/community/65_ansi_blocker/stanrc85/keymap.c
@@ -0,0 +1,51 @@
1/* Copyright 2021 Stanrc85
2 *
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
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
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/>.
15 */
16#include QMK_KEYBOARD_H
17#include "stanrc85.h"
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [_QWERTY] = LAYOUT_65_ansi_blocker(
21 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
22 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
23 KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
24 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
25 KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, TD_TWIN, MO(_FN2_60), KC_LEFT, KC_DOWN, KC_RGHT
26 ),
27
28 [_DEFAULT] = LAYOUT_65_ansi_blocker(
29 KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
30 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
31 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
32 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
33 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1_60), MO(_FN2_60), KC_LEFT, KC_DOWN, KC_RGHT
34 ),
35
36 [_FN1_60] = LAYOUT_65_ansi_blocker(
37 KC_TILD, 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_DEL, _______,
38 _______, _______, CA_QUOT, _______, CA_SCLN, KC_VOLU, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, _______, _______, KC_INS, _______,
39 KC_CAPS, _______, _______, KC_LCTL, KC_LSFT, KC_VOLD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______,
40 _______, KC_RDP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
41 _______, _______, _______, _______, _______, _______, _______, _______, _______
42 ),
43
44 [_FN2_60] = LAYOUT_65_ansi_blocker(
45 RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_SAD, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, BL_TOGG,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, BL_INC,
47 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, BL_DEC,
48 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
49 _______, _______, _______, _______, TG(_DEFAULT), _______, _______, _______, _______
50 )
51};