diff options
author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2021-09-23 08:31:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 01:31:11 -0700 |
commit | 66857b919beccfc9d3395ffe1f88cb39e044aca3 (patch) | |
tree | 81cb1a6df22c4659f76a819878a6924d47dc1375 | |
parent | 62ef4a9c8a05d52000504eabef0f1d92a74ade86 (diff) | |
download | qmk_firmware-66857b919beccfc9d3395ffe1f88cb39e044aca3.tar.gz qmk_firmware-66857b919beccfc9d3395ffe1f88cb39e044aca3.zip |
Wuque Mammoth20x Layout Macro Refactor (#14568)
* mammoth20x: edit size of RightEncode key in Configurator
* physically arrange layout macro
Arranges the keycodes to resemble the assembled board.
* rename LAYOUT_default to LAYOUT
Includes "layout_aliases" tree in info.json for backwards compatibility.
* rules.mk touch-up
* convert tabs to spaces
* add line break before ENCODER_ENABLE (not included in QMK's template)
* readme.md touch-up
* remove zero-width space characters
* markdown fix for info paragraph
* update link text
-rw-r--r-- | keyboards/wuque/mammoth20x/info.json | 11 | ||||
-rw-r--r-- | keyboards/wuque/mammoth20x/keymaps/default/keymap.c | 16 | ||||
-rw-r--r-- | keyboards/wuque/mammoth20x/keymaps/via/keymap.c | 32 | ||||
-rw-r--r-- | keyboards/wuque/mammoth20x/mammoth20x.h | 9 | ||||
-rw-r--r-- | keyboards/wuque/mammoth20x/readme.md | 10 | ||||
-rw-r--r-- | keyboards/wuque/mammoth20x/rules.mk | 2 |
6 files changed, 41 insertions, 39 deletions
diff --git a/keyboards/wuque/mammoth20x/info.json b/keyboards/wuque/mammoth20x/info.json index 552a13b08..4b53405c1 100644 --- a/keyboards/wuque/mammoth20x/info.json +++ b/keyboards/wuque/mammoth20x/info.json | |||
@@ -2,13 +2,18 @@ | |||
2 | "keyboard_name": "mammoth20x", | 2 | "keyboard_name": "mammoth20x", |
3 | "url": "https://shop.wuquestudio.com/", | 3 | "url": "https://shop.wuquestudio.com/", |
4 | "maintainer": "spbgzh", | 4 | "maintainer": "spbgzh", |
5 | "layout_aliases": { | ||
6 | "LAYOUT_default": "LAYOUT" | ||
7 | }, | ||
5 | "layouts": { | 8 | "layouts": { |
6 | "LAYOUT_default": { | 9 | "LAYOUT": { |
7 | "layout": [ | 10 | "layout": [ |
8 | { "label": "Esc", "x": 0, "y": 0 }, | 11 | { "label": "Esc", "x": 0, "y": 0 }, |
9 | { "label": "Pause", "x": 1, "y": 0 }, | 12 | { "label": "Pause", "x": 1, "y": 0 }, |
10 | { "label": "Delete", "x": 2, "y": 0 }, | 13 | { "label": "Delete", "x": 2, "y": 0 }, |
11 | { "label": "E", "x": 3.5, "y": 0 }, | 14 | { "label": "LeftEncode", "x": 3, "y": 0, "w": 0.5 }, |
15 | { "label": "EncoderClick", "x": 3.5, "y": 0 }, | ||
16 | { "label": "RightEncode", "x": 4.5, "y": 0, "w" : 0.5 }, | ||
12 | 17 | ||
13 | { "label": "Num", "x": 0, "y": 1 }, | 18 | { "label": "Num", "x": 0, "y": 1 }, |
14 | { "label": "/", "x": 1, "y": 1 }, | 19 | { "label": "/", "x": 1, "y": 1 }, |
@@ -18,7 +23,6 @@ | |||
18 | { "label": "7", "x": 0, "y": 2 }, | 23 | { "label": "7", "x": 0, "y": 2 }, |
19 | { "label": "8", "x": 1, "y": 2 }, | 24 | { "label": "8", "x": 1, "y": 2 }, |
20 | { "label": "9", "x": 2, "y": 2 }, | 25 | { "label": "9", "x": 2, "y": 2 }, |
21 | { "label": "LeftEncode", "x": 3, "y": 0, "w": 0.5 }, | ||
22 | 26 | ||
23 | { "label": "4", "x": 0, "y": 3 }, | 27 | { "label": "4", "x": 0, "y": 3 }, |
24 | { "label": "5", "x": 1, "y": 3 }, | 28 | { "label": "5", "x": 1, "y": 3 }, |
@@ -28,7 +32,6 @@ | |||
28 | { "label": "1", "x": 0, "y": 4 }, | 32 | { "label": "1", "x": 0, "y": 4 }, |
29 | { "label": "2", "x": 1, "y": 4 }, | 33 | { "label": "2", "x": 1, "y": 4 }, |
30 | { "label": "3", "x": 2, "y": 4 }, | 34 | { "label": "3", "x": 2, "y": 4 }, |
31 | { "label": "RightEncode", "x": 4.5, "y": 0, "w" : 0.25 }, | ||
32 | 35 | ||
33 | { "label": "0", "x": 0, "y": 5, "w": 2 }, | 36 | { "label": "0", "x": 0, "y": 5, "w": 2 }, |
34 | { "label": ".", "x": 2, "y": 5 }, | 37 | { "label": ".", "x": 2, "y": 5 }, |
diff --git a/keyboards/wuque/mammoth20x/keymaps/default/keymap.c b/keyboards/wuque/mammoth20x/keymaps/default/keymap.c index 77946f373..e19b3bc17 100644 --- a/keyboards/wuque/mammoth20x/keymaps/default/keymap.c +++ b/keyboards/wuque/mammoth20x/keymaps/default/keymap.c | |||
@@ -17,20 +17,20 @@ | |||
17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
18 | 18 | ||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
20 | [0] = LAYOUT_default( | 20 | [0] = LAYOUT( |
21 | KC_ESC, KC_PAUS, KC_DEL, KC_MUTE, | 21 | KC_ESC, KC_PAUS, KC_DEL, KC_VOLU, KC_MUTE, KC_VOLD, |
22 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, | 22 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, |
23 | KC_P7, KC_P8, KC_P9, KC_VOLU, | 23 | KC_P7, KC_P8, KC_P9, |
24 | KC_P4, KC_P5, KC_P6, KC_PPLS, | 24 | KC_P4, KC_P5, KC_P6, KC_PPLS, |
25 | KC_P1, KC_P2, KC_P3, KC_VOLD, | 25 | KC_P1, KC_P2, KC_P3, |
26 | KC_P0, KC_PDOT, KC_PENT | 26 | KC_P0, KC_PDOT, KC_PENT |
27 | ), | 27 | ), |
28 | [1] = LAYOUT_default( | 28 | [1] = LAYOUT( |
29 | _______, _______, _______, _______, | 29 | _______, _______, _______, _______, _______, _______, |
30 | _______, _______, _______, _______, | ||
31 | _______, _______, _______, _______, | ||
32 | _______, _______, _______, _______, | 30 | _______, _______, _______, _______, |
31 | _______, _______, _______, | ||
33 | _______, _______, _______, _______, | 32 | _______, _______, _______, _______, |
33 | _______, _______, _______, | ||
34 | _______, _______, _______ | 34 | _______, _______, _______ |
35 | ), | 35 | ), |
36 | }; | 36 | }; |
diff --git a/keyboards/wuque/mammoth20x/keymaps/via/keymap.c b/keyboards/wuque/mammoth20x/keymaps/via/keymap.c index c8c434a60..c8f7c1bb8 100644 --- a/keyboards/wuque/mammoth20x/keymaps/via/keymap.c +++ b/keyboards/wuque/mammoth20x/keymaps/via/keymap.c | |||
@@ -17,36 +17,36 @@ | |||
17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
18 | 18 | ||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
20 | [0] = LAYOUT_default( | 20 | [0] = LAYOUT( |
21 | KC_ESC, KC_PAUS, KC_DEL, KC_MUTE, | 21 | KC_ESC, KC_PAUS, KC_DEL, KC_VOLU, KC_MUTE, KC_VOLD, |
22 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, | 22 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, |
23 | KC_P7, KC_P8, KC_P9, KC_VOLU, | 23 | KC_P7, KC_P8, KC_P9, |
24 | KC_P4, KC_P5, KC_P6, KC_PPLS, | 24 | KC_P4, KC_P5, KC_P6, KC_PPLS, |
25 | KC_P1, KC_P2, KC_P3, KC_VOLD, | 25 | KC_P1, KC_P2, KC_P3, |
26 | KC_P0, KC_PDOT, KC_PENT | 26 | KC_P0, KC_PDOT, KC_PENT |
27 | ), | 27 | ), |
28 | [1] = LAYOUT_default( | 28 | [1] = LAYOUT( |
29 | _______, _______, _______, _______, | 29 | _______, _______, _______, _______, _______, _______, |
30 | _______, _______, _______, _______, | ||
31 | _______, _______, _______, _______, | ||
32 | _______, _______, _______, _______, | 30 | _______, _______, _______, _______, |
31 | _______, _______, _______, | ||
33 | _______, _______, _______, _______, | 32 | _______, _______, _______, _______, |
33 | _______, _______, _______, | ||
34 | _______, _______, _______ | 34 | _______, _______, _______ |
35 | ), | 35 | ), |
36 | [2] = LAYOUT_default( | 36 | [2] = LAYOUT( |
37 | _______, _______, _______, _______, | 37 | _______, _______, _______, _______, _______, _______, |
38 | _______, _______, _______, _______, | ||
39 | _______, _______, _______, _______, | ||
40 | _______, _______, _______, _______, | 38 | _______, _______, _______, _______, |
39 | _______, _______, _______, | ||
41 | _______, _______, _______, _______, | 40 | _______, _______, _______, _______, |
41 | _______, _______, _______, | ||
42 | _______, _______, _______ | 42 | _______, _______, _______ |
43 | ), | 43 | ), |
44 | [3] = LAYOUT_default( | 44 | [3] = LAYOUT( |
45 | _______, _______, _______, _______, | 45 | _______, _______, _______, _______, _______, _______, |
46 | _______, _______, _______, _______, | ||
47 | _______, _______, _______, _______, | ||
48 | _______, _______, _______, _______, | 46 | _______, _______, _______, _______, |
47 | _______, _______, _______, | ||
49 | _______, _______, _______, _______, | 48 | _______, _______, _______, _______, |
49 | _______, _______, _______, | ||
50 | _______, _______, _______ | 50 | _______, _______, _______ |
51 | ), | 51 | ), |
52 | }; | 52 | }; |
diff --git a/keyboards/wuque/mammoth20x/mammoth20x.h b/keyboards/wuque/mammoth20x/mammoth20x.h index cd0d8d478..408788bf6 100644 --- a/keyboards/wuque/mammoth20x/mammoth20x.h +++ b/keyboards/wuque/mammoth20x/mammoth20x.h | |||
@@ -18,12 +18,12 @@ | |||
18 | 18 | ||
19 | #include "quantum.h" | 19 | #include "quantum.h" |
20 | 20 | ||
21 | #define LAYOUT_default( \ | 21 | #define LAYOUT( \ |
22 | K00, K01, K02, K03, \ | 22 | K00, K01, K02, K23, K03, K43, \ |
23 | K10, K11, K12, K13, \ | 23 | K10, K11, K12, K13, \ |
24 | K20, K21, K22, K23, \ | 24 | K20, K21, K22, \ |
25 | K30, K31, K32, K33, \ | 25 | K30, K31, K32, K33, \ |
26 | K40, K41, K42, K43, \ | 26 | K40, K41, K42, \ |
27 | K50, K52, K53 \ | 27 | K50, K52, K53 \ |
28 | ) { \ | 28 | ) { \ |
29 | { K00, K01, K02, K03 }, \ | 29 | { K00, K01, K02, K03 }, \ |
@@ -33,4 +33,3 @@ | |||
33 | { K40, K41, K42, K43 }, \ | 33 | { K40, K41, K42, K43 }, \ |
34 | { K50, KC_NO, K52, K53 }, \ | 34 | { K50, KC_NO, K52, K53 }, \ |
35 | } | 35 | } |
36 | |||
diff --git a/keyboards/wuque/mammoth20x/readme.md b/keyboards/wuque/mammoth20x/readme.md index 4b731a159..d98175e9b 100644 --- a/keyboards/wuque/mammoth20x/readme.md +++ b/keyboards/wuque/mammoth20x/readme.md | |||
@@ -1,11 +1,11 @@ | |||
1 | # mammoth20x | 1 | # mammoth20x |
2 | | 2 | |
3 | More Info at[wuquestudio](https://shop.wuquestudio.com/). | 3 | More info at [Wuque Studio](https://shop.wuquestudio.com/). |
4 | | 4 | |
5 | * Keyboard Maintainer: [spbgzh](https://github.com/spbgzh) | 5 | * Keyboard Maintainer: [spbgzh](https://github.com/spbgzh) |
6 | * Hardware Supported: mammoth20x Standard | 6 | * Hardware Supported: mammoth20x Standard |
7 | * Hardware Availability: [mammoth20x](https://shop.wuquestudio.com/) | 7 | * Hardware Availability: [Wuque Studio](https://shop.wuquestudio.com/) |
8 | | 8 | |
9 | Make example for this keyboard (after setting up your build environment): | 9 | Make example for this keyboard (after setting up your build environment): |
10 | 10 | ||
11 | make wuque/mammoth20x:default | 11 | make wuque/mammoth20x:default |
diff --git a/keyboards/wuque/mammoth20x/rules.mk b/keyboards/wuque/mammoth20x/rules.mk index f400415b6..cba836c45 100644 --- a/keyboards/wuque/mammoth20x/rules.mk +++ b/keyboards/wuque/mammoth20x/rules.mk | |||
@@ -19,5 +19,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow |
21 | AUDIO_ENABLE = no # Audio output | 21 | AUDIO_ENABLE = no # Audio output |
22 | ENCODER_ENABLE = yes # Enable Encoder | ||
23 | 22 | ||
23 | ENCODER_ENABLE = yes # Enable Encoder | ||