From 06664e8a94116b5d40b2348ec89ba2fc6248ec16 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 29 Mar 2023 15:47:59 +1100 Subject: Fix layouts containing keys with multiple matrix positions (#20191) --- keyboards/jian/handwired/handwired.c | 2 +- keyboards/jian/handwired/handwired.h | 30 ------------------ keyboards/jian/handwired/info.json | 59 +++++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 32 deletions(-) delete mode 100644 keyboards/jian/handwired/handwired.h (limited to 'keyboards/jian/handwired') diff --git a/keyboards/jian/handwired/handwired.c b/keyboards/jian/handwired/handwired.c index 2c14518299..f803394c74 100644 --- a/keyboards/jian/handwired/handwired.c +++ b/keyboards/jian/handwired/handwired.c @@ -1,4 +1,4 @@ -#include "handwired.h" +#include "quantum.h" const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{13, 0}, {12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, diff --git a/keyboards/jian/handwired/handwired.h b/keyboards/jian/handwired/handwired.h deleted file mode 100644 index 7d961690d2..0000000000 --- a/keyboards/jian/handwired/handwired.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define XXX KC_NO -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ - L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, \ - L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, \ - L34, L35, L36, R36, R35, R34 \ -) \ -{ \ - {L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00}, \ - {XXX, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, XXX}, \ - {XXX, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, XXX}, \ - {XXX, XXX, XXX, XXX, L34, L35, L36, R36, R35, R34, XXX, XXX, XXX, XXX} \ -} - -#define LAYOUT_symmetric( \ - K00, K01, K02, K03, K04, K05, K06, \ - K11, K12, K13, K14, K15, K16, \ - K21, K22, K23, K24, K25, K26, \ - K34, K35, K36 \ -) \ -{ \ - {K00, K01, K02, K03, K04, K05, K06, K06, K05, K04, K03, K02, K01, K00}, \ - {XXX, K11, K12, K13, K14, K15, K16, K16, K15, K14, K13, K12, K11, XXX}, \ - {XXX, K21, K22, K23, K24, K25, K26, K26, K25, K24, K23, K22, K21, XXX}, \ - {XXX, XXX, XXX, XXX, K34, K35, K36, K36, K35, K34, XXX, XXX, XXX, XXX} \ -} diff --git a/keyboards/jian/handwired/info.json b/keyboards/jian/handwired/info.json index bd76da9e96..dc68963b6b 100644 --- a/keyboards/jian/handwired/info.json +++ b/keyboards/jian/handwired/info.json @@ -9,5 +9,62 @@ }, "diode_direction": "COL2ROW", "processor": "atmega32u4", - "bootloader": "caterina" + "bootloader": "caterina", + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 1.5}, + {"matrix": [0, 1], "x": 1, "y": 0.75}, + {"matrix": [0, 2], "x": 2, "y": 0.625}, + {"matrix": [0, 3], "x": 3, "y": 0.25}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.375}, + + {"matrix": [0, 7], "x": 10, "y": 0.375}, + {"matrix": [0, 8], "x": 11, "y": 0.25}, + {"matrix": [0, 9], "x": 12, "y": 0}, + {"matrix": [0, 10], "x": 13, "y": 0.25}, + {"matrix": [0, 11], "x": 14, "y": 0.625}, + {"matrix": [0, 12], "x": 15, "y": 0.75}, + {"matrix": [0, 13], "x": 16, "y": 1.5}, + + {"matrix": [1, 1], "x": 1, "y": 1.75}, + {"matrix": [1, 2], "x": 2, "y": 1.625}, + {"matrix": [1, 3], "x": 3, "y": 1.25}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1.25}, + {"matrix": [1, 6], "x": 6, "y": 1.375}, + + {"matrix": [1, 7], "x": 10, "y": 1.375}, + {"matrix": [1, 8], "x": 11, "y": 1.25}, + {"matrix": [1, 9], "x": 12, "y": 1}, + {"matrix": [1, 10], "x": 13, "y": 1.25}, + {"matrix": [1, 11], "x": 14, "y": 1.625}, + {"matrix": [1, 12], "x": 15, "y": 1.75}, + + {"matrix": [2, 1], "x": 1, "y": 2.75}, + {"matrix": [2, 2], "x": 2, "y": 2.625}, + {"matrix": [2, 3], "x": 3, "y": 2.25}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2.25}, + {"matrix": [2, 6], "x": 6, "y": 2.375}, + + {"matrix": [2, 7], "x": 10, "y": 2.375}, + {"matrix": [2, 8], "x": 11, "y": 2.25}, + {"matrix": [2, 9], "x": 12, "y": 2}, + {"matrix": [2, 10], "x": 13, "y": 2.25}, + {"matrix": [2, 11], "x": 14, "y": 2.625}, + {"matrix": [2, 12], "x": 15, "y": 2.75}, + + {"matrix": [3, 4], "x": 5, "y": 3.25}, + {"matrix": [3, 5], "x": 6, "y": 3.375}, + {"matrix": [3, 6], "x": 7, "y": 3.5}, + + {"matrix": [3, 7], "x": 9, "y": 3.5}, + {"matrix": [3, 8], "x": 10, "y": 3.375}, + {"matrix": [3, 9], "x": 11, "y": 3.25} + ] + } + } } -- cgit v1.2.3