浏览代码

[Keyboard] Snagpad Configurator bugfix and readme refactor (#6381)

* Update snagpad.h

White-space changes only. Making this file easier to read.

* Update info.json

Refactor:

- add labels
- debug linting (one key object per line)
- reorder keys for LAYOUT_numpad_5x4 (fixes QMK Configurator assigning keys to incorrect positions)

* Update readme.md

Refactor to conform to QMK template.

Updated link to The Board Podcast (old link was Error 404).
noroadsleft 5 年之前
父节点
当前提交
d686c0ea43
共有 3 个文件被更改,包括 76 次插入37 次删除
  1. 44 5
      keyboards/snagpad/info.json
  2. 12 12
      keyboards/snagpad/readme.md
  3. 20 20
      keyboards/snagpad/snagpad.h

+ 44 - 5
keyboards/snagpad/info.json

@@ -7,11 +7,50 @@
     "height": 5,
     "layouts": {
 
-      "LAYOUT_ortho_5x4": {
-            "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}]
-    },
+        "LAYOUT_ortho_5x4": {
+            "layout": [
+                {"label":"Num Lock", "x":0, "y":0},
+                {"label":"/", "x":1, "y":0},
+                {"label":"*", "x":2, "y":0},
+                {"label":"-", "x":3, "y":0},
+                {"label":"7", "x":0, "y":1},
+                {"label":"8", "x":1, "y":1},
+                {"label":"9", "x":2, "y":1},
+                {"label":"+", "x":3, "y":1},
+                {"label":"4", "x":0, "y":2},
+                {"label":"5", "x":1, "y":2},
+                {"label":"6", "x":2, "y":2},
+                {"label":"+", "x":3, "y":2},
+                {"label":"1", "x":0, "y":3},
+                {"label":"2", "x":1, "y":3},
+                {"label":"3", "x":2, "y":3},
+                {"label":"Enter", "x":3, "y":3},
+                {"label":"0", "x":0, "y":4},
+                {"label":"0", "x":1, "y":4},
+                {"label":".", "x":2, "y":4},
+                {"label":"Enter", "x":3, "y":4}
+            ]
+        },
         "LAYOUT_numpad_5x4": {
-            "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}]
-      }
+            "layout": [
+                {"label":"Num Lock", "x":0, "y":0},
+                {"label":"/", "x":1, "y":0},
+                {"label":"*", "x":2, "y":0},
+                {"label":"-", "x":3, "y":0},
+                {"label":"7", "x":0, "y":1},
+                {"label":"8", "x":1, "y":1},
+                {"label":"9", "x":2, "y":1},
+                {"label":"4", "x":0, "y":2},
+                {"label":"5", "x":1, "y":2},
+                {"label":"6", "x":2, "y":2},
+                {"label":"+", "x":3, "y":1, "h":2},
+                {"label":"1", "x":0, "y":3},
+                {"label":"2", "x":1, "y":3},
+                {"label":"3", "x":2, "y":3},
+                {"label":"0", "x":0, "y":4, "w":2},
+                {"label":".", "x":2, "y":4},
+                {"label":"Enter", "x":3, "y":3, "h":2}
+            ]
+        }
     }
 }

+ 12 - 12
keyboards/snagpad/readme.md

@@ -1,21 +1,21 @@
 # Snagpad
-QMK for Snagpad
 
-This PCB can be used as a standard numpad, or a ortho 5x4 macropad.
+A five-row PCB that can be built as a standard numpad or an ortholinear 5x4 macropad. Can be built as single PCB with custom case, or as two PCB style with standoffs. Requires a Pro Micro.
 
-For QMK Configurator, the info.json is utilised.
-- For 2U keys on numpad, the first 1u row/column key assignment is the same as the 2u position.
+Keyboard Maintainer: [Flehrad](https://github.com/flehrad)  
+Hardware Supported: Snagpad PCB, Pro Micro  
+Hardware Availability: [GitHub](https://github.com/flehrad/Snagpad)
 
-Build requires a pro micro.
+Make example for this keyboard (after setting up your build environment):
 
-Can be built as single PCB with custom case, or as two PCB style with standoffs.
+    make snagpad:default
 
-If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast
+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).
 
-Check out our:
-
-YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw)
+If you like this simple PCB and want to make a donation, you can do so at https://paypal.me/theboardpodcast.
 
-Podcast (www.libsyn.com/theboardpodcast)
+Check out our:
 
-Patreon (www.patreon.com/theboardpodcast)
+- [YouTube](https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw)
+- [Podcast](https://podcasts.apple.com/au/podcast/theboard-mechanical-keyboard/id1147089749?mt=2)
+- [Patreon](https://www.patreon.com/theboardpodcast)

+ 20 - 20
keyboards/snagpad/snagpad.h

@@ -3,28 +3,28 @@
 #include "quantum.h"
 
 #define LAYOUT_ortho_5x4( \
-	K00, K01, K02, K03, \
-	K10, K11, K12, K13, \
-	K20, K21, K22, K23, \
-	K30, K31, K32, K33, \
-	K40, K41, K42, K43  \
+    K00, K01, K02, K03, \
+    K10, K11, K12, K13, \
+    K20, K21, K22, K23, \
+    K30, K31, K32, K33, \
+    K40, K41, K42, K43  \
 ) { \
-	{ K00,   K01,   K02,   K03 }, \
-	{ K10,   K11,   K12,   K13 }, \
-	{ K20,   K21,   K22,   K23 }, \
-	{ K30,   K31,   K32,   K33 }, \
-	{ K40,   K41,   K42,   K43 }  \
+    { K00,   K01,   K02,   K03 }, \
+    { K10,   K11,   K12,   K13 }, \
+    { K20,   K21,   K22,   K23 }, \
+    { K30,   K31,   K32,   K33 }, \
+    { K40,   K41,   K42,   K43 }  \
 }
 #define LAYOUT_numpad_5x4( \
-	K00, K01, K02, K03, \
- 	K10, K11, K12,      \
-  K20, K21, K22, K13, \
- 	K30, K31, K32,      \
-  K40,      K42, K33  \
+    K00, K01, K02, K03, \
+    K10, K11, K12,      \
+    K20, K21, K22, K13, \
+    K30, K31, K32,      \
+    K40,      K42, K33  \
 ) { \
-	{ K00,   K01,   K02,   K03 }, \
-	{ K10,   K11,   K12,   K13 }, \
- 	{ K20,   K21,   K22,   KC_NO }, \
-	{ K30,   K31,   K32,   K33 }, \
- 	{ K40,   KC_NO, K42,   KC_NO }  \
+    { K00,   K01,   K02,   K03 }, \
+    { K10,   K11,   K12,   K13 }, \
+    { K20,   K21,   K22,   KC_NO }, \
+    { K30,   K31,   K32,   K33 }, \
+    { K40,   KC_NO, K42,   KC_NO }  \
 }