diff options
author | Steven Nguyen <steven7c8@gmail.com> | 2021-02-27 21:30:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 16:30:28 +1100 |
commit | ec06ffe294c1f64d4214b9a5142428c17f83ef6e (patch) | |
tree | 592f626a2d42ee33145690e038142808b4dbb73a /keyboards/7c8 | |
parent | 03ea478f205e37419032c15c16143c17a5d2b5ae (diff) | |
download | qmk_firmware-ec06ffe294c1f64d4214b9a5142428c17f83ef6e.tar.gz qmk_firmware-ec06ffe294c1f64d4214b9a5142428c17f83ef6e.zip |
Add keyboard: 7c8/Framework (#11593)
* Add 7c8/framework keyboard
* Update VIA framework.json definition
* Code cleanup and styling to conform to QMK style guide
* Code cleanup and moving some keymap definitions to a 'steven' keymap in order to create a cleaner default keymap for other users
* Update keyboards/7c8/framework/config.h
Remove #define DESCRIPTION
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Update keyboards/7c8/framework/config.h
remove #define UNUSED_PINS
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Update keyboards/7c8/framework/framework.h
Change layout name to existing layout name.
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Update keyboards/7c8/framework/framework.h
Change layout name to existing layout name.
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Update keyboards/7c8/framework/framework.h
Change layout name to existing layout name.
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Update keyboards/7c8/framework/keymaps/via/keymap.c
change biton32 to get_highest_layer
Co-authored-by: Drashna Jaelre <drashna@live.com>
* change vendor ID from 0x07c8 to 0x77c8, which is unused
* delete VIA .json definition from via keymap folder
* Change framework_grid to LAYOUT_ortho_5x12 in default keymap.c
* remove framework.json from 'steven' keymap folder
* cleanup
* Update keyboards/7c8/framework/config.h
0x77c8 -> 0x77C8
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/7c8')
-rw-r--r-- | keyboards/7c8/framework/config.h | 40 | ||||
-rw-r--r-- | keyboards/7c8/framework/framework.c | 17 | ||||
-rw-r--r-- | keyboards/7c8/framework/framework.h | 98 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/default/keymap.c | 156 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/steven/config.h | 23 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/steven/keymap.c | 129 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/steven/readme.md | 3 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/steven/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/via/config.h | 23 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/via/keymap.c | 90 | ||||
-rw-r--r-- | keyboards/7c8/framework/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/7c8/framework/readme.md | 30 | ||||
-rw-r--r-- | keyboards/7c8/framework/rules.mk | 20 |
13 files changed, 631 insertions, 0 deletions
diff --git a/keyboards/7c8/framework/config.h b/keyboards/7c8/framework/config.h new file mode 100644 index 000000000..44a69bf4e --- /dev/null +++ b/keyboards/7c8/framework/config.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | #include "config_common.h" | ||
19 | |||
20 | #define VENDOR_ID 0x77C8 | ||
21 | #define PRODUCT_ID 0x0001 | ||
22 | #define DEVICE_VER 0x0000 | ||
23 | #define MANUFACTURER 7c8 | ||
24 | #define PRODUCT Framework | ||
25 | |||
26 | #define MATRIX_ROWS 10 | ||
27 | #define MATRIX_COLS 6 | ||
28 | |||
29 | #define MATRIX_ROW_PINS { B0, B1, D7, B2, D6, B3, D5, B4, D4, B5 } | ||
30 | #define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 } | ||
31 | #define ENCODERS_PAD_A { D0 } | ||
32 | #define ENCODERS_PAD_B { D1 } | ||
33 | |||
34 | #define ENCODER_RESOLUTION 4 | ||
35 | #define TAP_CODE_DELAY 16 | ||
36 | #define DIODE_DIRECTION COL2ROW | ||
37 | #define DEBOUNCE 5 | ||
38 | |||
39 | #define LEADER_TIMEOUT 250 | ||
40 | #define LEADER_PER_KEY_TIMING 150 | ||
diff --git a/keyboards/7c8/framework/framework.c b/keyboards/7c8/framework/framework.c new file mode 100644 index 000000000..6ce105be9 --- /dev/null +++ b/keyboards/7c8/framework/framework.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 "framework.h" | ||
diff --git a/keyboards/7c8/framework/framework.h b/keyboards/7c8/framework/framework.h new file mode 100644 index 000000000..8de283751 --- /dev/null +++ b/keyboards/7c8/framework/framework.h | |||
@@ -0,0 +1,98 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | #include "quantum.h" | ||
19 | |||
20 | #define ___ KC_NO | ||
21 | |||
22 | #define LAYOUT_ortho_5x12( \ | ||
23 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ | ||
24 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ | ||
25 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ | ||
26 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, \ | ||
27 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b \ | ||
28 | ) { \ | ||
29 | { K00, K01, K02, K03, K04, K05 }, \ | ||
30 | { K06, K07, K08, K09, K0a, K0b }, \ | ||
31 | { K10, K11, K12, K13, K14, K15 }, \ | ||
32 | { K16, K17, K18, K19, K1a, K1b }, \ | ||
33 | { K20, K21, K22, K23, K24, K25 }, \ | ||
34 | { K26, K27, K28, K29, K2a, K2b }, \ | ||
35 | { K30, K31, K32, K33, K34, K35 }, \ | ||
36 | { K36, K37, K38, K39, K3a, K3b }, \ | ||
37 | { K40, K41, K42, K43, K44, K45 }, \ | ||
38 | { K46, K47, K48, K49, K4a, K4b } \ | ||
39 | } | ||
40 | |||
41 | #define LAYOUT_ortho_5x12_1x2uC( \ | ||
42 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ | ||
43 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ | ||
44 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ | ||
45 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, \ | ||
46 | K40, K41, K42, K43, K44, K45, K47, K48, K49, K4a, K4b \ | ||
47 | ) { \ | ||
48 | { K00, K01, K02, K03, K04, K05 }, \ | ||
49 | { K06, K07, K08, K09, K0a, K0b }, \ | ||
50 | { K10, K11, K12, K13, K14, K15 }, \ | ||
51 | { K16, K17, K18, K19, K1a, K1b }, \ | ||
52 | { K20, K21, K22, K23, K24, K25 }, \ | ||
53 | { K26, K27, K28, K29, K2a, K2b }, \ | ||
54 | { K30, K31, K32, K33, K34, K35 }, \ | ||
55 | { K36, K37, K38, K39, K3a, K3b }, \ | ||
56 | { K40, K41, K42, K43, K44, K45 }, \ | ||
57 | { ___, K47, K48, K49, K4a, K4b } \ | ||
58 | } | ||
59 | |||
60 | #define LAYOUT_preonic_2x2u( \ | ||
61 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ | ||
62 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ | ||
63 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ | ||
64 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, \ | ||
65 | K40, K41, K42, K43, K45, K46, K48, K49, K4a, K4b \ | ||
66 | ) { \ | ||
67 | { K00, K01, K02, K03, K04, K05 }, \ | ||
68 | { K06, K07, K08, K09, K0a, K0b }, \ | ||
69 | { K10, K11, K12, K13, K14, K15 }, \ | ||
70 | { K16, K17, K18, K19, K1a, K1b }, \ | ||
71 | { K20, K21, K22, K23, K24, K25 }, \ | ||
72 | { K26, K27, K28, K29, K2a, K2b }, \ | ||
73 | { K30, K31, K32, K33, K34, K35 }, \ | ||
74 | { K36, K37, K38, K39, K3a, K3b }, \ | ||
75 | { K40, K41, K42, K43, ___, K45 }, \ | ||
76 | { K46, ___, K48, K49, K4a, K4b } \ | ||
77 | } | ||
78 | |||
79 | #define framework_via( \ | ||
80 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ | ||
81 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ | ||
82 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ | ||
83 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, \ | ||
84 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, \ | ||
85 | K50, K51 \ | ||
86 | ) { \ | ||
87 | { K00, K01, K02, K03, K04, K05 }, \ | ||
88 | { K06, K07, K08, K09, K0a, K0b }, \ | ||
89 | { K10, K11, K12, K13, K14, K15 }, \ | ||
90 | { K16, K17, K18, K19, K1a, K1b }, \ | ||
91 | { K20, K21, K22, K23, K24, K25 }, \ | ||
92 | { K26, K27, K28, K29, K2a, K2b }, \ | ||
93 | { K30, K31, K32, K33, K34, K35 }, \ | ||
94 | { K36, K37, K38, K39, K3a, K3b }, \ | ||
95 | { K40, K41, K42, K43, K44, K45 }, \ | ||
96 | { K46, K47, K48, K49, K4a, K4b }, \ | ||
97 | { K50, K51 } \ | ||
98 | } | ||
diff --git a/keyboards/7c8/framework/keymaps/default/keymap.c b/keyboards/7c8/framework/keymaps/default/keymap.c new file mode 100644 index 000000000..57dbbfee0 --- /dev/null +++ b/keyboards/7c8/framework/keymaps/default/keymap.c | |||
@@ -0,0 +1,156 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | enum framework_layers { | ||
20 | _BASE, | ||
21 | _LOWER, | ||
22 | _RAISE, | ||
23 | _BOTH, | ||
24 | _FN | ||
25 | }; | ||
26 | |||
27 | enum framework_keycodes { | ||
28 | LOWER = SAFE_RANGE, | ||
29 | RAISE, | ||
30 | BOTH, | ||
31 | FN | ||
32 | }; | ||
33 | |||
34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
35 | [_BASE] = LAYOUT_ortho_5x12( | ||
36 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MEDIA_PLAY_PAUSE, | ||
37 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
38 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
39 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
40 | KC_LCTL, KC_LGUI, KC_LALT, FN, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
41 | ), | ||
42 | |||
43 | [_LOWER] = LAYOUT_ortho_5x12( | ||
44 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, | ||
45 | KC_LEAD, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, | ||
46 | KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, | ||
47 | KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END | ||
49 | ), | ||
50 | |||
51 | [_RAISE] = LAYOUT_ortho_5x12( | ||
52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
53 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
56 | _______, _______, _______, _______, KC_TRNS, _______, _______, KC_TRNS, _______, _______, _______, _______ | ||
57 | ), | ||
58 | |||
59 | [_BOTH] = LAYOUT_ortho_5x12( | ||
60 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
61 | _______, LALT(KC_F4), _______, KC_MYCM, LGUI(KC_R), _______, _______, _______, _______, _______, _______, _______, | ||
62 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DEBUG | ||
65 | ), | ||
66 | |||
67 | [_FN] = LAYOUT_ortho_5x12( | ||
68 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
69 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
70 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
71 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
73 | ) | ||
74 | }; | ||
75 | |||
76 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
77 | if (index == 0) { | ||
78 | switch (get_highest_layer(layer_state)) { | ||
79 | case _BASE: | ||
80 | if (clockwise) { | ||
81 | tap_code(KC_AUDIO_VOL_UP); | ||
82 | } else { | ||
83 | tap_code(KC_AUDIO_VOL_DOWN); | ||
84 | } | ||
85 | break; | ||
86 | |||
87 | case _LOWER: | ||
88 | if (clockwise) { | ||
89 | tap_code16(LCTL(KC_TAB)); | ||
90 | } else { | ||
91 | tap_code16(LCTL(LSFT(KC_TAB))); | ||
92 | } | ||
93 | break; | ||
94 | |||
95 | case _RAISE: | ||
96 | if (clockwise) { | ||
97 | tap_code16(LCTL(KC_RGHT)); | ||
98 | } else { | ||
99 | tap_code16(LCTL(KC_LEFT)); | ||
100 | } | ||
101 | break; | ||
102 | |||
103 | case _BOTH: | ||
104 | if (clockwise) { | ||
105 | tap_code16(LCTL(KC_Y)); | ||
106 | } else { | ||
107 | tap_code16(LCTL(KC_Z)); | ||
108 | } | ||
109 | break; | ||
110 | |||
111 | case _FN: | ||
112 | if (clockwise) { | ||
113 | tap_code(_______); | ||
114 | } else { | ||
115 | tap_code(_______); | ||
116 | } | ||
117 | break; | ||
118 | |||
119 | default: | ||
120 | break; | ||
121 | } | ||
122 | } | ||
123 | } | ||
124 | |||
125 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
126 | switch (keycode) { | ||
127 | case LOWER: | ||
128 | if (record->event.pressed) { | ||
129 | layer_on(_LOWER); | ||
130 | update_tri_layer(_LOWER, _RAISE, _BOTH); | ||
131 | } else { | ||
132 | layer_off(_LOWER); | ||
133 | update_tri_layer(_LOWER, _RAISE, _BOTH); | ||
134 | } | ||
135 | return false; | ||
136 | |||
137 | case RAISE: | ||
138 | if (record->event.pressed) { | ||
139 | layer_on(_RAISE); | ||
140 | update_tri_layer(_LOWER, _RAISE, _BOTH); | ||
141 | } else { | ||
142 | layer_off(_RAISE); | ||
143 | update_tri_layer(_LOWER, _RAISE, _BOTH); | ||
144 | } | ||
145 | return false; | ||
146 | |||
147 | case FN: | ||
148 | if (record->event.pressed) { | ||
149 | layer_on(_FN); | ||
150 | } else { | ||
151 | layer_off(_FN); | ||
152 | } | ||
153 | return false; | ||
154 | } | ||
155 | return true; | ||
156 | } | ||
diff --git a/keyboards/7c8/framework/keymaps/steven/config.h b/keyboards/7c8/framework/keymaps/steven/config.h new file mode 100644 index 000000000..2dfd41f7c --- /dev/null +++ b/keyboards/7c8/framework/keymaps/steven/config.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | /* VIA specific defines to increase dynamic layer count */ | ||
18 | #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 3 | ||
19 | #define DYNAMIC_KEYMAP_LAYER_COUNT 5 | ||
20 | |||
21 | /* defining an extra row for encoder assignment in VIA */ | ||
22 | #undef MATRIX_ROWS | ||
23 | #define MATRIX_ROWS 11 \ No newline at end of file | ||
diff --git a/keyboards/7c8/framework/keymaps/steven/keymap.c b/keyboards/7c8/framework/keymaps/steven/keymap.c new file mode 100644 index 000000000..be279f107 --- /dev/null +++ b/keyboards/7c8/framework/keymaps/steven/keymap.c | |||
@@ -0,0 +1,129 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | enum framework_layers { | ||
20 | _BASE, | ||
21 | _LOWER, | ||
22 | _RAISE, | ||
23 | _BOTH, | ||
24 | _FN | ||
25 | }; | ||
26 | |||
27 | enum framework_keycodes { | ||
28 | LOWER = SAFE_RANGE, | ||
29 | RAISE, | ||
30 | BOTH, | ||
31 | FN | ||
32 | }; | ||
33 | |||
34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
35 | [_BASE] = framework_via( | ||
36 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MEDIA_PLAY_PAUSE, | ||
37 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
38 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
39 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
40 | KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, | ||
41 | KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP | ||
42 | ), | ||
43 | |||
44 | [_LOWER] = framework_via( | ||
45 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, | ||
46 | KC_LEAD, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, | ||
47 | KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, | ||
48 | _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, | ||
49 | _______, _______, _______, _______, _______, _______, _______, MO(_BOTH), KC_HOME, KC_PGDN, KC_PGUP, KC_END, | ||
50 | C(S(KC_TAB)), C(KC_TAB) | ||
51 | ), | ||
52 | |||
53 | [_RAISE] = framework_via( | ||
54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
58 | _______, _______, _______, _______, MO(_BOTH), _______, _______, _______, _______, _______, _______, _______, | ||
59 | C(KC_LEFT), C(KC_RIGHT) | ||
60 | ), | ||
61 | |||
62 | [_BOTH] = framework_via( | ||
63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
67 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, DEBUG, | ||
68 | C(KC_Z), C(KC_Y) | ||
69 | ), | ||
70 | |||
71 | [_FN] = framework_via( | ||
72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
76 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
77 | KC_MS_WH_LEFT, KC_MS_WH_RIGHT | ||
78 | ) | ||
79 | }; | ||
80 | |||
81 | LEADER_EXTERNS(); | ||
82 | |||
83 | void matrix_scan_user(void) { | ||
84 | LEADER_DICTIONARY() { | ||
85 | leading = false; | ||
86 | leader_end(); | ||
87 | |||
88 | // qq, alt+f4 close window | ||
89 | SEQ_TWO_KEYS(KC_Q, KC_Q) { | ||
90 | tap_code16(A(KC_F4)); | ||
91 | } | ||
92 | |||
93 | // ee, open explorer | ||
94 | SEQ_TWO_KEYS(KC_E, KC_E) { | ||
95 | tap_code16(G(KC_E)); | ||
96 | } | ||
97 | |||
98 | // rr, windows run prompt | ||
99 | SEQ_TWO_KEYS(KC_R, KC_R) { | ||
100 | tap_code16(G(KC_R)); | ||
101 | } | ||
102 | |||
103 | // ww, maximize window | ||
104 | SEQ_TWO_KEYS(KC_W, KC_W) { | ||
105 | tap_code16(G(KC_UP)); | ||
106 | } | ||
107 | |||
108 | // ss, minimize window | ||
109 | SEQ_TWO_KEYS(KC_S, KC_S) { | ||
110 | tap_code16(G(KC_DOWN)); | ||
111 | } | ||
112 | |||
113 | // <space><space>, toggle desktop | ||
114 | SEQ_TWO_KEYS(KC_SPC, KC_SPC) { | ||
115 | tap_code16(G(KC_D)); | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | |||
120 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
121 | uint8_t layer = get_highest_layer(layer_state); | ||
122 | if (index == 0) { | ||
123 | if (clockwise) { | ||
124 | tap_code16(dynamic_keymap_get_keycode(layer, 10, 1)); | ||
125 | } else { | ||
126 | tap_code16(dynamic_keymap_get_keycode(layer, 10, 0)); | ||
127 | } | ||
128 | } | ||
129 | } \ No newline at end of file | ||
diff --git a/keyboards/7c8/framework/keymaps/steven/readme.md b/keyboards/7c8/framework/keymaps/steven/readme.md new file mode 100644 index 000000000..c300961c7 --- /dev/null +++ b/keyboards/7c8/framework/keymaps/steven/readme.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # Steven's Framework layout | ||
2 | |||
3 | This is a VIA compatible layout, exactly like the default VIA keymap, but with some leader key sequences that I find convenient. \ No newline at end of file | ||
diff --git a/keyboards/7c8/framework/keymaps/steven/rules.mk b/keyboards/7c8/framework/keymaps/steven/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/7c8/framework/keymaps/steven/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/7c8/framework/keymaps/via/config.h b/keyboards/7c8/framework/keymaps/via/config.h new file mode 100644 index 000000000..2dfd41f7c --- /dev/null +++ b/keyboards/7c8/framework/keymaps/via/config.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | /* VIA specific defines to increase dynamic layer count */ | ||
18 | #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 3 | ||
19 | #define DYNAMIC_KEYMAP_LAYER_COUNT 5 | ||
20 | |||
21 | /* defining an extra row for encoder assignment in VIA */ | ||
22 | #undef MATRIX_ROWS | ||
23 | #define MATRIX_ROWS 11 \ No newline at end of file | ||
diff --git a/keyboards/7c8/framework/keymaps/via/keymap.c b/keyboards/7c8/framework/keymaps/via/keymap.c new file mode 100644 index 000000000..a2a353d85 --- /dev/null +++ b/keyboards/7c8/framework/keymaps/via/keymap.c | |||
@@ -0,0 +1,90 @@ | |||
1 | /* Copyright 2020 Steven Nguyen | ||
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 | enum framework_layers { | ||
20 | _BASE, | ||
21 | _LOWER, | ||
22 | _RAISE, | ||
23 | _BOTH, | ||
24 | _FN | ||
25 | }; | ||
26 | |||
27 | enum framework_keycodes { | ||
28 | LOWER = SAFE_RANGE, | ||
29 | RAISE, | ||
30 | BOTH, | ||
31 | FN | ||
32 | }; | ||
33 | |||
34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
35 | [_BASE] = framework_via( | ||
36 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MEDIA_PLAY_PAUSE, | ||
37 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
38 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
39 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
40 | KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, | ||
41 | KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP | ||
42 | ), | ||
43 | |||
44 | [_LOWER] = framework_via( | ||
45 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, | ||
46 | _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, | ||
47 | KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, | ||
48 | _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, | ||
49 | _______, _______, _______, _______, _______, _______, _______, MO(_BOTH), KC_HOME, KC_PGDN, KC_PGUP, KC_END, | ||
50 | C(S(KC_TAB)), C(KC_TAB) | ||
51 | ), | ||
52 | |||
53 | [_RAISE] = framework_via( | ||
54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
58 | _______, _______, _______, _______, MO(_BOTH), _______, _______, _______, _______, _______, _______, _______, | ||
59 | C(KC_LEFT), C(KC_RIGHT) | ||
60 | ), | ||
61 | |||
62 | [_BOTH] = framework_via( | ||
63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
67 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, DEBUG, | ||
68 | C(KC_Z), C(KC_Y) | ||
69 | ), | ||
70 | |||
71 | [_FN] = framework_via( | ||
72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
76 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
77 | KC_MS_WH_LEFT, KC_MS_WH_RIGHT | ||
78 | ) | ||
79 | }; | ||
80 | |||
81 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
82 | uint8_t layer = get_highest_layer(layer_state); | ||
83 | if (index == 0) { | ||
84 | if (clockwise) { | ||
85 | tap_code16(dynamic_keymap_get_keycode(layer, 10, 1)); | ||
86 | } else { | ||
87 | tap_code16(dynamic_keymap_get_keycode(layer, 10, 0)); | ||
88 | } | ||
89 | } | ||
90 | } | ||
diff --git a/keyboards/7c8/framework/keymaps/via/rules.mk b/keyboards/7c8/framework/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/7c8/framework/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/7c8/framework/readme.md b/keyboards/7c8/framework/readme.md new file mode 100644 index 000000000..5f29743aa --- /dev/null +++ b/keyboards/7c8/framework/readme.md | |||
@@ -0,0 +1,30 @@ | |||
1 | # Framework | ||
2 | |||
3 |  | ||
4 | |||
5 | ## Features | ||
6 | |||
7 | * All through-hole components (except Kailh hotswap sockets) | ||
8 | * QMK firmware with VIA support | ||
9 | * Rotary encoder | ||
10 | * Hotswappable switches | ||
11 | * FR-4 and acrylic sandwich construction | ||
12 | * USB Type-C | ||
13 | * Supports MIT (one 2u), grid (two 1u), and two 2u space keys | ||
14 | |||
15 | ## Info | ||
16 | |||
17 | * Keyboard maintainer: [Steven Nguyen](https://github.com/stevennguyen) | ||
18 | * Hardware supported: Framework | ||
19 | * Hardware availability: [Steven Nguyen](https://github.com/stevennguyen) | ||
20 | |||
21 | Make example for this keyboard (after setting up your build environment): | ||
22 | |||
23 | make 7c8/framework:default # default keymap | ||
24 | make 7c8/framework:via # via-compatible keymap | ||
25 | |||
26 | Flashing example for this keyboard: | ||
27 | |||
28 | make 7c8/framework:default:flash | ||
29 | |||
30 | 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/7c8/framework/rules.mk b/keyboards/7c8/framework/rules.mk new file mode 100644 index 000000000..185a5119c --- /dev/null +++ b/keyboards/7c8/framework/rules.mk | |||
@@ -0,0 +1,20 @@ | |||
1 | MCU = atmega328p | ||
2 | BOOTLOADER = USBasp | ||
3 | |||
4 | BOOTMAGIC_ENABLE = no | ||
5 | MOUSEKEY_ENABLE = yes | ||
6 | EXTRAKEY_ENABLE = yes | ||
7 | CONSOLE_ENABLE = no | ||
8 | COMMAND_ENABLE = no | ||
9 | SLEEP_LED_ENABLE = no | ||
10 | NKRO_ENABLE = no | ||
11 | BACKLIGHT_ENABLE = no | ||
12 | RGBLIGHT_ENABLE = no | ||
13 | MIDI_ENABLE = no | ||
14 | UNICODE_ENABLE = no | ||
15 | BLUETOOTH_ENABLE = no | ||
16 | AUDIO_ENABLE = no | ||
17 | FAUXCLICKY_ENABLE = no | ||
18 | LAYOUTS_HAS_RGB = no | ||
19 | ENCODER_ENABLE = yes | ||
20 | LEADER_ENABLE = yes \ No newline at end of file | ||