aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/tkc/osav2/keymaps/stanrc85/keymap.c58
-rw-r--r--users/stanrc85/config.h1
-rw-r--r--users/stanrc85/rgblight_layers_osa.c50
-rw-r--r--users/stanrc85/rules.mk6
4 files changed, 114 insertions, 1 deletions
diff --git a/keyboards/tkc/osav2/keymaps/stanrc85/keymap.c b/keyboards/tkc/osav2/keymaps/stanrc85/keymap.c
new file mode 100644
index 000000000..0dfd0d54a
--- /dev/null
+++ b/keyboards/tkc/osav2/keymaps/stanrc85/keymap.c
@@ -0,0 +1,58 @@
1/* Copyright 2019 jrfhoutx
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
17#include QMK_KEYBOARD_H
18#include "stanrc85.h"
19
20
21// Each layer gets a name for readability, which is then used in the keymap matrix below.
22// The underscores don't mean anything - you can have a layer called STUFF or any other name.
23// Layer names don't all need to be of the same length, obviously, and you can also skip them
24// entirely and just use numbers.
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27 [_QWERTY] = LAYOUT_all(
28 KC_ESC, 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,
29 KC_PGUP, 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,
30 KC_PGDN, 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,
31 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2_60),
32 KC_LCTL, KC_LALT, LT_BPCF, KC_LGUI, LT_SPCF, TD_TWIN, TD_TCTL
33 ),
34
35 [_DEFAULT] = LAYOUT_all(
36 KC_ESC, 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,
37 KC_PGUP, 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,
38 KC_PGDN, 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,
39 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN2_60),
40 KC_LCTL, KC_LALT, KC_SPC, MO(_FN1_60), KC_SPC, KC_RALT, KC_RCTL
41 ),
42
43 [_FN1_60] = LAYOUT_all(
44 _______, 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,
45 _______, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS,
46 _______, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
47 _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______,
48 _______, _______, _______, _______, _______, _______, _______
49 ),
50
51 [_FN2_60] = LAYOUT_all(
52 BL_TOGG, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______,
53 BL_INC, VLK_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
54 BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE,
55 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
56 _______, _______, _______, _______, _______, _______, TG(_DEFAULT)
57 )
58}; \ No newline at end of file
diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h
index fba488e1c..71b915e48 100644
--- a/users/stanrc85/config.h
+++ b/users/stanrc85/config.h
@@ -5,6 +5,5 @@
5 5
6#ifdef RGBLIGHT_ENABLE 6#ifdef RGBLIGHT_ENABLE
7 #define RGBLIGHT_LAYERS 7 #define RGBLIGHT_LAYERS
8 #define RGBLIGHT_LIMIT_VAL 175
9 #define RGBLIGHT_SLEEP 8 #define RGBLIGHT_SLEEP
10#endif 9#endif
diff --git a/users/stanrc85/rgblight_layers_osa.c b/users/stanrc85/rgblight_layers_osa.c
new file mode 100644
index 000000000..8bd7137e4
--- /dev/null
+++ b/users/stanrc85/rgblight_layers_osa.c
@@ -0,0 +1,50 @@
1#include "stanrc85.h"
2
3const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
4 {2, 2, HSV_RED},
5 {6, 2, HSV_RED}
6);
7
8const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
9 {2, 2, HSV_GREEN},
10 {6, 2, HSV_GREEN}
11);
12
13const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
14 {2, 2, HSV_BLUE},
15 {6, 2, HSV_BLUE}
16);
17
18const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
19 {2, 2, HSV_WHITE},
20 {6, 2, HSV_WHITE}
21);
22
23// Now define the array of layers. Later layers take precedence
24const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
25 my_capslock_layer,
26 my_layer1_layer,
27 my_layer2_layer,
28 my_layer3_layer
29);
30
31void keyboard_post_init_user(void) {
32 // Enable the LED layers
33 rgblight_layers = my_rgb_layers;
34}
35
36layer_state_t layer_state_set_user(layer_state_t state) {
37 // Both layers will light up if both kb layers are active
38 rgblight_set_layer_state(1, layer_state_cmp(state, 1));
39 rgblight_set_layer_state(2, layer_state_cmp(state, 2));
40 rgblight_set_layer_state(3, layer_state_cmp(state, 3));
41 return state;
42}
43
44bool led_update_user(led_t led_state) {
45 //rgblight_set_layer_state(0, led_state.caps_lock);
46 writePin(C7, led_state.caps_lock);
47 writePin(C6, led_state.num_lock);
48 writePin(B6, led_state.scroll_lock);
49 return false;
50} \ No newline at end of file
diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk
index 5fa3737a2..5c572c0af 100644
--- a/users/stanrc85/rules.mk
+++ b/users/stanrc85/rules.mk
@@ -31,4 +31,10 @@ ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2)
31 VIA_ENABLE = yes 31 VIA_ENABLE = yes
32 LTO_ENABLE = no 32 LTO_ENABLE = no
33 VELOCIKEY_ENABLE=yes 33 VELOCIKEY_ENABLE=yes
34endif
35ifeq ($(strip $(KEYBOARD)), tkc/osav2)
36 SRC += rgblight_layers_osa.c
37 VIA_ENABLE = yes
38 LTO_ENABLE = no
39 VELOCIKEY_ENABLE=yes
34endif \ No newline at end of file 40endif \ No newline at end of file