diff options
Diffstat (limited to 'keyboards/basekeys/trifecta')
-rw-r--r-- | keyboards/basekeys/trifecta/config.h | 144 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/info.json | 10 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/keymaps/default/keymap.c | 72 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/keymaps/default/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/keymaps/via/keymap.c | 72 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/keymaps/via/rules.mk | 3 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/readme.md | 17 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/rules.mk | 20 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/trifecta.c | 61 | ||||
-rw-r--r-- | keyboards/basekeys/trifecta/trifecta.h | 48 |
10 files changed, 449 insertions, 0 deletions
diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h new file mode 100644 index 000000000..ffdf6d2d2 --- /dev/null +++ b/keyboards/basekeys/trifecta/config.h | |||
@@ -0,0 +1,144 @@ | |||
1 | /* Copyright 2020 Swiftrax and Basekeys.com | ||
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 | #pragma once | ||
18 | |||
19 | #include "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0x04D8 | ||
23 | #define PRODUCT_ID 0xEAF3 | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER Swiftrax | ||
26 | #define PRODUCT Trifecta | ||
27 | |||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 10 | ||
30 | #define MATRIX_COLS 8 | ||
31 | |||
32 | /* key matrix pins */ | ||
33 | |||
34 | #define MATRIX_ROW_PINS { B0, B7, F7, B1, B6, C6, C7, B5, F6, D2 } | ||
35 | #define MATRIX_COL_PINS { F0, F1, F4, F5, D1, B2, D0, B3 } | ||
36 | |||
37 | |||
38 | #define ENCODERS_PAD_A { D4, D6, D7 } | ||
39 | #define ENCODERS_PAD_B { B4, D3, D5 } | ||
40 | |||
41 | /* COL2ROW, ROW2COL*/ | ||
42 | #define DIODE_DIRECTION COL2ROW | ||
43 | |||
44 | |||
45 | #define RGB_DI_PIN E6 | ||
46 | #define DRIVER_LED_TOTAL 80 | ||
47 | |||
48 | /* RGB LED */ | ||
49 | #ifdef RGBLIGHT_ENABLE | ||
50 | #define RGB_DI_PIN E6 | ||
51 | #define RGBLED_NUM 80 // Number of LEDs. backlight x69 | ||
52 | #define RGBLIGHT_HUE_STEP 10 | ||
53 | #define RGBLIGHT_SAT_STEP 17 | ||
54 | #define RGBLIGHT_VAL_STEP 17 | ||
55 | #define RGBLIGHT_ANIMATIONS | ||
56 | #endif | ||
57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
58 | #define DEBOUNCE 5 | ||
59 | |||
60 | /* Limits the brightness of the LEDS range of 255-0 (255 is default)*/ | ||
61 | #define RGBLIGHT_LIMIT_VAL 128 | ||
62 | |||
63 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
64 | //#define MATRIX_HAS_GHOST | ||
65 | |||
66 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
67 | #define LOCKING_SUPPORT_ENABLE | ||
68 | |||
69 | /* Locking resynchronize hack */ | ||
70 | #define LOCKING_RESYNC_ENABLE | ||
71 | |||
72 | /* EEPROM for via */ | ||
73 | #define DYNAMIC_KEYMAP_LAYER_COUNT 3 | ||
74 | |||
75 | /* bootmagic row col assignment */ | ||
76 | #define BOOTMAGIC_LITE_ROW 1 | ||
77 | #define BOOTMAGIC_LITE_COLUMN 0 | ||
78 | |||
79 | #ifdef RGB_MATRIX_ENABLE | ||
80 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses | ||
81 | // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) | ||
82 | // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
83 | //# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
84 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
85 | # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) | ||
86 | # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) | ||
87 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | ||
88 | # define RGB_MATRIX_HUE_STEP 8 | ||
89 | # define RGB_MATRIX_SAT_STEP 8 | ||
90 | # define RGB_MATRIX_VAL_STEP 8 | ||
91 | # define RGB_MATRIX_SPD_STEP 10 | ||
92 | |||
93 | /* Disable the animations you don't want/need. You will need to disable a good number of these * | ||
94 | * because they take up a lot of space. Disable until you can successfully compile your firmware. */ | ||
95 | // RGB Matrix Animation modes. Explicitly enabled | ||
96 | // For full list of effects, see: | ||
97 | // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects | ||
98 | # define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
99 | # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
100 | # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
101 | # define ENABLE_RGB_MATRIX_BREATHING | ||
102 | # define ENABLE_RGB_MATRIX_BAND_SAT | ||
103 | # define ENABLE_RGB_MATRIX_BAND_VAL | ||
104 | # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
105 | # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
106 | # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
107 | # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
108 | # define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
109 | # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
110 | # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
111 | # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
112 | # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
113 | # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
114 | # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
115 | # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
116 | # define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
117 | # define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
118 | # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
119 | # define ENABLE_RGB_MATRIX_RAINDROPS | ||
120 | # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
121 | # define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
122 | # define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
123 | # define ENABLE_RGB_MATRIX_HUE_WAVE | ||
124 | # define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
125 | # define ENABLE_RGB_MATRIX_PIXEL_FLOW | ||
126 | # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL | ||
127 | // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined | ||
128 | # define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
129 | # define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
130 | // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined | ||
131 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
132 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
133 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
134 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
135 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
136 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
137 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
138 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
139 | # define ENABLE_RGB_MATRIX_SPLASH | ||
140 | # define ENABLE_RGB_MATRIX_MULTISPLASH | ||
141 | # define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
142 | # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
143 | |||
144 | #endif | ||
diff --git a/keyboards/basekeys/trifecta/info.json b/keyboards/basekeys/trifecta/info.json new file mode 100644 index 000000000..86c45a7df --- /dev/null +++ b/keyboards/basekeys/trifecta/info.json | |||
@@ -0,0 +1,10 @@ | |||
1 | { | ||
2 | "keyboard_name": "Trifecta", | ||
3 | "url": "https://www.basekeys.com", | ||
4 | "maintainer": "Swiftrax", | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
7 | "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.75, "y":0}, {"label":"*", "x":9.75, "y":0}, {"label":"(", "x":10.75, "y":0}, {"label":")", "x":11.75, "y":0}, {"label":"_", "x":12.75, "y":0}, {"label":"+", "x":13.75, "y":0}, {"label":"BS", "x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":17, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8.25, "y":1}, {"label":"U", "x":9.25, "y":1}, {"label":"I", "x":10.25, "y":1}, {"label":"O", "x":11.25, "y":1}, {"label":"P", "x":12.25, "y":1}, {"label":"{", "x":13.25, "y":1}, {"label":"}", "x":14.25, "y":1}, {"label":"|", "x":15.25, "y":1, "w":1.5}, {"x":17, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.5, "y":2}, {"label":"J", "x":9.5, "y":2}, {"label":"K", "x":10.5, "y":2}, {"label":"L", "x":11.5, "y":2}, {"label":":", "x":12.5, "y":2}, {"label":"\"", "x":13.5, "y":2}, {"label":"Enter", "x":14.5, "y":2, "w":2.25}, {"x":17, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":"<", "x":11, "y":3}, {"label":">", "x":12, "y":3}, {"label":"?", "x":13, "y":3}, {"label":"Shift", "x":14, "y":3, "w":1.75}, {"x":16, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3, "y":4, "w":1.5}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4}, {"x":8.5, "y":4, "w":2.75}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Win", "x":13.5, "y":4, "w":1.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}] | ||
8 | } | ||
9 | } | ||
10 | } | ||
diff --git a/keyboards/basekeys/trifecta/keymaps/default/keymap.c b/keyboards/basekeys/trifecta/keymaps/default/keymap.c new file mode 100644 index 000000000..6db61e476 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/default/keymap.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* Copyright 2020 Swiftrax and Basekeys.com | ||
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 | |||
19 | // Defines names for use in layer keycodes and the keymap | ||
20 | enum layer_names { | ||
21 | _BASE, | ||
22 | _FN, | ||
23 | _MEDIA }; | ||
24 | |||
25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
26 | [_BASE] = LAYOUT( | ||
27 | KC_ESC, 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_DEL, KC_DEL, | ||
28 | 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_END, | ||
29 | 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_HOME, | ||
30 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
31 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT | ||
32 | ), | ||
33 | |||
34 | [_FN] = LAYOUT( | ||
35 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
37 | _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
38 | _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, | ||
39 | _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END | ||
40 | ), | ||
41 | |||
42 | [_MEDIA] = LAYOUT( | ||
43 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
44 | _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
45 | _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
46 | _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, | ||
47 | _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END | ||
48 | ) | ||
49 | }; | ||
50 | |||
51 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
52 | if (index == 0) { /* First encoder */ | ||
53 | if (clockwise) { | ||
54 | tap_code(KC_VOLU); | ||
55 | } else { | ||
56 | tap_code(KC_VOLD); | ||
57 | } | ||
58 | } else if (index == 1) { /* Second encoder */ | ||
59 | if (clockwise) { | ||
60 | tap_code(KC_MNXT); | ||
61 | } else { | ||
62 | tap_code(KC_MPRV); | ||
63 | } | ||
64 | } else if (index == 2) { /* Third encoder */ | ||
65 | if (clockwise) { | ||
66 | tap_code(KC_RGHT); | ||
67 | } else { | ||
68 | tap_code(KC_LEFT); | ||
69 | } | ||
70 | } | ||
71 | return true; | ||
72 | } | ||
diff --git a/keyboards/basekeys/trifecta/keymaps/default/rules.mk b/keyboards/basekeys/trifecta/keymaps/default/rules.mk new file mode 100644 index 000000000..910bd64a5 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/default/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | CONSOLE_ENABLE = no # Console for debug | ||
2 | COMMAND_ENABLE = no \ No newline at end of file | ||
diff --git a/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/keyboards/basekeys/trifecta/keymaps/via/keymap.c new file mode 100644 index 000000000..54e25ff37 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/via/keymap.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* Copyright 2020 Swiftrax and Basekeys.com | ||
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 | |||
19 | // Defines names for use in layer keycodes and the keymap | ||
20 | enum layer_names { | ||
21 | _BASE, | ||
22 | _FN, | ||
23 | _MEDIA }; | ||
24 | |||
25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
26 | [_BASE] = LAYOUT( | ||
27 | KC_ESC, 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_DEL, KC_DEL, | ||
28 | 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_END, | ||
29 | 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_HOME, | ||
30 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
31 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT | ||
32 | ), | ||
33 | |||
34 | [_FN] = LAYOUT( | ||
35 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
36 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
37 | _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
38 | _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, | ||
39 | _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END | ||
40 | ), | ||
41 | |||
42 | [_MEDIA] = LAYOUT( | ||
43 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, | ||
44 | _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
45 | _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
46 | _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, | ||
47 | _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END | ||
48 | ) | ||
49 | }; | ||
50 | |||
51 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
52 | if (index == 0) { /* First encoder */ | ||
53 | if (clockwise) { | ||
54 | tap_code(KC_VOLU); | ||
55 | } else { | ||
56 | tap_code(KC_VOLD); | ||
57 | } | ||
58 | } else if (index == 1) { /* Second encoder */ | ||
59 | if (clockwise) { | ||
60 | tap_code(KC_RGHT); | ||
61 | } else { | ||
62 | tap_code(KC_LEFT); | ||
63 | } | ||
64 | } else if (index == 2) { /* Third encoder */ | ||
65 | if (clockwise) { | ||
66 | rgblight_step(); | ||
67 | } else { | ||
68 | rgblight_step_reverse(); | ||
69 | } | ||
70 | } | ||
71 | return true; | ||
72 | } | ||
diff --git a/keyboards/basekeys/trifecta/keymaps/via/rules.mk b/keyboards/basekeys/trifecta/keymaps/via/rules.mk new file mode 100644 index 000000000..32f462d06 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/via/rules.mk | |||
@@ -0,0 +1,3 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | CONSOLE_ENABLE = no # Console for debug | ||
3 | COMMAND_ENABLE = no \ No newline at end of file | ||
diff --git a/keyboards/basekeys/trifecta/readme.md b/keyboards/basekeys/trifecta/readme.md new file mode 100644 index 000000000..efe6fb0ab --- /dev/null +++ b/keyboards/basekeys/trifecta/readme.md | |||
@@ -0,0 +1,17 @@ | |||
1 | # Trifecta | ||
2 | |||
3 |  | ||
4 | |||
5 | An Alice style board with arrowkeys, based on the Fate Arisu layout. | ||
6 | |||
7 | * Keyboard Maintainer: [swiftrax](https://github.com/swiftrax) | ||
8 | * Hardware Supported: Trifecta PCB, ATMEGA32U4-AU | ||
9 | * Hardware Availability: [Website](https://mykeyboard.eu/catalogue/) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make basekeys/trifecta:default | ||
14 | |||
15 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) | ||
16 | |||
17 | [Build guide](https://www.basekeys.com/category/build-guides/) | ||
diff --git a/keyboards/basekeys/trifecta/rules.mk b/keyboards/basekeys/trifecta/rules.mk new file mode 100644 index 000000000..d82233c75 --- /dev/null +++ b/keyboards/basekeys/trifecta/rules.mk | |||
@@ -0,0 +1,20 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = yes # Console for debug | ||
14 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
15 | NKRO_ENABLE = no # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||
19 | |||
20 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/basekeys/trifecta/trifecta.c b/keyboards/basekeys/trifecta/trifecta.c new file mode 100644 index 000000000..e7aca201c --- /dev/null +++ b/keyboards/basekeys/trifecta/trifecta.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* Copyright 2020 Swiftrax and Basekeys.com | ||
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 "trifecta.h" | ||
18 | |||
19 | #ifdef RGB_MATRIX_ENABLE | ||
20 | |||
21 | led_config_t g_led_config = { { | ||
22 | { NO_LED, 70, 61, 52, 43, 34, 24, 14 }, | ||
23 | { 79, 69, 60, 51, 42, 33, 23, NO_LED }, | ||
24 | { NO_LED, 71, 62, 53, 44, 35, 25, 15 }, | ||
25 | { 78, 68, 59, 50, 41, 32, 22, NO_LED }, | ||
26 | { 77, 67, 58, 49, 40, 31, NO_LED, 16 }, | ||
27 | { NO_LED, 72, 63, 54, 45, 36, 26, NO_LED }, | ||
28 | { NO_LED, 73, 64, 55, 46, 37, 27, 17 }, | ||
29 | { 76, 66, 57, 48, 39, 30, 21, NO_LED }, | ||
30 | { NO_LED, 74, 56, NO_LED, NO_LED, 38, 28, 18 }, | ||
31 | { 75, 65, NO_LED, NO_LED, 47, 29, 20, 19 } | ||
32 | }, { | ||
33 | // Underglow | ||
34 | { 218, 7 }, { 214, 45 }, { 180, 47 }, { 147, 50 }, { 94, 62 }, { 37, 51 }, { 4, 8 }, { 36, 15 }, | ||
35 | { 62, 18 }, { 78, 5 }, { 119, 7 }, { 145, 16 }, { 166, 3 }, { 200, 16 }, | ||
36 | |||
37 | //Per Key | ||
38 | { 185, 11 }, { 191, 22 }, { 188, 33 }, { 200, 46 }, { 200, 57 }, { 212, 57 }, { 188, 57 }, { 181, 44 }, | ||
39 | { 176, 22 }, { 168, 11 }, { 155, 11 }, { 164, 22 }, { 169, 32 }, { 165, 44 }, { 172, 55 }, { 157, 54 }, | ||
40 | { 153, 44 }, { 156, 33 }, { 153, 22 }, { 142, 12 }, { 130, 13 }, { 138, 23 }, { 143, 33 }, { 140, 45 }, | ||
41 | { 137, 56 }, { 128, 47 }, { 132, 35 }, { 127, 25 }, { 119, 16 }, { 107, 17 }, { 115, 27 }, { 120, 37 }, | ||
42 | { 116, 48 }, { 117, 59 }, { 104, 51 }, { 109, 39 }, { 104, 29 }, { 86, 19 }, { 74, 16 }, { 78, 28 }, | ||
43 | { 79, 39 }, { 82, 50 }, { 73, 60 }, { 71, 48 }, { 67, 37 }, { 66, 26 }, { 63, 15 }, { 50, 12 }, | ||
44 | { 55, 24 }, { 55, 35 }, { 59, 47 }, { 50, 56 }, { 47, 45 }, { 43, 33 }, { 43, 22 }, { 39, 10 }, | ||
45 | { 25, 11 }, { 29, 22 }, { 30, 33 }, { 34, 44 }, { 24, 54 }, { 9, 55 }, { 15, 44 }, { 14, 33 }, | ||
46 | { 14, 22 }, { 14, 11 } | ||
47 | }, { | ||
48 | 2, 2, 2, 2, 2, 2, 2, 2, | ||
49 | 2, 2, 2, 2, 2, 2, | ||
50 | |||
51 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
52 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
53 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
54 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
55 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
56 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
57 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
58 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
59 | 4, 4 | ||
60 | } }; | ||
61 | #endif \ No newline at end of file | ||
diff --git a/keyboards/basekeys/trifecta/trifecta.h b/keyboards/basekeys/trifecta/trifecta.h new file mode 100644 index 000000000..ed337813c --- /dev/null +++ b/keyboards/basekeys/trifecta/trifecta.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 2020 Swiftrax and Basekeys.com | ||
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 | #pragma once | ||
17 | |||
18 | #include "quantum.h" | ||
19 | |||
20 | #define XXX KC_NO//readabilty | ||
21 | |||
22 | /* This a shortcut to help you visually see your layout. | ||
23 | * | ||
24 | * The first section contains all of the arguments representing the physical | ||
25 | * layout of the board and position of the keys. | ||
26 | * | ||
27 | * The second converts the arguments into a two-dimensional array which | ||
28 | * represents the switch matrix. | ||
29 | */ | ||
30 | #define LAYOUT( \ | ||
31 | k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k37, \ | ||
32 | k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k57, \ | ||
33 | k40, k51, k41, k52, k42, k53, k43, k54, k44, k55, k45, k56, k47, k77, \ | ||
34 | k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, \ | ||
35 | k90, k81, k91, k82, k94, k85, k95, k86, k96, k87, k97 \ | ||
36 | ) \ | ||
37 | { \ | ||
38 | { XXX, k01, k02, k03, k04, k05, k06, k07}, \ | ||
39 | { k10, k11, k12, k13, k14, k15, k16, k17}, \ | ||
40 | { XXX, k21, k22, k23, k24, k25, k26, k27}, \ | ||
41 | { k30, k31, k32, k33, k34, k35, k36, k37}, \ | ||
42 | { k40, k41, k42, k43, k44, k45, XXX, k47}, \ | ||
43 | { XXX, k51, k52, k53, k54, k55, k56, k57}, \ | ||
44 | { XXX, k61, k62, k63, k64, k65, k66, k67}, \ | ||
45 | { k70, k71, k72, k73, k74, k75, k76, k77}, \ | ||
46 | { XXX, k81, k82, XXX, XXX, k85, k86, k87}, \ | ||
47 | { k90, k91, XXX, XXX, k94, k95, k96, k97} \ | ||
48 | } | ||