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
This commit is contained in:
James Young 2021-09-23 08:31:11 +00:00 committed by GitHub
parent 62ef4a9c8a
commit 66857b919b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 39 deletions

View file

@ -2,13 +2,18 @@
"keyboard_name": "mammoth20x",
"url": "https://shop.wuquestudio.com/",
"maintainer": "spbgzh",
"layout_aliases": {
"LAYOUT_default": "LAYOUT"
},
"layouts": {
"LAYOUT_default": {
"LAYOUT": {
"layout": [
{ "label": "Esc", "x": 0, "y": 0 },
{ "label": "Pause", "x": 1, "y": 0 },
{ "label": "Delete", "x": 2, "y": 0 },
{ "label": "E", "x": 3.5, "y": 0 },
{ "label": "LeftEncode", "x": 3, "y": 0, "w": 0.5 },
{ "label": "EncoderClick", "x": 3.5, "y": 0 },
{ "label": "RightEncode", "x": 4.5, "y": 0, "w" : 0.5 },
{ "label": "Num", "x": 0, "y": 1 },
{ "label": "/", "x": 1, "y": 1 },
@ -18,7 +23,6 @@
{ "label": "7", "x": 0, "y": 2 },
{ "label": "8", "x": 1, "y": 2 },
{ "label": "9", "x": 2, "y": 2 },
{ "label": "LeftEncode", "x": 3, "y": 0, "w": 0.5 },
{ "label": "4", "x": 0, "y": 3 },
{ "label": "5", "x": 1, "y": 3 },
@ -28,7 +32,6 @@
{ "label": "1", "x": 0, "y": 4 },
{ "label": "2", "x": 1, "y": 4 },
{ "label": "3", "x": 2, "y": 4 },
{ "label": "RightEncode", "x": 4.5, "y": 0, "w" : 0.25 },
{ "label": "0", "x": 0, "y": 5, "w": 2 },
{ "label": ".", "x": 2, "y": 5 },

View file

@ -17,20 +17,20 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_default(
KC_ESC, KC_PAUS, KC_DEL, KC_MUTE,
[0] = LAYOUT(
KC_ESC, KC_PAUS, KC_DEL, KC_VOLU, KC_MUTE, KC_VOLD,
KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_VOLU,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_VOLD,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT
),
[1] = LAYOUT_default(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
};

View file

@ -17,36 +17,36 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_default(
KC_ESC, KC_PAUS, KC_DEL, KC_MUTE,
[0] = LAYOUT(
KC_ESC, KC_PAUS, KC_DEL, KC_VOLU, KC_MUTE, KC_VOLD,
KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_VOLU,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_VOLD,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT
),
[1] = LAYOUT_default(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[2] = LAYOUT_default(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[3] = LAYOUT_default(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
[3] = LAYOUT(
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
};

View file

@ -18,12 +18,12 @@
#include "quantum.h"
#define LAYOUT_default( \
K00, K01, K02, K03, \
#define LAYOUT( \
K00, K01, K02, K23, K03, K43, \
K10, K11, K12, K13, \
K20, K21, K22, K23, \
K20, K21, K22, \
K30, K31, K32, K33, \
K40, K41, K42, K43, \
K40, K41, K42, \
K50, K52, K53 \
) { \
{ K00, K01, K02, K03 }, \
@ -33,4 +33,3 @@
{ K40, K41, K42, K43 }, \
{ K50, KC_NO, K52, K53 }, \
}

View file

@ -1,11 +1,11 @@
# mammoth20x
More Info at[wuquestudio](https://shop.wuquestudio.com/).
More info at [Wuque Studio](https://shop.wuquestudio.com/).
* Keyboard Maintainer: [spbgzh](https://github.com/spbgzh)
* Hardware Supported: mammoth20x Standard
* Hardware Availability: [mammoth20x](https://shop.wuquestudio.com/)
* Hardware Availability: [Wuque Studio](https://shop.wuquestudio.com/)
Make example for this keyboard (after setting up your build environment):
make wuque/mammoth20x:default

View file

@ -19,5 +19,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes # Enable Encoder
ENCODER_ENABLE = yes # Enable Encoder