aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dmqdesign/spin/keymaps
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dmqdesign/spin/keymaps')
-rw-r--r--keyboards/dmqdesign/spin/keymaps/via/keymap.c68
-rw-r--r--keyboards/dmqdesign/spin/keymaps/via/rules.mk1
2 files changed, 69 insertions, 0 deletions
diff --git a/keyboards/dmqdesign/spin/keymaps/via/keymap.c b/keyboards/dmqdesign/spin/keymaps/via/keymap.c
new file mode 100644
index 000000000..c3b5ef260
--- /dev/null
+++ b/keyboards/dmqdesign/spin/keymaps/via/keymap.c
@@ -0,0 +1,68 @@
1/* Copyright 2020-2021 adamkraus6
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT(
20 KC_7, KC_8, KC_9, TO(0),
21 KC_4, KC_5, KC_6, TO(1),
22 KC_1, KC_2, KC_3, TO(2),
23 KC_0, KC_BSPC, KC_ENTER
24 ),
25
26 [1] = LAYOUT(
27 KC_NO, KC_NO, KC_NO, KC_TRNS,
28 KC_NO, KC_NO, KC_NO, KC_TRNS,
29 KC_NO, KC_NO, KC_NO, KC_TRNS,
30 KC_NO, KC_NO, KC_NO
31 ),
32
33 [2] = LAYOUT(
34 KC_NO, KC_NO, KC_NO, KC_TRNS,
35 KC_NO, KC_NO, KC_NO, KC_TRNS,
36 KC_NO, KC_NO, KC_NO, KC_TRNS,
37 KC_NO, KC_NO, KC_NO
38 ),
39
40 [3] = LAYOUT(
41 KC_NO, KC_NO, KC_NO, KC_TRNS,
42 KC_NO, KC_NO, KC_NO, KC_TRNS,
43 KC_NO, KC_NO, KC_NO, KC_TRNS,
44 KC_NO, KC_NO, KC_NO
45 )
46};
47
48void encoder_update_user(uint8_t index, bool clockwise) {
49 if (index == 0) { /* First encoder */
50 if (clockwise) {
51 rgblight_increase_hue(); //Cycle through the RGB hue
52 } else {
53 rgblight_decrease_hue();
54 }
55 } else if (index == 1) { /* Second encoder */
56 if (clockwise) {
57 rgblight_increase_sat();
58 } else {
59 rgblight_decrease_sat();
60 }
61 } else if (index == 2) { /* Third encoder */
62 if (clockwise) {
63 rgblight_increase_val(); //Change brightness on the RGB LEDs
64 } else {
65 rgblight_decrease_val();
66 }
67 }
68} \ No newline at end of file
diff --git a/keyboards/dmqdesign/spin/keymaps/via/rules.mk b/keyboards/dmqdesign/spin/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/dmqdesign/spin/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes