diff options
Diffstat (limited to 'keyboards/minimacro5/keymaps/devdev')
| -rw-r--r-- | keyboards/minimacro5/keymaps/devdev/keymap.c | 40 |
1 files changed, 19 insertions, 21 deletions
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 | ||
| 38 | void encoder_update_user(uint8_t index, bool clockwise) { | 38 | bool 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 | ||
| 97 | layer_state_t layer_state_set_user(layer_state_t state) { | 98 | layer_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 | |||
