d69b44e68a3e00a229df860b1f0af01790bf49ca

Author
Will Hedges <36576135+will-hedges@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

refactor bear_face/v1, v2 (#24060)

Co-authored-by: jack <jack@pngu.org>

Diff

This diff is truncated to protect this page.

  1diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json
  2index ad5b1dd7d9d34f73922047e9b35accadb267edf0..90191299d87dee56caf944b7c4215e363178404c 100644
  3--- a/keyboards/bear_face/info.json
  4+++ b/keyboards/bear_face/info.json
  5@@ -1,22 +1,18 @@
  6 {
  7-    "keyboard_name": "bear_face",
  8-    "manufacturer": "chemicalwill",
  9-    "url": "https://github.com/chemicalwill/bear_face_pcb",
 10-    "maintainer": "chemicalwill",
 11-    "debounce": 6,
 12+    "manufacturer": "will-hedges",
 13+    "url": "https://github.com/will-hedges",
 14+    "maintainer": "will-hedges",
 15     "usb": {
 16         "vid": "0xFEED",
 17-        "pid": "0x09F5",
 18-        "force_nkro": true
 19+        "pid": "0x09F5"
 20     },
 21     "features": {
 22         "backlight": true,
 23-        "bootmagic": false,
 24+        "bootmagic": true,
 25         "command": false,
 26         "console": false,
 27         "extrakey": true,
 28-        "mousekey": false,
 29-        "nkro": true
 30+        "mousekey": false
 31     },
 32     "qmk": {
 33         "locking": {
 34@@ -24,16 +20,14 @@
 35             "resync": true
 36         }
 37     },
 38-    "indicators": {
 39-        "caps_lock": "F7"
 40-    },
 41     "matrix_pins": {
 42         "cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"],
 43         "rows": ["F5", "F6", "F4", "F1", "B0", "B6"]
 44     },
 45     "diode_direction": "COL2ROW",
 46     "backlight": {
 47-        "driver": "timer",
 48+        "as_caps_lock": true,
 49+        "driver": "software",
 50         "pin": "F7"
 51     },
 52     "processor": "atmega32u4",
 53diff --git a/keyboards/bear_face/rules.mk b/keyboards/bear_face/rules.mk
 54deleted file mode 100644
 55index f11303978e883646c4b44982f353c77bd572ebc5..0000000000000000000000000000000000000000
 56--- a/keyboards/bear_face/rules.mk
 57+++ /dev/null
 58@@ -1 +0,0 @@
 59-DEFAULT_FOLDER = bear_face/v1
 60diff --git a/keyboards/bear_face/v1/keyboard.json b/keyboards/bear_face/v1/keyboard.json
 61index 8dedc0b1c7b7c10d727ab602a34fe22b03ee05bc..8c60089bbbbe8a2e66259e4b9215bfedcf29f285 100644
 62--- a/keyboards/bear_face/v1/keyboard.json
 63+++ b/keyboards/bear_face/v1/keyboard.json
 64@@ -1,9 +1,13 @@
 65 {
 66+    "keyboard_name": "bear_face v1",
 67     "usb": {
 68         "device_version": "1.0.0"
 69     },
 70+    "backlight": {
 71+        "on_state": 0
 72+    },
 73     "layouts": {
 74-        "LAYOUT_83_ansi": {
 75+        "LAYOUT": {
 76             "layout": [
 77                 {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5},
 78                 {"matrix": [0, 1], "x": 1.5, "y": 0},
 79diff --git a/keyboards/bear_face/v1/keymaps/default/keymap.c b/keyboards/bear_face/v1/keymaps/default/keymap.c
 80index fc92c783dbe4f87359a85a966f1acd4141d19c23..e615a3915d8335b39e8796688da9f2f8456eb984 100644
 81--- a/keyboards/bear_face/v1/keymaps/default/keymap.c
 82+++ b/keyboards/bear_face/v1/keymaps/default/keymap.c
 83@@ -1,19 +1,5 @@
 84-/*
 85-Copyright 2020 chemicalwill <https://github.com/chemicalwill>
 86-
 87-This program is free software: you can redistribute it and/or modify
 88-it under the terms of the GNU General Public License as published by
 89-the Free Software Foundation, either version 2 of the License, or
 90-(at your option) any later version.
 91-
 92-This program is distributed in the hope that it will be useful,
 93-but WITHOUT ANY WARRANTY; without even the implied warranty of
 94-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 95-GNU General Public License for more details.
 96-
 97-You should have received a copy of the GNU General Public License
 98-along with this program.  If not, see <http://www.gnu.org/licenses/>.
 99-*/
100+/* Copyright 2024 will-hedges */
101+/* SPDX-License-Identifier: GPL-2.0-or-later */
102 
103 #include QMK_KEYBOARD_H
104 
105@@ -28,13 +14,13 @@ enum layers {
106 
107 //custom keycode enums
108 enum custom_keycodes {
109-    BASE_QWER = SAFE_RANGE,
110+    BASE_QWER = QK_USER,
111     BASE_COLE,
112     BASE_DVOR
113 };
114 
115 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
116-    [_QWER] = LAYOUT_83_ansi(
117+    [_QWER] = LAYOUT(
118         KC_ESC,   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_NO,   KC_DEL,
119         KC_GRV,   KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,     KC_MINS, KC_EQL,  KC_BSPC, KC_HOME,
120         KC_TAB,   KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,     KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
121@@ -43,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
122         KC_LCTL,  KC_LGUI, KC_LALT,                   KC_SPC,                             KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
123     ),
124 
125-    [_COLE] = LAYOUT_83_ansi(
126+    [_COLE] = LAYOUT(
127         KC_ESC,  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_NO,   KC_DEL,
128         KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,     KC_MINS, KC_EQL,  KC_BSPC, KC_HOME,
129         KC_TAB,  KC_Q,    KC_W,    KC_F,    KC_P,    KC_G,    KC_J,    KC_L,    KC_U,    KC_Y,    KC_SCLN,  KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
130@@ -52,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
131         KC_LCTL, KC_LGUI, KC_LALT,                   KC_SPC,                             KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
132     ),
133 
134-    [_DVOR] = LAYOUT_83_ansi(
135+    [_DVOR] = LAYOUT(
136         KC_ESC,   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_NO,   KC_DEL,
137         KC_GRV,   KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,     KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME,
138         KC_TAB,   KC_QUOT, KC_COMM, KC_DOT,  KC_P,    KC_Y,    KC_F,    KC_G,    KC_C,    KC_R,    KC_L,     KC_SLSH, KC_EQL,  KC_BSLS, KC_PGUP,
139@@ -61,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
140         KC_LCTL,  KC_LGUI, KC_LALT,                   KC_SPC,                             KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
141     ),
142 
143-    [_FN1] = LAYOUT_83_ansi(
144+    [_FN1] = LAYOUT(
145         _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, KC_INS,
146         _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER,
147         _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, BASE_COLE,
148@@ -71,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
149     ),
150 
151 /*
152-    [_BLANK] = LAYOUT_83_ansi(
153+    [_BLANK] = LAYOUT(
154         _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
155         _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
156         _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
157@@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
158 */
159 };
160 
161-//macros to allow the user to set whatever default layer they want, even after reboot
162 
163+// macros to allow the user to set whatever default layer they want, even after reboot
164 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
165     switch (keycode) {
166         case BASE_QWER:
167diff --git a/keyboards/bear_face/v2/keyboard.json b/keyboards/bear_face/v2/keyboard.json
168index 908165babb05b0b6b86c990f29fcb2d9ce85d98f..456c920066f937fea89c6174fe5a5f662a64999c 100644
169--- a/keyboards/bear_face/v2/keyboard.json
170+++ b/keyboards/bear_face/v2/keyboard.json
171@@ -1,8 +1,106 @@
172 {
173+    "keyboard_name": "bear_face v2",
174     "usb": {
175-        "device_version": "2.0.0"
176+        "device_version": "2.1.0"
177+    },
178+    "backlight": {
179+        "on_state": 0
180     },
181     "layouts": {
182+        "LAYOUT_all": {
183+            "layout": [
184+                {"matrix": [0, 0], "x": 0, "y": 0, "w": 1.5},
185+                {"matrix": [0, 1], "x": 1.5, "y": 0},
186+                {"matrix": [0, 2], "x": 2.5, "y": 0},
187+                {"matrix": [0, 3], "x": 3.5, "y": 0},
188+                {"matrix": [0, 4], "x": 4.5, "y": 0},
189+                {"matrix": [0, 5], "x": 5.5, "y": 0},
190+                {"matrix": [0, 6], "x": 6.5, "y": 0},
191+                {"matrix": [0, 7], "x": 7.5, "y": 0},
192+                {"matrix": [0, 8], "x": 8.5, "y": 0},
193+                {"matrix": [0, 9], "x": 9.5, "y": 0},
194+                {"matrix": [0, 10], "x": 10.5, "y": 0},
195+                {"matrix": [0, 11], "x": 11.5, "y": 0},
196+                {"matrix": [0, 12], "x": 12.5, "y": 0},
197+                {"matrix": [0, 13], "x": 13.5, "y": 0},
198+                {"matrix": [0, 14], "x": 14.5, "y": 0, "w": 1.5},
199+
200+                {"matrix": [1, 0], "x": 0, "y": 1},
201+                {"matrix": [1, 1], "x": 1, "y": 1},
202+                {"matrix": [1, 2], "x": 2, "y": 1},
203+                {"matrix": [1, 3], "x": 3, "y": 1},
204+                {"matrix": [1, 4], "x": 4, "y": 1},
205+                {"matrix": [1, 5], "x": 5, "y": 1},
206+                {"matrix": [1, 6], "x": 6, "y": 1},
207+                {"matrix": [1, 7], "x": 7, "y": 1},
208+                {"matrix": [1, 8], "x": 8, "y": 1},
209+                {"matrix": [1, 9], "x": 9, "y": 1},
210+                {"matrix": [1, 10], "x": 10, "y": 1},
211+                {"matrix": [1, 11], "x": 11, "y": 1},
212+                {"matrix": [1, 12], "x": 12, "y": 1},
213+                {"matrix": [1, 13], "x": 13, "y": 1, "w": 2},
214+                {"matrix": [1, 14], "x": 15, "y": 1},
215+
216+                {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.5},
217+                {"matrix": [2, 1], "x": 1.5, "y": 2},
218+                {"matrix": [2, 2], "x": 2.5, "y": 2},
219+                {"matrix": [2, 3], "x": 3.5, "y": 2},
220+                {"matrix": [2, 4], "x": 4.5, "y": 2},
221+                {"matrix": [2, 5], "x": 5.5, "y": 2},
222+                {"matrix": [2, 6], "x": 6.5, "y": 2},
223+                {"matrix": [2, 7], "x": 7.5, "y": 2},
224+                {"matrix": [2, 8], "x": 8.5, "y": 2},
225+                {"matrix": [2, 9], "x": 9.5, "y": 2},
226+                {"matrix": [2, 10], "x": 10.5, "y": 2},
227+                {"matrix": [2, 11], "x": 11.5, "y": 2},
228+                {"matrix": [2, 12], "x": 12.5, "y": 2},
229+                {"matrix": [2, 13], "x": 13.5, "y": 2, "w": 1.5},
230+                {"matrix": [2, 14], "x": 15, "y": 2},
231+
232+                {"matrix": [3, 0], "x": 0, "y": 3, "w": 1.75},
233+                {"matrix": [3, 1], "x": 1.75, "y": 3},
234+                {"matrix": [3, 2], "x": 2.75, "y": 3},
235+                {"matrix": [3, 3], "x": 3.75, "y": 3},
236+                {"matrix": [3, 4], "x": 4.75, "y": 3},
237+                {"matrix": [3, 5], "x": 5.75, "y": 3},
238+                {"matrix": [3, 6], "x": 6.75, "y": 3},
239+                {"matrix": [3, 7], "x": 7.75, "y": 3},
240+                {"matrix": [3, 8], "x": 8.75, "y": 3},
241+                {"matrix": [3, 9], "x": 9.75, "y": 3},
242+                {"matrix": [3, 10], "x": 10.75, "y": 3},
243+                {"matrix": [3, 11], "x": 11.75, "y": 3},
244+                {"matrix": [3, 12], "x": 12.75, "y": 3},
245+                {"matrix": [3, 13], "x": 13.75, "y": 2, "w": 1.25, "h": 2},
246+                {"matrix": [3, 14], "x": 15, "y": 3},
247+
248+                {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
249+                {"matrix": [4, 1], "x": 1.25, "y": 4},
250+                {"matrix": [4, 2], "x": 2.25, "y": 4},
251+                {"matrix": [4, 3], "x": 3.25, "y": 4},
252+                {"matrix": [4, 4], "x": 4.25, "y": 4},
253+                {"matrix": [4, 5], "x": 5.25, "y": 4},
254+                {"matrix": [4, 6], "x": 6.25, "y": 4},
255+                {"matrix": [4, 7], "x": 7.25, "y": 4},
256+                {"matrix": [4, 8], "x": 8.25, "y": 4},
257+                {"matrix": [4, 9], "x": 9.25, "y": 4},
258+                {"matrix": [4, 10], "x": 10.25, "y": 4},
259+                {"matrix": [4, 11], "x": 11.25, "y": 4},
260+                {"matrix": [4, 12], "x": 12.25, "y": 4, "w": 1.75},
261+                {"matrix": [4, 13], "x": 14, "y": 4},
262+                {"matrix": [4, 14], "x": 15, "y": 4},
263+
264+                {"matrix": [5, 0], "x": 0, "y": 5, "w": 1.25},
265+                {"matrix": [5, 1], "x": 1.25, "y": 5, "w": 1.25},
266+                {"matrix": [5, 2], "x": 2.5, "y": 5, "w": 1.25},
267+                {"matrix": [5, 5], "x": 3.75, "y": 5, "w": 6.25},
268+                {"matrix": [5, 9], "x": 10, "y": 5},
269+                {"matrix": [5, 10], "x": 11, "y": 5},
270+                {"matrix": [5, 11], "x": 12, "y": 5},
271diff --git a/keyboards/bear_face/v2/keymaps/default/keymap.c b/keyboards/bear_face/v2/keymaps/default/keymap.c
272index 0d536b68f3827db905f0e216b2e53479c25a88ef..08f193052adaca9cb68fbed97cd437ffeb1dcd3c 100644
273--- a/keyboards/bear_face/v2/keymaps/default/keymap.c
274+++ b/keyboards/bear_face/v2/keymaps/default/keymap.c
275@@ -1,19 +1,5 @@
276-/*
277-Copyright 2020 chemicalwill <https://github.com/chemicalwill>
278-
279-This program is free software: you can redistribute it and/or modify
280-it under the terms of the GNU General Public License as published by
281-the Free Software Foundation, either version 2 of the License, or
282-(at your option) any later version.
283-
284-This program is distributed in the hope that it will be useful,
285-but WITHOUT ANY WARRANTY; without even the implied warranty of
286-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
287-GNU General Public License for more details.
288-
289-You should have received a copy of the GNU General Public License
290-along with this program.  If not, see <http://www.gnu.org/licenses/>.
291-*/
292+/* Copyright 2024 will-hedges */
293+/* SPDX-License-Identifier: GPL-2.0-or-later */
294 
295 #include QMK_KEYBOARD_H
296 
297@@ -28,7 +14,7 @@ enum layers {
298 
299 //custom keycode enums
300 enum custom_keycodes {
301-    BASE_QWER = SAFE_RANGE,
302+    BASE_QWER = QK_USER,
303     BASE_COLE,
304     BASE_DVOR
305 };
306@@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
307 */
308 };
309 
310-//macros to allow the user to set whatever default layer they want, even after reboot
311 
312+// macros to allow the user to set whatever default layer they want, even after reboot
313 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
314     switch (keycode) {
315         case BASE_QWER:
316diff --git a/keyboards/bear_face/v2/keymaps/default/readme.md b/keyboards/bear_face/v2/keymaps/default/readme.md
317index 5f9e635dfec207e4a7f8ce9a6f8d7d1c9104a205..517baa5726c823ba45fa54ef4c09a9c613d091ce 100644
318--- a/keyboards/bear_face/v2/keymaps/default/readme.md
319+++ b/keyboards/bear_face/v2/keymaps/default/readme.md
320@@ -13,3 +13,7 @@ This layout replaces the stock layout on the Vortex Race 3.
321     * 'Reset' will put the keyboard into DFU mode
322     * 'APP' sends 'KC_APP'
323     * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot)
324+
325+- New things in v2:
326+    * Option of ANSI or ISO layout
327+    * Optional stepped caps (will require compatible plate)
328diff --git a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c
329index e9e6c837f4d3f2537058c79ebb72b2dab28ff039..a5e96207f6959d6e7ab928669a3c5b72e266a2f0 100644
330--- a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c
331+++ b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c
332@@ -1,19 +1,5 @@
333-/*
334-Copyright 2020 chemicalwill <https://github.com/chemicalwill>
335-
336-This program is free software: you can redistribute it and/or modify
337-it under the terms of the GNU General Public License as published by
338-the Free Software Foundation, either version 2 of the License, or
339-(at your option) any later version.
340-
341-This program is distributed in the hope that it will be useful,
342-but WITHOUT ANY WARRANTY; without even the implied warranty of
343-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
344-GNU General Public License for more details.
345-
346-You should have received a copy of the GNU General Public License
347-along with this program.  If not, see <http://www.gnu.org/licenses/>.
348-*/
349+/* Copyright 2024 will-hedges */
350+/* SPDX-License-Identifier: GPL-2.0-or-later */
351 
352 #include QMK_KEYBOARD_H
353 
354@@ -28,7 +14,7 @@ enum layers {
355 
356 //custom keycode enums
357 enum custom_keycodes {
358-    BASE_QWER = SAFE_RANGE,
359+    BASE_QWER = QK_USER,
360     BASE_COLE,
361     BASE_DVOR
362 };
363@@ -82,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
364 */
365 };
366 
367-//macros to allow the user to set whatever default layer they want, even after reboot
368 
369+//macros to allow the user to set whatever default layer they want, even after reboot
370 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
371     switch (keycode) {
372         case BASE_QWER:
373diff --git a/keyboards/bear_face/v3/keymaps/default/keymap.c b/keyboards/bear_face/v3/keymaps/default/keymap.c
374index 77f161a7104acbd927188150e35e89dbb970d152..f6e71f1b34ebc596759e558b1cc1ff2cb394ba0b 100644
375--- a/keyboards/bear_face/v3/keymaps/default/keymap.c
376+++ b/keyboards/bear_face/v3/keymaps/default/keymap.c
377@@ -14,7 +14,7 @@ enum layers {
378 
379 //custom keycode enums
380 enum custom_keycodes {
381-    BASE_QWER = QK_KB_0,
382+    BASE_QWER = QK_USER,
383     BASE_COLE,
384     BASE_DVOR
385 };
386diff --git a/keyboards/bear_face/v3/keymaps/default_iso/keymap.c b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c
387index 73a1155b6a5638f0699e513f5528a5b76f4dce92..cc97d54a9be92494c34870dbbcf12ee5dc186194 100644
388--- a/keyboards/bear_face/v3/keymaps/default_iso/keymap.c
389+++ b/keyboards/bear_face/v3/keymaps/default_iso/keymap.c
390@@ -14,7 +14,7 @@ enum layers {
391 
392 //custom keycode enums
393 enum custom_keycodes {
394-    BASE_QWER = SAFE_RANGE,
395+    BASE_QWER = QK_USER,
396     BASE_COLE,
397     BASE_DVOR
398 };