diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /keyboards/dp60 |
Diffstat (limited to 'keyboards/dp60')
-rw-r--r-- | keyboards/dp60/config.h | 109 | ||||
-rw-r--r-- | keyboards/dp60/dp60.c | 198 | ||||
-rw-r--r-- | keyboards/dp60/dp60.h | 152 | ||||
-rw-r--r-- | keyboards/dp60/info.json | 428 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/allleds/keymap.c | 32 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/allleds/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/default/keymap.c | 32 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/indicator/config.h | 25 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/indicator/indicator.c | 101 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/indicator/keymap.c | 32 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/indicator/led_driver.c | 26 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/indicator/readme.md | 10 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/indicator/rules.mk | 4 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/via/keymap.c | 46 | ||||
-rw-r--r-- | keyboards/dp60/keymaps/via/rules.mk | 3 | ||||
-rw-r--r-- | keyboards/dp60/matrix.c | 260 | ||||
-rw-r--r-- | keyboards/dp60/readme.md | 13 | ||||
-rw-r--r-- | keyboards/dp60/rules.mk | 25 |
18 files changed, 1497 insertions, 0 deletions
diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h new file mode 100644 index 000000000..f4a44206f --- /dev/null +++ b/keyboards/dp60/config.h | |||
@@ -0,0 +1,109 @@ | |||
1 | /** | ||
2 | * config.h | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 "config_common.h" | ||
19 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #define VENDOR_ID 0x60BE | ||
22 | #define PRODUCT_ID 0x00BE | ||
23 | #define DEVICE_VER 0x0001 | ||
24 | #define MANUFACTURER astro | ||
25 | #define PRODUCT DP60 | ||
26 | |||
27 | /* key matrix size */ | ||
28 | #define MATRIX_ROWS 5 | ||
29 | #define MATRIX_COLS 15 | ||
30 | #define UNUSED_PINS | ||
31 | #define DIODE_DIRECTION COL2ROW | ||
32 | |||
33 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
34 | #define DEBOUNCE 5 | ||
35 | |||
36 | /* | ||
37 | * Feature disable options | ||
38 | * These options are also useful to firmware size reduction. | ||
39 | */ | ||
40 | |||
41 | /* disable debug print */ | ||
42 | //#define NO_DEBUG | ||
43 | |||
44 | /* disable print */ | ||
45 | //#define NO_PRINT | ||
46 | |||
47 | //rgb light setting | ||
48 | #define RGBLED_NUM 18 | ||
49 | #define RGB_DI_PIN D7 | ||
50 | #define RGBLIGHT_ANIMATIONS | ||
51 | #define RGBLIGHT_HUE_STEP 8 | ||
52 | #define RGBLIGHT_SAT_STEP 8 | ||
53 | #define RGBLIGHT_VAL_STEP 8 | ||
54 | |||
55 | //rgb matrix setting | ||
56 | #define DRIVER_ADDR_1 0b1110100 | ||
57 | #define DRIVER_ADDR_2 0b1110111 | ||
58 | #define DRIVER_COUNT 2 | ||
59 | #define DRIVER_1_LED_TOTAL 36 | ||
60 | #define DRIVER_2_LED_TOTAL 36 | ||
61 | #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | ||
62 | // RGB Matrix Animation modes. Explicitly enabled | ||
63 | // For full list of effects, see: | ||
64 | // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects | ||
65 | #define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
66 | #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
67 | #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
68 | #define ENABLE_RGB_MATRIX_BREATHING | ||
69 | #define ENABLE_RGB_MATRIX_BAND_SAT | ||
70 | #define ENABLE_RGB_MATRIX_BAND_VAL | ||
71 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
72 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
73 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
74 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
75 | #define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
76 | #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
77 | #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
78 | #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
79 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
80 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
81 | #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
82 | #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
83 | #define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
84 | #define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
85 | #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
86 | #define ENABLE_RGB_MATRIX_RAINDROPS | ||
87 | #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
88 | #define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
89 | #define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
90 | #define ENABLE_RGB_MATRIX_HUE_WAVE | ||
91 | #define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
92 | #define ENABLE_RGB_MATRIX_PIXEL_FLOW | ||
93 | #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL | ||
94 | // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined | ||
95 | #define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
96 | #define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
97 | // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined | ||
98 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
99 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
100 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
101 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
102 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
103 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
104 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
105 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
106 | #define ENABLE_RGB_MATRIX_SPLASH | ||
107 | #define ENABLE_RGB_MATRIX_MULTISPLASH | ||
108 | #define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
109 | #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c new file mode 100644 index 000000000..16aac75fa --- /dev/null +++ b/keyboards/dp60/dp60.c | |||
@@ -0,0 +1,198 @@ | |||
1 | /** | ||
2 | * dp60.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 "dp60.h" | ||
18 | |||
19 | #ifdef RGB_MATRIX_ENABLE | ||
20 | const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { | ||
21 | /* Refer to IS31 manual for these locations | ||
22 | * driver | ||
23 | * | R location | ||
24 | * | | G location | ||
25 | * | | | B location | ||
26 | * | | | | */ | ||
27 | // left CA | ||
28 | {0, C1_1, C3_2, C4_2}, | ||
29 | {0, C1_2, C2_2, C4_3}, | ||
30 | {0, C1_3, C2_3, C3_3}, | ||
31 | {0, C1_4, C2_4, C3_4}, | ||
32 | {0, C1_5, C2_5, C3_5}, | ||
33 | {0, C1_6, C2_6, C3_6}, | ||
34 | {0, C1_7, C2_7, C3_7}, | ||
35 | {0, C1_8, C2_8, C3_8}, | ||
36 | |||
37 | {0, C5_1, C4_1, C6_1}, | ||
38 | {0, C5_8, C4_8, C6_8}, | ||
39 | |||
40 | {0, C9_1, C8_1, C7_1}, | ||
41 | {0, C9_2, C8_2, C7_2}, | ||
42 | {0, C9_3, C8_3, C7_3}, | ||
43 | {0, C9_4, C8_4, C7_4}, | ||
44 | {0, C9_5, C8_5, C7_5}, | ||
45 | {0, C9_6, C8_6, C7_6}, | ||
46 | {0, C9_7, C8_7, C6_6}, | ||
47 | {0, C9_8, C7_7, C6_7}, | ||
48 | // left CB | ||
49 | {0, C1_9, C3_10, C4_10}, | ||
50 | {0, C1_10, C2_10, C4_11}, | ||
51 | {0, C1_11, C2_11, C3_11}, | ||
52 | {0, C1_12, C2_12, C3_12}, | ||
53 | {0, C1_13, C2_13, C3_13}, | ||
54 | {0, C1_14, C2_14, C3_14}, | ||
55 | {0, C1_15, C2_15, C3_15}, | ||
56 | {0, C1_16, C2_16, C3_16}, | ||
57 | |||
58 | {0, C5_9, C4_9, C6_9}, | ||
59 | {0, C5_16, C4_16, C6_16}, | ||
60 | |||
61 | {0, C9_9, C8_9, C7_9}, | ||
62 | {0, C9_10, C8_10, C7_10}, | ||
63 | {0, C9_11, C8_11, C7_11}, | ||
64 | {0, C9_12, C8_12, C7_12}, | ||
65 | {0, C9_13, C8_13, C7_13}, | ||
66 | {0, C9_14, C8_14, C7_14}, | ||
67 | {0, C9_15, C8_15, C6_14}, | ||
68 | {0, C9_16, C7_15, C6_15}, | ||
69 | |||
70 | // right CA | ||
71 | {1, C1_1, C3_2, C4_2}, | ||
72 | {1, C1_2, C2_2, C4_3}, | ||
73 | {1, C1_3, C2_3, C3_3}, | ||
74 | {1, C1_4, C2_4, C3_4}, | ||
75 | {1, C1_5, C2_5, C3_5}, | ||
76 | {1, C1_6, C2_6, C3_6}, | ||
77 | {1, C1_7, C2_7, C3_7}, | ||
78 | {1, C1_8, C2_8, C3_8}, | ||
79 | |||
80 | {1, C5_1, C4_1, C6_1}, | ||
81 | {1, C5_8, C4_8, C6_8}, | ||
82 | |||
83 | {1, C9_1, C8_1, C7_1}, | ||
84 | {1, C9_2, C8_2, C7_2}, | ||
85 | {1, C9_3, C8_3, C7_3}, | ||
86 | {1, C9_4, C8_4, C7_4}, | ||
87 | {1, C9_5, C8_5, C7_5}, | ||
88 | {1, C9_6, C8_6, C7_6}, | ||
89 | {1, C9_7, C8_7, C6_6}, | ||
90 | {1, C9_8, C7_7, C6_7}, | ||
91 | // right CB | ||
92 | {1, C1_9, C3_10, C4_10}, | ||
93 | {1, C1_10, C2_10, C4_11}, | ||
94 | {1, C1_11, C2_11, C3_11}, | ||
95 | {1, C1_12, C2_12, C3_12}, | ||
96 | {1, C1_13, C2_13, C3_13}, | ||
97 | {1, C1_14, C2_14, C3_14}, | ||
98 | {1, C1_15, C2_15, C3_15}, | ||
99 | {1, C1_16, C2_16, C3_16}, | ||
100 | |||
101 | {1, C5_9, C4_9, C6_9}, | ||
102 | {1, C5_16, C4_16, C6_16}, | ||
103 | |||
104 | {1, C9_9, C8_9, C7_9}, | ||
105 | {1, C9_10, C8_10, C7_10}, | ||
106 | {1, C9_11, C8_11, C7_11}, | ||
107 | {1, C9_12, C8_12, C7_12}, | ||
108 | {1, C9_13, C8_13, C7_13}, | ||
109 | {1, C9_14, C8_14, C7_14}, | ||
110 | {1, C9_15, C8_15, C6_14}, | ||
111 | {1, C9_16, C7_15, C6_15}, | ||
112 | }; | ||
113 | |||
114 | led_config_t g_led_config = { | ||
115 | { | ||
116 | { 0, 1, 2, 3, 4, 5, 6, 36, 37, 38, 39, 40, 41, 42}, | ||
117 | { 8, 9, 10, 11, 12, 13, 7, 45, 46, 47, 48, 49, 50, 51}, | ||
118 | { 26,27, 18, 14, 15, 16, 17, 54, 55, 56, 57, 58, 59, 53}, | ||
119 | { 29,30, 31, 19, 20, 21, 22, 23, 62, 63, 64, 65, 66, 61}, | ||
120 | { 35,34, 33, NO_LED, NO_LED, NO_LED, 24, 44, NO_LED, NO_LED, 68, 69, 70, 71}, | ||
121 | }, | ||
122 | { | ||
123 | { 32, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{ 96, 64},{ 96, 64}, | ||
124 | { 0, 32},{ 16, 32}, | ||
125 | { 0, 48},{ 0, 48},{ 16, 48},{ 32, 48},{ 64, 64},{ 32, 64},{ 16, 64},{ 0, 64}, | ||
126 | { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, | ||
127 | { 0, 16},{ 16, 16}, | ||
128 | { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 48, 32},{ 64, 32},{ 80, 32},{ 96, 32}, | ||
129 | |||
130 | {128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{216, 0},{224, 0}, | ||
131 | {112, 0},{128, 16}, | ||
132 | {144, 16},{160, 16},{176, 16},{192, 16},{208, 16},{224, 16},{224, 32},{216, 32}, | ||
133 | {128, 32},{144, 32},{160, 32},{176, 32},{192, 32},{208, 32},{208, 48},{224, 48}, | ||
134 | {128, 48},{144, 48}, | ||
135 | {160, 48},{176, 48},{192, 48},{142, 64},{160, 64},{176, 64},{208, 64},{224, 64} | ||
136 | }, | ||
137 | { | ||
138 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
139 | 1, 4, | ||
140 | 4, 4, 1, 1, 1, 4, 4, 4, | ||
141 | |||
142 | 1, 4, 4, 4, 4, 4, 4, 4, | ||
143 | 1, 4, | ||
144 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
145 | |||
146 | 4, 4, 4, 4, 4, 4, 1, 1, | ||
147 | 4, 4, | ||
148 | 4, 4, 4, 4, 4, 1, 1, 1, | ||
149 | |||
150 | 4, 4, 4, 4, 4, 4, 4, 1, | ||
151 | 1, 4, | ||
152 | 4, 4, 4, 4, 1, 1, 1, 1, | ||
153 | } | ||
154 | }; | ||
155 | |||
156 | #endif | ||
157 | |||
158 | #ifdef WEBUSB_ENABLE | ||
159 | #include "webusb.h" | ||
160 | #include "dynamic_keymap.h" | ||
161 | |||
162 | |||
163 | webusb_pos_t webusb_keymap[] = { | ||
164 | {0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 6}, {4, 7}, {0, 7}, {0, 8}, {0, 9}, {0, 10}, {0, 11}, {0, 13}, | ||
165 | |||
166 | {1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {1, 6}, {1, 7}, {1, 8}, {1, 9}, {1, 10}, {1, 11}, {1, 12}, {1, 13}, | ||
167 | |||
168 | {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {2, 6}, {2, 7}, {2, 8}, {2, 9}, {2, 10}, {2, 11}, {2, 13}, | ||
169 | |||
170 | {3, 0}, {3, 2}, {3, 3}, {3, 4}, {3, 5}, {3, 6}, {3, 7}, {3, 8}, {3, 9}, {3, 10}, {3, 11}, {3, 13}, | ||
171 | |||
172 | {4, 0}, {4, 1}, {4, 2}, {4, 6}, {4, 10}, {4, 11}, {4, 12}, {4, 13}, | ||
173 | }; | ||
174 | #endif | ||
175 | |||
176 | #ifndef RAW_ENABLE | ||
177 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
178 | #else | ||
179 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
180 | #endif | ||
181 | if (record->event.pressed) { | ||
182 | switch(keycode) { | ||
183 | #ifdef RGBLIGHT_ENABLE | ||
184 | #ifdef RGB_MATRIX_ENABLE | ||
185 | case KC_F13: // toggle rgb matrix | ||
186 | rgb_matrix_toggle(); | ||
187 | return false; | ||
188 | case KC_F14: | ||
189 | rgb_matrix_step(); | ||
190 | return false; | ||
191 | #endif | ||
192 | #endif | ||
193 | default: | ||
194 | break; | ||
195 | } | ||
196 | } | ||
197 | return true; | ||
198 | } | ||
diff --git a/keyboards/dp60/dp60.h b/keyboards/dp60/dp60.h new file mode 100644 index 000000000..515a2c074 --- /dev/null +++ b/keyboards/dp60/dp60.h | |||
@@ -0,0 +1,152 @@ | |||
1 | /** | ||
2 | * dp60.h | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 | // This a shortcut to help you visually see your layout. | ||
21 | // The first section contains all of the arguements | ||
22 | // The second converts the arguments into a two-dimensional array | ||
23 | // Matrix layout to accomodate all layouts. Good for VIA mapping correctly, and it doesnt exist yet | ||
24 | // | ||
25 | //┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐ ┌──────┐ | ||
26 | //│0A││0B││0C││0D││0E││0F││0G││4H││0H││0I││0J││0K││0L││0M││0N│ │ 0N │ split backspace support | ||
27 | //└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘ └──────┘ | ||
28 | // 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0e | ||
29 | //┌────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌────┐ ┌────┐ | ||
30 | //│1A ││1B││1C││1D││1E││1F││1G││1H││1I││1J││1K││1L││1M││1N │ │ │ iso enter - see below | ||
31 | //└────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└────┘ └────┘ | ||
32 | // 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1e | ||
33 | //┌─────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌───────┐ ┌──┐┌──┐ | ||
34 | //│ 2A ││2B││2C││2D││2E││2F││2G││2H││2I││2J││2K││2L││ 2N │ │2M││2N│ iso enter | ||
35 | //└─────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└───────┘ └──┘└──┘ | ||
36 | // 20 22 23 24 25 26 27 28 29 2a 2b 2c 2e 2d 2e | ||
37 | //┌───────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌─────────┐ | ||
38 | //│3A │ 3B││3C││3D││3E││3F││3G││3H││3I││3J││3K││3L││ 3M │3N│ split shifts (left and right) | ||
39 | //└───────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└─────────┘ | ||
40 | // 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d | ||
41 | //┌───┐┌───┐┌───┐┌───────────────────────┐┌───┐┌───┐┌───┐┌───┐ | ||
42 | //│4A ││4B ││4C ││ 4G ││4K ││4L ││4M ││4N │ wkl/hhkb use 4L (k49), 4M (k4a) , 4N (k4b) | ||
43 | //└───┘└───┘└───┘└───────────────────────┘└───┘└───┘└───┘└───┘ | ||
44 | // 40 42 43 47 48 49 4a 4b | ||
45 | //end of mapping | ||
46 | // | ||
47 | //added k0d | ||
48 | //added k2d KC_NUMS for iso | ||
49 | //added k31 split l-shift, k3d split r-shift | ||
50 | |||
51 | #define LAYOUT_all( \ | ||
52 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
53 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
54 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ | ||
55 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
56 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
57 | ) \ | ||
58 | { \ | ||
59 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
60 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
61 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ | ||
62 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
63 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
64 | } | ||
65 | |||
66 | #define LAYOUT_60_ansi( \ | ||
67 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ | ||
68 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
69 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
70 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ | ||
71 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
72 | ) \ | ||
73 | { \ | ||
74 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ | ||
75 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
76 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
77 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ | ||
78 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
79 | } | ||
80 | |||
81 | #define LAYOUT_60_iso( \ | ||
82 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ | ||
83 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ | ||
84 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ | ||
85 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ | ||
86 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
87 | ) \ | ||
88 | { \ | ||
89 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ | ||
90 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO}, \ | ||
91 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ | ||
92 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ | ||
93 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
94 | } | ||
95 | |||
96 | #define LAYOUT_60_ansi_tsangan_split_rshift( \ | ||
97 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ | ||
98 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
99 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
100 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
101 | k40, k42, k43, k47, k49, k4a, k4b \ | ||
102 | ) \ | ||
103 | { \ | ||
104 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ | ||
105 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
106 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
107 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
108 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ | ||
109 | } | ||
110 | |||
111 | #define LAYOUT_60_hhkb( \ | ||
112 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
113 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
114 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
115 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
116 | k42, k43, k47, k49, k4a \ | ||
117 | ) \ | ||
118 | { \ | ||
119 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
120 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
121 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
122 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
123 | {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ | ||
124 | } | ||
125 | #define LAYOUT_60_tsangan_hhkb( \ | ||
126 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
127 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
128 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
129 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
130 | k40, k42, k43, k47, k49, k4a, k4b \ | ||
131 | ) \ | ||
132 | { \ | ||
133 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
134 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
135 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
136 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
137 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ | ||
138 | } | ||
139 | #define LAYOUT_60_ansi_split_bs_rshift( \ | ||
140 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
141 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
142 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
143 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
144 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
145 | ) \ | ||
146 | { \ | ||
147 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
148 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
149 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
150 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
151 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
152 | } | ||
diff --git a/keyboards/dp60/info.json b/keyboards/dp60/info.json new file mode 100644 index 000000000..e5c7bbfee --- /dev/null +++ b/keyboards/dp60/info.json | |||
@@ -0,0 +1,428 @@ | |||
1 | { | ||
2 | "keyboard_name": "rgb60", | ||
3 | "url": "", | ||
4 | "maintainer": "qmk", | ||
5 | "layout_aliases": { | ||
6 | "LAYOUT_60_wkl": "LAYOUT_60_ansi_tsangan_split_rshift", | ||
7 | "LAYOUT_60_wkl_split_bs": "LAYOUT_60_tsangan_hhkb" | ||
8 | }, | ||
9 | "layouts": { | ||
10 | "LAYOUT_60_ansi_tsangan_split_rshift": { | ||
11 | "layout": [ | ||
12 | {"label":"~", "x":0, "y":0}, | ||
13 | {"label":"!", "x":1, "y":0}, | ||
14 | {"label":"@", "x":2, "y":0}, | ||
15 | {"label":"#", "x":3, "y":0}, | ||
16 | {"label":"$", "x":4, "y":0}, | ||
17 | {"label":"%", "x":5, "y":0}, | ||
18 | {"label":"^", "x":6, "y":0}, | ||
19 | {"label":"&", "x":7, "y":0}, | ||
20 | {"label":"*", "x":8, "y":0}, | ||
21 | {"label":"(", "x":9, "y":0}, | ||
22 | {"label":")", "x":10, "y":0}, | ||
23 | {"label":"_", "x":11, "y":0}, | ||
24 | {"label":"+", "x":12, "y":0}, | ||
25 | {"label":"Backspace", "x":13, "y":0, "w":2}, | ||
26 | |||
27 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
28 | {"label":"Q", "x":1.5, "y":1}, | ||
29 | {"label":"W", "x":2.5, "y":1}, | ||
30 | {"label":"E", "x":3.5, "y":1}, | ||
31 | {"label":"R", "x":4.5, "y":1}, | ||
32 | {"label":"T", "x":5.5, "y":1}, | ||
33 | {"label":"Y", "x":6.5, "y":1}, | ||
34 | {"label":"U", "x":7.5, "y":1}, | ||
35 | {"label":"I", "x":8.5, "y":1}, | ||
36 | {"label":"O", "x":9.5, "y":1}, | ||
37 | {"label":"P", "x":10.5, "y":1}, | ||
38 | {"label":"{", "x":11.5, "y":1}, | ||
39 | {"label":"}", "x":12.5, "y":1}, | ||
40 | {"label":"|", "x":13.5, "y":1, "w":1.5}, | ||
41 | |||
42 | {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, | ||
43 | {"label":"A", "x":1.75, "y":2}, | ||
44 | {"label":"S", "x":2.75, "y":2}, | ||
45 | {"label":"D", "x":3.75, "y":2}, | ||
46 | {"label":"F", "x":4.75, "y":2}, | ||
47 | {"label":"G", "x":5.75, "y":2}, | ||
48 | {"label":"H", "x":6.75, "y":2}, | ||
49 | {"label":"J", "x":7.75, "y":2}, | ||
50 | {"label":"K", "x":8.75, "y":2}, | ||
51 | {"label":"L", "x":9.75, "y":2}, | ||
52 | {"label":":", "x":10.75, "y":2}, | ||
53 | {"label":"\"", "x":11.75, "y":2}, | ||
54 | {"label":"Enter", "x":12.75, "y":2, "w":2.25}, | ||
55 | |||
56 | {"label":"Shift", "x":0, "y":3, "w":2.25}, | ||
57 | {"label":"Z", "x":2.25, "y":3}, | ||
58 | {"label":"X", "x":3.25, "y":3}, | ||
59 | {"label":"C", "x":4.25, "y":3}, | ||
60 | {"label":"V", "x":5.25, "y":3}, | ||
61 | {"label":"B", "x":6.25, "y":3}, | ||
62 | {"label":"N", "x":7.25, "y":3}, | ||
63 | {"label":"M", "x":8.25, "y":3}, | ||
64 | {"label":"<", "x":9.25, "y":3}, | ||
65 | {"label":">", "x":10.25, "y":3}, | ||
66 | {"label":"?", "x":11.25, "y":3}, | ||
67 | {"label":"Shift", "x":12.25, "y":3, "w":1.75}, | ||
68 | {"label":"Fn", "x":14, "y":3}, | ||
69 | |||
70 | {"label":"Ctrl", "x":0, "y":4, "w":1.5}, | ||
71 | {"label":"Win", "x":1.5, "y":4}, | ||
72 | {"label":"Alt", "x":2.5, "y":4, "w":1.5}, | ||
73 | {"x":4, "y":4, "w":7}, | ||
74 | {"label":"Alt", "x":11, "y":4, "w":1.5}, | ||
75 | {"label":"Win", "x":12.5, "y":4}, | ||
76 | {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} | ||
77 | ] | ||
78 | }, | ||
79 | "LAYOUT_60_ansi": { | ||
80 | "layout": [ | ||
81 | {"label":"~", "x":0, "y":0}, | ||
82 | {"label":"!", "x":1, "y":0}, | ||
83 | {"label":"@", "x":2, "y":0}, | ||
84 | {"label":"#", "x":3, "y":0}, | ||
85 | {"label":"$", "x":4, "y":0}, | ||
86 | {"label":"%", "x":5, "y":0}, | ||
87 | {"label":"^", "x":6, "y":0}, | ||
88 | {"label":"&", "x":7, "y":0}, | ||
89 | {"label":"*", "x":8, "y":0}, | ||
90 | {"label":"(", "x":9, "y":0}, | ||
91 | {"label":")", "x":10, "y":0}, | ||
92 | {"label":"_", "x":11, "y":0}, | ||
93 | {"label":"+", "x":12, "y":0}, | ||
94 | {"label":"Backspace", "x":13, "y":0, "w":2}, | ||
95 | |||
96 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
97 | {"label":"Q", "x":1.5, "y":1}, | ||
98 | {"label":"W", "x":2.5, "y":1}, | ||
99 | {"label":"E", "x":3.5, "y":1}, | ||
100 | {"label":"R", "x":4.5, "y":1}, | ||
101 | {"label":"T", "x":5.5, "y":1}, | ||
102 | {"label":"Y", "x":6.5, "y":1}, | ||
103 | {"label":"U", "x":7.5, "y":1}, | ||
104 | {"label":"I", "x":8.5, "y":1}, | ||
105 | {"label":"O", "x":9.5, "y":1}, | ||
106 | {"label":"P", "x":10.5, "y":1}, | ||
107 | {"label":"{", "x":11.5, "y":1}, | ||
108 | {"label":"}", "x":12.5, "y":1}, | ||
109 | {"label":"|", "x":13.5, "y":1, "w":1.5}, | ||
110 | |||
111 | {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, | ||
112 | {"label":"A", "x":1.75, "y":2}, | ||
113 | {"label":"S", "x":2.75, "y":2}, | ||
114 | {"label":"D", "x":3.75, "y":2}, | ||
115 | {"label":"F", "x":4.75, "y":2}, | ||
116 | {"label":"G", "x":5.75, "y":2}, | ||
117 | {"label":"H", "x":6.75, "y":2}, | ||
118 | {"label":"J", "x":7.75, "y":2}, | ||
119 | {"label":"K", "x":8.75, "y":2}, | ||
120 | {"label":"L", "x":9.75, "y":2}, | ||
121 | {"label":":", "x":10.75, "y":2}, | ||
122 | {"label":"\"", "x":11.75, "y":2}, | ||
123 | {"label":"Enter", "x":12.75, "y":2, "w":2.25}, | ||
124 | |||
125 | {"label":"Shift", "x":0, "y":3, "w":2.25}, | ||
126 | {"label":"Z", "x":2.25, "y":3}, | ||
127 | {"label":"X", "x":3.25, "y":3}, | ||
128 | {"label":"C", "x":4.25, "y":3}, | ||
129 | {"label":"V", "x":5.25, "y":3}, | ||
130 | {"label":"B", "x":6.25, "y":3}, | ||
131 | {"label":"N", "x":7.25, "y":3}, | ||
132 | {"label":"M", "x":8.25, "y":3}, | ||
133 | {"label":"<", "x":9.25, "y":3}, | ||
134 | {"label":">", "x":10.25, "y":3}, | ||
135 | {"label":"?", "x":11.25, "y":3}, | ||
136 | {"label":"Shift", "x":12.25, "y":3, "w":2.75}, | ||
137 | |||
138 | {"label":"Ctrl", "x":0, "y":4, "w":1.25}, | ||
139 | {"label":"Win", "x":1.25, "y":4, "w":1.25}, | ||
140 | {"label":"Alt", "x":2.5, "y":4, "w":1.25}, | ||
141 | {"x":3.75, "y":4, "w":6.25}, | ||
142 | {"label":"Alt", "x":10, "y":4, "w":1.25}, | ||
143 | {"label":"Win", "x":11.25, "y":4, "w":1.25}, | ||
144 | {"label":"Menu", "x":12.5, "y":4, "w":1.25}, | ||
145 | {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} | ||
146 | ] | ||
147 | }, | ||
148 | "LAYOUT_60_hhkb": { | ||
149 | "layout": [ | ||
150 | {"label":"Esc", "x":0, "y":0}, | ||
151 | {"label":"!", "x":1, "y":0}, | ||
152 | {"label":"@", "x":2, "y":0}, | ||
153 | {"label":"#", "x":3, "y":0}, | ||
154 | {"label":"$", "x":4, "y":0}, | ||
155 | {"label":"%", "x":5, "y":0}, | ||
156 | {"label":"^", "x":6, "y":0}, | ||
157 | {"label":"&", "x":7, "y":0}, | ||
158 | {"label":"*", "x":8, "y":0}, | ||
159 | {"label":"(", "x":9, "y":0}, | ||
160 | {"label":")", "x":10, "y":0}, | ||
161 | {"label":"_", "x":11, "y":0}, | ||
162 | {"label":"+", "x":12, "y":0}, | ||
163 | {"label":"|", "x":13, "y":0}, | ||
164 | {"label":"~", "x":14, "y":0}, | ||
165 | |||
166 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
167 | {"label":"Q", "x":1.5, "y":1}, | ||
168 | {"label":"W", "x":2.5, "y":1}, | ||
169 | {"label":"E", "x":3.5, "y":1}, | ||
170 | {"label":"R", "x":4.5, "y":1}, | ||
171 | {"label":"T", "x":5.5, "y":1}, | ||
172 | {"label":"Y", "x":6.5, "y":1}, | ||
173 | {"label":"U", "x":7.5, "y":1}, | ||
174 | {"label":"I", "x":8.5, "y":1}, | ||
175 | {"label":"O", "x":9.5, "y":1}, | ||
176 | {"label":"P", "x":10.5, "y":1}, | ||
177 | {"label":"{", "x":11.5, "y":1}, | ||
178 | {"label":"}", "x":12.5, "y":1}, | ||
179 | {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, | ||
180 | |||
181 | {"label":"Control", "x":0, "y":2, "w":1.75}, | ||
182 | {"label":"A", "x":1.75, "y":2}, | ||
183 | {"label":"S", "x":2.75, "y":2}, | ||
184 | {"label":"D", "x":3.75, "y":2}, | ||
185 | {"label":"F", "x":4.75, "y":2}, | ||
186 | {"label":"G", "x":5.75, "y":2}, | ||
187 | {"label":"H", "x":6.75, "y":2}, | ||
188 | {"label":"J", "x":7.75, "y":2}, | ||
189 | {"label":"K", "x":8.75, "y":2}, | ||
190 | {"label":"L", "x":9.75, "y":2}, | ||
191 | {"label":":", "x":10.75, "y":2}, | ||
192 | {"label":"\"", "x":11.75, "y":2}, | ||
193 | {"label":"Enter", "x":12.75, "y":2, "w":2.25}, | ||
194 | |||
195 | {"label":"Shift", "x":0, "y":3, "w":2.25}, | ||
196 | {"label":"Z", "x":2.25, "y":3}, | ||
197 | {"label":"X", "x":3.25, "y":3}, | ||
198 | {"label":"C", "x":4.25, "y":3}, | ||
199 | {"label":"V", "x":5.25, "y":3}, | ||
200 | {"label":"B", "x":6.25, "y":3}, | ||
201 | {"label":"N", "x":7.25, "y":3}, | ||
202 | {"label":"M", "x":8.25, "y":3}, | ||
203 | {"label":"<", "x":9.25, "y":3}, | ||
204 | {"label":">", "x":10.25, "y":3}, | ||
205 | {"label":"?", "x":11.25, "y":3}, | ||
206 | {"label":"Shift", "x":12.25, "y":3, "w":1.75}, | ||
207 | {"label":"Fn", "x":14, "y":3}, | ||
208 | |||
209 | {"label":"Win", "x":1.5, "y":4}, | ||
210 | {"label":"Alt", "x":2.5, "y":4, "w":1.5}, | ||
211 | {"x":4, "y":4, "w":7}, | ||
212 | {"label":"Alt", "x":11, "y":4, "w":1.5}, | ||
213 | {"label":"Win", "x":12.5, "y":4} | ||
214 | ] | ||
215 | }, | ||
216 | "LAYOUT_60_iso": { | ||
217 | "layout": [ | ||
218 | {"x":0, "y":0}, | ||
219 | {"x":1, "y":0}, | ||
220 | {"x":2, "y":0}, | ||
221 | {"x":3, "y":0}, | ||
222 | {"x":4, "y":0}, | ||
223 | {"x":5, "y":0}, | ||
224 | {"x":6, "y":0}, | ||
225 | {"x":7, "y":0}, | ||
226 | {"x":8, "y":0}, | ||
227 | {"x":9, "y":0}, | ||
228 | {"x":10, "y":0}, | ||
229 | {"x":11, "y":0}, | ||
230 | {"x":12, "y":0}, | ||
231 | {"x":13, "y":0, "w":2}, | ||
232 | |||
233 | {"x":0, "y":1, "w":1.5}, | ||
234 | {"x":1.5, "y":1}, | ||
235 | {"x":2.5, "y":1}, | ||
236 | {"x":3.5, "y":1}, | ||
237 | {"x":4.5, "y":1}, | ||
238 | {"x":5.5, "y":1}, | ||
239 | {"x":6.5, "y":1}, | ||
240 | {"x":7.5, "y":1}, | ||
241 | {"x":8.5, "y":1}, | ||
242 | {"x":9.5, "y":1}, | ||
243 | {"x":10.5, "y":1}, | ||
244 | {"x":11.5, "y":1}, | ||
245 | {"x":12.5, "y":1}, | ||
246 | {"x":13.75, "y":1, "w":1.25, "h":2}, | ||
247 | |||
248 | {"x":0, "y":2, "w":1.75}, | ||
249 | {"x":1.75, "y":2}, | ||
250 | {"x":2.75, "y":2}, | ||
251 | {"x":3.75, "y":2}, | ||
252 | {"x":4.75, "y":2}, | ||
253 | {"x":5.75, "y":2}, | ||
254 | {"x":6.75, "y":2}, | ||
255 | {"x":7.75, "y":2}, | ||
256 | {"x":8.75, "y":2}, | ||
257 | {"x":9.75, "y":2}, | ||
258 | {"x":10.75, "y":2}, | ||
259 | {"x":11.75, "y":2}, | ||
260 | {"x":12.75, "y":2}, | ||
261 | |||
262 | {"x":0, "y":3, "w":1.25}, | ||
263 | {"x":1.25, "y":3}, | ||
264 | {"x":2.25, "y":3}, | ||
265 | {"x":3.25, "y":3}, | ||
266 | {"x":4.25, "y":3}, | ||
267 | {"x":5.25, "y":3}, | ||
268 | {"x":6.25, "y":3}, | ||
269 | {"x":7.25, "y":3}, | ||
270 | {"x":8.25, "y":3}, | ||
271 | {"x":9.25, "y":3}, | ||
272 | {"x":10.25, "y":3}, | ||
273 | {"x":11.25, "y":3}, | ||
274 | {"x":12.25, "y":3, "w":2.75}, | ||
275 | |||
276 | {"x":0, "y":4, "w":1.25}, | ||
277 | {"x":1.25, "y":4, "w":1.25}, | ||
278 | {"x":2.5, "y":4, "w":1.25}, | ||
279 | {"x":3.75, "y":4, "w":6.25}, | ||
280 | {"x":10, "y":4, "w":1.25}, | ||
281 | {"x":11.25, "y":4, "w":1.25}, | ||
282 | {"x":12.5, "y":4, "w":1.25}, | ||
283 | {"x":13.75, "y":4, "w":1.25} | ||
284 | ] | ||
285 | }, | ||
286 | "LAYOUT_60_ansi_split_bs_rshift": { | ||
287 | "layout": [ | ||
288 | {"x":0, "y":0}, | ||
289 | {"x":1, "y":0}, | ||
290 | {"x":2, "y":0}, | ||
291 | {"x":3, "y":0}, | ||
292 | {"x":4, "y":0}, | ||
293 | {"x":5, "y":0}, | ||
294 | {"x":6, "y":0}, | ||
295 | {"x":7, "y":0}, | ||
296 | {"x":8, "y":0}, | ||
297 | {"x":9, "y":0}, | ||
298 | {"x":10, "y":0}, | ||
299 | {"x":11, "y":0}, | ||
300 | {"x":12, "y":0}, | ||
301 | {"x":13, "y":0}, | ||
302 | {"x":14, "y":0}, | ||
303 | |||
304 | {"x":0, "y":1, "w":1.5}, | ||
305 | {"x":1.5, "y":1}, | ||
306 | {"x":2.5, "y":1}, | ||
307 | {"x":3.5, "y":1}, | ||
308 | {"x":4.5, "y":1}, | ||
309 | {"x":5.5, "y":1}, | ||
310 | {"x":6.5, "y":1}, | ||
311 | {"x":7.5, "y":1}, | ||
312 | {"x":8.5, "y":1}, | ||
313 | {"x":9.5, "y":1}, | ||
314 | {"x":10.5, "y":1}, | ||
315 | {"x":11.5, "y":1}, | ||
316 | {"x":12.5, "y":1}, | ||
317 | {"x":13.5, "y":1, "w":1.5}, | ||
318 | |||
319 | {"x":0, "y":2, "w":1.75}, | ||
320 | {"x":1.75, "y":2}, | ||
321 | {"x":2.75, "y":2}, | ||
322 | {"x":3.75, "y":2}, | ||
323 | {"x":4.75, "y":2}, | ||
324 | {"x":5.75, "y":2}, | ||
325 | {"x":6.75, "y":2}, | ||
326 | {"x":7.75, "y":2}, | ||
327 | {"x":8.75, "y":2}, | ||
328 | {"x":9.75, "y":2}, | ||
329 | {"x":10.75, "y":2}, | ||
330 | {"x":11.75, "y":2}, | ||
331 | {"x":12.75, "y":2, "w":2.25}, | ||
332 | |||
333 | {"x":0, "y":3, "w":2.25}, | ||
334 | {"x":2.25, "y":3}, | ||
335 | {"x":3.25, "y":3}, | ||
336 | {"x":4.25, "y":3}, | ||
337 | {"x":5.25, "y":3}, | ||
338 | {"x":6.25, "y":3}, | ||
339 | {"x":7.25, "y":3}, | ||
340 | {"x":8.25, "y":3}, | ||
341 | {"x":9.25, "y":3}, | ||
342 | {"x":10.25, "y":3}, | ||
343 | {"x":11.25, "y":3}, | ||
344 | {"x":12.25, "y":3, "w":1.75}, | ||
345 | {"x":14, "y":3}, | ||
346 | |||
347 | {"x":0, "y":4, "w":1.25}, | ||
348 | {"x":1.25, "y":4, "w":1.25}, | ||
349 | {"x":2.5, "y":4, "w":1.25}, | ||
350 | {"x":3.75, "y":4, "w":6.25}, | ||
351 | {"x":10, "y":4, "w":1.25}, | ||
352 | {"x":11.25, "y":4, "w":1.25}, | ||
353 | {"x":12.5, "y":4, "w":1.25}, | ||
354 | {"x":13.75, "y":4, "w":1.25} | ||
355 | ] | ||
356 | }, | ||
357 | "LAYOUT_60_tsangan_hhkb": { | ||
358 | "layout": [ | ||
359 | {"x":0, "y":0}, | ||
360 | {"x":1, "y":0}, | ||
361 | {"x":2, "y":0}, | ||
362 | {"x":3, "y":0}, | ||
363 | {"x":4, "y":0}, | ||
364 | {"x":5, "y":0}, | ||
365 | {"x":6, "y":0}, | ||
366 | {"x":7, "y":0}, | ||
367 | {"x":8, "y":0}, | ||
368 | {"x":9, "y":0}, | ||
369 | {"x":10, "y":0}, | ||
370 | {"x":11, "y":0}, | ||
371 | {"x":12, "y":0}, | ||
372 | {"x":13, "y":0}, | ||
373 | {"x":14, "y":0}, | ||
374 | |||
375 | {"x":0, "y":1, "w":1.5}, | ||
376 | {"x":1.5, "y":1}, | ||
377 | {"x":2.5, "y":1}, | ||
378 | {"x":3.5, "y":1}, | ||
379 | {"x":4.5, "y":1}, | ||
380 | {"x":5.5, "y":1}, | ||
381 | {"x":6.5, "y":1}, | ||
382 | {"x":7.5, "y":1}, | ||
383 | {"x":8.5, "y":1}, | ||
384 | {"x":9.5, "y":1}, | ||
385 | {"x":10.5, "y":1}, | ||
386 | {"x":11.5, "y":1}, | ||
387 | {"x":12.5, "y":1}, | ||
388 | {"x":13.5, "y":1, "w":1.5}, | ||
389 | |||
390 | {"x":0, "y":2, "w":1.75}, | ||
391 | {"x":1.75, "y":2}, | ||
392 | {"x":2.75, "y":2}, | ||
393 | {"x":3.75, "y":2}, | ||
394 | {"x":4.75, "y":2}, | ||
395 | {"x":5.75, "y":2}, | ||
396 | {"x":6.75, "y":2}, | ||
397 | {"x":7.75, "y":2}, | ||
398 | {"x":8.75, "y":2}, | ||
399 | {"x":9.75, "y":2}, | ||
400 | {"x":10.75, "y":2}, | ||
401 | {"x":11.75, "y":2}, | ||
402 | {"x":12.75, "y":2, "w":2.25}, | ||
403 | |||
404 | {"x":0, "y":3, "w":2.25}, | ||
405 | {"x":2.25, "y":3}, | ||
406 | {"x":3.25, "y":3}, | ||
407 | {"x":4.25, "y":3}, | ||
408 | {"x":5.25, "y":3}, | ||
409 | {"x":6.25, "y":3}, | ||
410 | {"x":7.25, "y":3}, | ||
411 | {"x":8.25, "y":3}, | ||
412 | {"x":9.25, "y":3}, | ||
413 | {"x":10.25, "y":3}, | ||
414 | {"x":11.25, "y":3}, | ||
415 | {"x":12.25, "y":3, "w":1.75}, | ||
416 | {"x":14, "y":3}, | ||
417 | |||
418 | {"x":0, "y":4, "w":1.5}, | ||
419 | {"x":1.5, "y":4}, | ||
420 | {"x":2.5, "y":4, "w":1.5}, | ||
421 | {"x":4, "y":4, "w":7}, | ||
422 | {"x":11, "y":4, "w":1.5}, | ||
423 | {"x":12.5, "y":4}, | ||
424 | {"x":13.5, "y":4, "w":1.5} | ||
425 | ] | ||
426 | } | ||
427 | } | ||
428 | } | ||
diff --git a/keyboards/dp60/keymaps/allleds/keymap.c b/keyboards/dp60/keymaps/allleds/keymap.c new file mode 100644 index 000000000..66cc628d4 --- /dev/null +++ b/keyboards/dp60/keymaps/allleds/keymap.c | |||
@@ -0,0 +1,32 @@ | |||
1 | /** | ||
2 | * keymap.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_60_ansi_split_bs_rshift( | ||
20 | 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_DEL, KC_BSPC, | ||
21 | 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, | ||
22 | 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, | ||
23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), | ||
24 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL), | ||
25 | |||
26 | [1] = LAYOUT_60_ansi_split_bs_rshift( | ||
27 | _______, 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_PSCR, | ||
28 | RESET, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
29 | _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, | ||
30 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
31 | _______,_______,_______, _______, _______,_______,TG(0),_______), | ||
32 | }; | ||
diff --git a/keyboards/dp60/keymaps/allleds/rules.mk b/keyboards/dp60/keymaps/allleds/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/dp60/keymaps/allleds/rules.mk | |||
@@ -0,0 +1 @@ | |||
RGBLIGHT_ENABLE = yes | |||
diff --git a/keyboards/dp60/keymaps/default/keymap.c b/keyboards/dp60/keymaps/default/keymap.c new file mode 100644 index 000000000..66cc628d4 --- /dev/null +++ b/keyboards/dp60/keymaps/default/keymap.c | |||
@@ -0,0 +1,32 @@ | |||
1 | /** | ||
2 | * keymap.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_60_ansi_split_bs_rshift( | ||
20 | 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_DEL, KC_BSPC, | ||
21 | 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, | ||
22 | 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, | ||
23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), | ||
24 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL), | ||
25 | |||
26 | [1] = LAYOUT_60_ansi_split_bs_rshift( | ||
27 | _______, 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_PSCR, | ||
28 | RESET, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
29 | _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, | ||
30 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
31 | _______,_______,_______, _______, _______,_______,TG(0),_______), | ||
32 | }; | ||
diff --git a/keyboards/dp60/keymaps/indicator/config.h b/keyboards/dp60/keymaps/indicator/config.h new file mode 100644 index 000000000..0476faca9 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/config.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /** | ||
2 | * config.h | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 "config_common.h" | ||
19 | |||
20 | #define RGB_INDICATOR_NUM 8 | ||
21 | #undef RGBLED_NUM | ||
22 | #define RGBLED_NUM (18+RGB_INDICATOR_NUM) | ||
23 | |||
24 | #define RGB_INDICATOR_PIN B1 | ||
25 | #define RGBLIGHT_LAYERS | ||
diff --git a/keyboards/dp60/keymaps/indicator/indicator.c b/keyboards/dp60/keymaps/indicator/indicator.c new file mode 100644 index 000000000..a3a826e8a --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/indicator.c | |||
@@ -0,0 +1,101 @@ | |||
1 | /** | ||
2 | * indicator.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 "dp60.h" | ||
18 | |||
19 | #include "rgblight_list.h" | ||
20 | #include "rgblight.h" | ||
21 | |||
22 | |||
23 | // caps led | ||
24 | const rgblight_segment_t PROGMEM dp60_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
25 | {18, 1, HSV_RED} | ||
26 | ); | ||
27 | |||
28 | // scroll led | ||
29 | const rgblight_segment_t PROGMEM dp60_scrolllock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
30 | {19, 1, HSV_GREEN} | ||
31 | ); | ||
32 | |||
33 | // num led | ||
34 | const rgblight_segment_t PROGMEM dp60_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
35 | {20, 1, HSV_BLUE} | ||
36 | ); | ||
37 | |||
38 | // light 21 to 26 for layer 1-5 | ||
39 | const rgblight_segment_t PROGMEM dp60_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
40 | {21, 1, HSV_PURPLE} | ||
41 | ); | ||
42 | const rgblight_segment_t PROGMEM dp60_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
43 | {22, 1, HSV_CYAN} | ||
44 | ); | ||
45 | const rgblight_segment_t PROGMEM dp60_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
46 | {23, 1, HSV_YELLOW} | ||
47 | ); | ||
48 | const rgblight_segment_t PROGMEM dp60_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
49 | {24, 1, HSV_PINK} | ||
50 | ); | ||
51 | const rgblight_segment_t PROGMEM dp60_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
52 | {25, 1, HSV_ORANGE} | ||
53 | ); | ||
54 | |||
55 | // rgb light layers | ||
56 | const rgblight_segment_t* const PROGMEM dp60_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
57 | dp60_capslock_layer, | ||
58 | dp60_scrolllock_layer, | ||
59 | dp60_numlock_layer, | ||
60 | dp60_layer1_layer, | ||
61 | dp60_layer2_layer, | ||
62 | dp60_layer3_layer, | ||
63 | dp60_layer4_layer, | ||
64 | dp60_layer5_layer | ||
65 | ); | ||
66 | |||
67 | void keyboard_post_init_user(void) { | ||
68 | // Enable the LED layers | ||
69 | rgblight_layers = dp60_rgb_layers; | ||
70 | } | ||
71 | |||
72 | extern rgblight_config_t rgblight_config; | ||
73 | extern void rgblight_layers_write(void); | ||
74 | extern void indicator_write(LED_TYPE *start_led, uint8_t num_leds); | ||
75 | |||
76 | void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) | ||
77 | { | ||
78 | ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM); | ||
79 | |||
80 | indicator_write(start_led + (RGBLED_NUM - RGB_INDICATOR_NUM), RGB_INDICATOR_NUM); | ||
81 | } | ||
82 | |||
83 | bool led_update_kb(led_t led_state) { | ||
84 | bool res = led_update_user(led_state); | ||
85 | if (res) { | ||
86 | rgblight_set_layer_state(0, led_state.caps_lock); | ||
87 | rgblight_set_layer_state(1, led_state.scroll_lock); | ||
88 | rgblight_set_layer_state(2, led_state.num_lock); | ||
89 | } | ||
90 | return res; | ||
91 | } | ||
92 | |||
93 | layer_state_t layer_state_set_kb(layer_state_t state) { | ||
94 | state = layer_state_set_user(state); | ||
95 | rgblight_set_layer_state(3, layer_state_cmp(state, 1)); | ||
96 | rgblight_set_layer_state(4, layer_state_cmp(state, 2)); | ||
97 | rgblight_set_layer_state(5, layer_state_cmp(state, 3)); | ||
98 | rgblight_set_layer_state(6, layer_state_cmp(state, 4)); | ||
99 | rgblight_set_layer_state(7, layer_state_cmp(state, 5)); | ||
100 | return state; | ||
101 | } | ||
diff --git a/keyboards/dp60/keymaps/indicator/keymap.c b/keyboards/dp60/keymaps/indicator/keymap.c new file mode 100644 index 000000000..170d4eb95 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/keymap.c | |||
@@ -0,0 +1,32 @@ | |||
1 | /** | ||
2 | * keymap.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_60_hhkb( | ||
20 | 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_BSLS, KC_GRV, | ||
21 | 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_BSPC, | ||
22 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, | ||
23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), | ||
24 | KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT,KC_RGUI ), | ||
25 | |||
26 | [1] = LAYOUT_60_hhkb( | ||
27 | _______, 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_PSCR, | ||
28 | RESET, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
29 | KC_CAPS, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, | ||
30 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
31 | _______,_______, _______, _______,_______), | ||
32 | }; | ||
diff --git a/keyboards/dp60/keymaps/indicator/led_driver.c b/keyboards/dp60/keymaps/indicator/led_driver.c new file mode 100644 index 000000000..2a1ac5a38 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/led_driver.c | |||
@@ -0,0 +1,26 @@ | |||
1 | /** | ||
2 | * led_driver.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 | #undef RGB_DI_PIN | ||
18 | #define RGB_DI_PIN RGB_INDICATOR_PIN | ||
19 | #define ws2812_setleds indicator_setleds | ||
20 | #define ws2812_setleds_pin indicator_setleds_pin | ||
21 | #include "ws2812.c" | ||
22 | |||
23 | void indicator_write(LED_TYPE *start_led, uint8_t num_leds) | ||
24 | { | ||
25 | indicator_setleds(start_led, num_leds); | ||
26 | } | ||
diff --git a/keyboards/dp60/keymaps/indicator/readme.md b/keyboards/dp60/keymaps/indicator/readme.md new file mode 100644 index 000000000..bb3fbbbe0 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/readme.md | |||
@@ -0,0 +1,10 @@ | |||
1 | |||
2 | Indicator RGB leds support for the open source viper/eagle fr4 [plate](https://github.com/yulei/viper_plate.git) | ||
3 | |||
4 | Three wires need to be soldered: | ||
5 | |||
6 | B1 pin (SCLK at the board) to the plate's D pin | ||
7 | |||
8 | VCC to plate's V | ||
9 | |||
10 | GND to plate's G | ||
diff --git a/keyboards/dp60/keymaps/indicator/rules.mk b/keyboards/dp60/keymaps/indicator/rules.mk new file mode 100644 index 000000000..a8891659f --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/rules.mk | |||
@@ -0,0 +1,4 @@ | |||
1 | |||
2 | RGBLIGHT_ENABLE = yes # Use RGB underglow light | ||
3 | |||
4 | SRC += indicator.c led_driver.c | ||
diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c new file mode 100644 index 000000000..5f2b00727 --- /dev/null +++ b/keyboards/dp60/keymaps/via/keymap.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /** | ||
2 | * keymap.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_all( | ||
20 | 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_DEL, KC_BSPC, | ||
21 | 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, | ||
22 | 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_NUHS, KC_ENT, | ||
23 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), | ||
24 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI,KC_RALT, MO(1), KC_RCTL), | ||
25 | |||
26 | [1] = LAYOUT_all( | ||
27 | 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,_______,KC_DEL, | ||
28 | RESET, _______,KC_UP,_______,_______,_______,_______,_______,KC_PAUS,KC_SLCK,KC_PSCR,KC_PGUP,_______,KC_INS, | ||
29 | _______, KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______, _______,_______,KC_HOME,KC_END,_______, _______, | ||
30 | _______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGDN,_______,_______, | ||
31 | _______,_______,_______, _______, _______,MO(2),TG(0),_______), | ||
32 | |||
33 | [2] = LAYOUT_all( | ||
34 | _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______, | ||
35 | _______, _______,KC_VOLU,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
36 | KC_MUTE, KC_MPRV,KC_VOLD,KC_MNXT,_______,_______,_______,_______, _______,_______,_______,_______,_______, _______, | ||
37 | _______, _______, RGB_TOG,RGB_MOD,RGB_RMOD,RGB_VAI,RGB_VAD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,_______,_______,_______, | ||
38 | _______,_______,_______, KC_MPLY, _______,_______,_______,_______), | ||
39 | |||
40 | [3] = LAYOUT_all( | ||
41 | _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______, | ||
42 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
43 | _______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, | ||
44 | _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
45 | _______,_______,_______, _______, _______,_______,_______,_______) | ||
46 | }; | ||
diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk new file mode 100644 index 000000000..e4b4d91da --- /dev/null +++ b/keyboards/dp60/keymaps/via/rules.mk | |||
@@ -0,0 +1,3 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | LTO_ENABLE = yes | ||
3 | RGBLIGHT_ENABLE = yes #enables underglow, but will not disable per key leds | ||
diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c new file mode 100644 index 000000000..a9974757d --- /dev/null +++ b/keyboards/dp60/matrix.c | |||
@@ -0,0 +1,260 @@ | |||
1 | /** | ||
2 | * matrix.c | ||
3 | * | ||
4 | Copyright 2020 astro <[email protected]> | ||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
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 "quantum.h" | ||
17 | |||
18 | static uint8_t debouncing = DEBOUNCE; | ||
19 | |||
20 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
21 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | ||
22 | |||
23 | static uint8_t read_rows(void); | ||
24 | static void init_rows(void); | ||
25 | static void init_cols(void); | ||
26 | static void unselect_cols(void); | ||
27 | static void select_col(uint8_t col); | ||
28 | |||
29 | |||
30 | __attribute__ ((weak)) | ||
31 | void matrix_init_kb(void) | ||
32 | { | ||
33 | matrix_init_user(); | ||
34 | } | ||
35 | |||
36 | __attribute__ ((weak)) | ||
37 | void matrix_scan_kb(void) | ||
38 | { | ||
39 | matrix_scan_user(); | ||
40 | } | ||
41 | |||
42 | __attribute__ ((weak)) | ||
43 | void matrix_init_user(void) {} | ||
44 | |||
45 | __attribute__ ((weak)) | ||
46 | void matrix_scan_user(void) {} | ||
47 | |||
48 | void matrix_init(void) | ||
49 | { | ||
50 | //setPinOutput(F0); | ||
51 | //writePinHigh(F0); | ||
52 | setPinOutput(B4); | ||
53 | writePinLow(B4); | ||
54 | |||
55 | init_cols(); | ||
56 | init_rows(); | ||
57 | |||
58 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
59 | matrix[i] = 0; | ||
60 | matrix_debouncing[i] = 0; | ||
61 | } | ||
62 | |||
63 | matrix_init_quantum(); | ||
64 | } | ||
65 | |||
66 | uint8_t matrix_scan(void) | ||
67 | { | ||
68 | for (uint8_t col = 0; col < MATRIX_COLS; col++) { | ||
69 | select_col(col); | ||
70 | _delay_us(3); | ||
71 | |||
72 | uint8_t rows = read_rows(); | ||
73 | |||
74 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
75 | bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); | ||
76 | bool curr_bit = rows & (1<<row); | ||
77 | if (prev_bit != curr_bit) { | ||
78 | matrix_debouncing[row] ^= ((matrix_row_t)1<<col); | ||
79 | debouncing = DEBOUNCE; | ||
80 | } | ||
81 | } | ||
82 | unselect_cols(); | ||
83 | } | ||
84 | |||
85 | if (debouncing) { | ||
86 | if (--debouncing) { | ||
87 | _delay_ms(1); | ||
88 | } else { | ||
89 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
90 | matrix[i] = matrix_debouncing[i]; | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | |||
95 | matrix_scan_quantum(); | ||
96 | return 1; | ||
97 | } | ||
98 | |||
99 | inline matrix_row_t matrix_get_row(uint8_t row) | ||
100 | { | ||
101 | return matrix[row]; | ||
102 | } | ||
103 | |||
104 | void matrix_print(void) | ||
105 | { | ||
106 | print("\nr/c 0123456789ABCDEF\n"); | ||
107 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
108 | xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); | ||
109 | } | ||
110 | } | ||
111 | |||
112 | /* | ||
113 | * Row pin configuration | ||
114 | * row: 0 1 2 3 4 | ||
115 | * pin: PE6 PF6 PF7 PB7 PD4 | ||
116 | */ | ||
117 | static void init_rows(void) | ||
118 | { | ||
119 | setPinInputHigh(E6); | ||
120 | setPinInputHigh(F6); | ||
121 | setPinInputHigh(F7); | ||
122 | setPinInputHigh(B7); | ||
123 | setPinInputHigh(D4); | ||
124 | } | ||
125 | |||
126 | static uint8_t read_rows() | ||
127 | { | ||
128 | return ((readPin(E6) ? 0 : (1 << 0)) | | ||
129 | (readPin(F6) ? 0 : (1 << 1)) | | ||
130 | (readPin(F7) ? 0 : (1 << 2)) | | ||
131 | (readPin(B7) ? 0 : (1 << 3)) | | ||
132 | (readPin(D4) ? 0 : (1 << 4))); | ||
133 | } | ||
134 | |||
135 | /* | ||
136 | * Columns 0 - 13 | ||
137 | * These columns uses two 74LVC138 3 to 8 bit demultiplexers. | ||
138 | * EN Pin, PF5, PD6 | ||
139 | * | ||
140 | * col / pin: PF0 PF1 PF4 | ||
141 | * 0: 0 0 0 | ||
142 | * 1: 1 0 0 | ||
143 | * 2: 0 1 0 | ||
144 | * 3: 1 1 0 | ||
145 | * 4: 0 0 1 | ||
146 | * 5: 1 0 1 | ||
147 | * 6: 0 1 1 | ||
148 | * PD2 PD3 PD5 | ||
149 | * 7: 0 0 0 | ||
150 | * 8: 1 0 0 | ||
151 | * 9: 0 1 0 | ||
152 | * 10: 1 1 0 | ||
153 | * 11: 0 0 1 | ||
154 | * 12: 1 0 1 | ||
155 | * 13: 0 1 1 | ||
156 | * | ||
157 | */ | ||
158 | static void init_cols(void) | ||
159 | { | ||
160 | setPinOutput(F0); | ||
161 | setPinOutput(F1); | ||
162 | setPinOutput(F4); | ||
163 | setPinOutput(F5); | ||
164 | |||
165 | setPinOutput(D2); | ||
166 | setPinOutput(D3); | ||
167 | setPinOutput(D5); | ||
168 | setPinOutput(D6); | ||
169 | |||
170 | unselect_cols(); | ||
171 | } | ||
172 | |||
173 | static void unselect_cols(void) | ||
174 | { | ||
175 | writePinHigh(F0); | ||
176 | writePinHigh(F1); | ||
177 | writePinHigh(F4); | ||
178 | writePinHigh(F5); | ||
179 | |||
180 | writePinHigh(D2); | ||
181 | writePinHigh(D3); | ||
182 | writePinHigh(D5); | ||
183 | writePinHigh(D6); | ||
184 | } | ||
185 | |||
186 | static void select_col(uint8_t col) { | ||
187 | |||
188 | switch (col) { | ||
189 | case 0: | ||
190 | writePinLow(F0); | ||
191 | writePinLow(F1); | ||
192 | writePinLow(F4); | ||
193 | break; | ||
194 | case 1: | ||
195 | writePinHigh(F0); | ||
196 | writePinLow(F1); | ||
197 | writePinLow(F4); | ||
198 | break; | ||
199 | case 2: | ||
200 | writePinLow(F0); | ||
201 | writePinHigh(F1); | ||
202 | writePinLow(F4); | ||
203 | break; | ||
204 | case 3: | ||
205 | writePinHigh(F0); | ||
206 | writePinHigh(F1); | ||
207 | writePinLow(F4); | ||
208 | break; | ||
209 | case 4: | ||
210 | writePinLow(F0); | ||
211 | writePinLow(F1); | ||
212 | writePinHigh(F4); | ||
213 | break; | ||
214 | case 5: | ||
215 | writePinHigh(F0); | ||
216 | writePinLow(F1); | ||
217 | writePinHigh(F4); | ||
218 | break; | ||
219 | case 6: | ||
220 | writePinLow(F0); | ||
221 | writePinHigh(F1); | ||
222 | writePinHigh(F4); | ||
223 | break; | ||
224 | case 7: | ||
225 | writePinLow(D2); | ||
226 | writePinLow(D3); | ||
227 | writePinLow(D5); | ||
228 | break; | ||
229 | case 8: | ||
230 | writePinHigh(D2); | ||
231 | writePinLow(D3); | ||
232 | writePinLow(D5); | ||
233 | break; | ||
234 | case 9: | ||
235 | writePinLow(D2); | ||
236 | writePinHigh(D3); | ||
237 | writePinLow(D5); | ||
238 | break; | ||
239 | case 10: | ||
240 | writePinHigh(D2); | ||
241 | writePinHigh(D3); | ||
242 | writePinLow(D5); | ||
243 | break; | ||
244 | case 11: | ||
245 | writePinLow(D2); | ||
246 | writePinLow(D3); | ||
247 | writePinHigh(D5); | ||
248 | break; | ||
249 | case 12: | ||
250 | writePinHigh(D2); | ||
251 | writePinLow(D3); | ||
252 | writePinHigh(D5); | ||
253 | break; | ||
254 | case 13: | ||
255 | writePinLow(D2); | ||
256 | writePinHigh(D3); | ||
257 | writePinHigh(D5); | ||
258 | break; | ||
259 | } | ||
260 | } | ||
diff --git a/keyboards/dp60/readme.md b/keyboards/dp60/readme.md new file mode 100644 index 000000000..d1ea24d60 --- /dev/null +++ b/keyboards/dp60/readme.md | |||
@@ -0,0 +1,13 @@ | |||
1 | # DP60 | ||
2 | |||
3 | A full RGB PCB with BLE for 60% keybaord | ||
4 | |||
5 | Keyboard Maintainer: [astro](https://github.com/yulei) | ||
6 | Hardware Supported: DP60 PCB | ||
7 | Hardware Availability: Limited GB | ||
8 | |||
9 | Make example for this keyboard (after setting up your build environment): | ||
10 | |||
11 | make dp60:default | ||
12 | |||
13 | 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). \ No newline at end of file | ||
diff --git a/keyboards/dp60/rules.mk b/keyboards/dp60/rules.mk new file mode 100644 index 000000000..8acc7d85d --- /dev/null +++ b/keyboards/dp60/rules.mk | |||
@@ -0,0 +1,25 @@ | |||
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 = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | AUDIO_ENABLE = no # Audio output | ||
18 | RGBLIGHT_ENABLE = no # Use RGB underglow light | ||
19 | RGB_MATRIX_ENABLE = yes | ||
20 | RGB_MATRIX_DRIVER = IS31FL3731 # Use RGB matrix | ||
21 | |||
22 | LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift | ||
23 | |||
24 | CUSTOM_MATRIX = yes | ||
25 | SRC += matrix.c | ||