aboutsummaryrefslogtreecommitdiff
path: root/keyboards/minimacro5
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/minimacro5')
-rw-r--r--keyboards/minimacro5/keymaps/default/keymap.c3
-rw-r--r--keyboards/minimacro5/keymaps/devdev/keymap.c40
-rw-r--r--keyboards/minimacro5/keymaps/kabraxcis/keymap.c3
-rw-r--r--keyboards/minimacro5/keymaps/media/keymap.c3
-rw-r--r--keyboards/minimacro5/keymaps/voaraq/keymap.c3
5 files changed, 27 insertions, 25 deletions
diff --git a/keyboards/minimacro5/keymaps/default/keymap.c b/keyboards/minimacro5/keymaps/default/keymap.c
index acd7f3283..d2f2910d7 100644
--- a/keyboards/minimacro5/keymaps/default/keymap.c
+++ b/keyboards/minimacro5/keymaps/default/keymap.c
@@ -4,7 +4,7 @@ enum layers {
4 _MAIN, 4 _MAIN,
5}; 5};
6 6
7void encoder_update_user(uint8_t index, bool clockwise) { 7bool encoder_update_user(uint8_t index, bool clockwise) {
8 if (index == 0) { /* First encoder*/ 8 if (index == 0) { /* First encoder*/
9 if (clockwise) { 9 if (clockwise) {
10 tap_code(KC_1); 10 tap_code(KC_1);
@@ -36,6 +36,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
36 tap_code(KC_0); 36 tap_code(KC_0);
37 } 37 }
38 } 38 }
39 return true;
39} 40}
40 41
41// 42//
diff --git a/keyboards/minimacro5/keymaps/devdev/keymap.c b/keyboards/minimacro5/keymaps/devdev/keymap.c
index dc5a9b0de..d7f998fa3 100644
--- a/keyboards/minimacro5/keymaps/devdev/keymap.c
+++ b/keyboards/minimacro5/keymaps/devdev/keymap.c
@@ -1,18 +1,18 @@
1/* Copyright 2020 Dane Evans 1/* Copyright 2020 Dane Evans
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// MINI MACRO 5 16// MINI MACRO 5
17 17
18#include QMK_KEYBOARD_H 18#include QMK_KEYBOARD_H
@@ -31,11 +31,11 @@ enum tap_dances{
31 TD_TO_MEDIA, 31 TD_TO_MEDIA,
32 TD_TO_MAIN, 32 TD_TO_MAIN,
33 TD_RESET_SLIDER 33 TD_RESET_SLIDER
34 34
35}; 35};
36 36
37 37
38void encoder_update_user(uint8_t index, bool clockwise) { 38bool encoder_update_user(uint8_t index, bool clockwise) {
39 if (index == 0) { /* First encoder*/ 39 if (index == 0) { /* First encoder*/
40 switch(biton32(layer_state)){ 40 switch(biton32(layer_state)){
41 case _MAIN: 41 case _MAIN:
@@ -75,6 +75,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
75 break; 75 break;
76 } 76 }
77 } 77 }
78 return true;
78} 79}
79 80
80// 81//
@@ -95,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest
95}; 96};
96 97
97layer_state_t layer_state_set_user(layer_state_t state) { 98layer_state_t layer_state_set_user(layer_state_t state) {
98 99
99 if (layer_state_cmp(state, _MAIN)) // this one not working 100 if (layer_state_cmp(state, _MAIN)) // this one not working
100 rgblight_sethsv_at(HSV_GREEN, 0); 101 rgblight_sethsv_at(HSV_GREEN, 0);
101 if (layer_state_cmp(state, _MEDIA)) 102 if (layer_state_cmp(state, _MEDIA))
102 rgblight_sethsv_at(HSV_RED, 0); 103 rgblight_sethsv_at(HSV_RED, 0);
@@ -121,6 +122,3 @@ qk_tap_dance_action_t tap_dance_actions[] = {
121 [TD_TO_MAIN] = ACTION_TAP_DANCE_LAYER_MOVE(KC_MUTE, _MAIN), 122 [TD_TO_MAIN] = ACTION_TAP_DANCE_LAYER_MOVE(KC_MUTE, _MAIN),
122 [TD_RESET_SLIDER] = ACTION_TAP_DANCE_LAYER_MOVE(KC_0, _MAIN) 123 [TD_RESET_SLIDER] = ACTION_TAP_DANCE_LAYER_MOVE(KC_0, _MAIN)
123}; 124};
124
125
126
diff --git a/keyboards/minimacro5/keymaps/kabraxcis/keymap.c b/keyboards/minimacro5/keymaps/kabraxcis/keymap.c
index a65bc9ff4..6b7026ce2 100644
--- a/keyboards/minimacro5/keymaps/kabraxcis/keymap.c
+++ b/keyboards/minimacro5/keymaps/kabraxcis/keymap.c
@@ -20,7 +20,7 @@ enum layers {
20 _MAIN, 20 _MAIN,
21}; 21};
22 22
23void encoder_update_user(uint8_t index, bool clockwise) { 23bool encoder_update_user(uint8_t index, bool clockwise) {
24 if (index == 0) { /* First encoder*/ 24 if (index == 0) { /* First encoder*/
25 if (clockwise) { 25 if (clockwise) {
26 tap_code(KC_VOLU); 26 tap_code(KC_VOLU);
@@ -52,6 +52,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
52 tap_code(KC_VOLD); 52 tap_code(KC_VOLD);
53 } 53 }
54 } 54 }
55 return true;
55} 56}
56 57
57// 58//
diff --git a/keyboards/minimacro5/keymaps/media/keymap.c b/keyboards/minimacro5/keymaps/media/keymap.c
index f36954b07..9f2183887 100644
--- a/keyboards/minimacro5/keymaps/media/keymap.c
+++ b/keyboards/minimacro5/keymaps/media/keymap.c
@@ -2,7 +2,7 @@
2 2
3#define _MAIN 0 3#define _MAIN 0
4 4
5void encoder_update_user(uint8_t index, bool clockwise) { 5bool encoder_update_user(uint8_t index, bool clockwise) {
6 if (index == 0) { /* First encoder*/ 6 if (index == 0) { /* First encoder*/
7 if (clockwise) { 7 if (clockwise) {
8 tap_code(KC_VOLU); 8 tap_code(KC_VOLU);
@@ -34,6 +34,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
34 tap_code(KC_0); 34 tap_code(KC_0);
35 } 35 }
36 } 36 }
37 return true;
37} 38}
38 39
39const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first 40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first
diff --git a/keyboards/minimacro5/keymaps/voaraq/keymap.c b/keyboards/minimacro5/keymaps/voaraq/keymap.c
index e0dca9777..9af37167d 100644
--- a/keyboards/minimacro5/keymaps/voaraq/keymap.c
+++ b/keyboards/minimacro5/keymaps/voaraq/keymap.c
@@ -20,7 +20,7 @@ enum layers {
20 _MAIN, 20 _MAIN,
21}; 21};
22 22
23void encoder_update_user(uint8_t index, bool clockwise) { 23bool encoder_update_user(uint8_t index, bool clockwise) {
24 if (index == 0) { /* First encoder*/ 24 if (index == 0) { /* First encoder*/
25 if (clockwise) { 25 if (clockwise) {
26 tap_code(KC_1); 26 tap_code(KC_1);
@@ -52,6 +52,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
52 tap_code(KC_VOLD); 52 tap_code(KC_VOLD);
53 } 53 }
54 } 54 }
55 return true;
55} 56}
56 57
57// 58//