From 26a0299120b5dae1169c88e63a4907d8b1d81593 Mon Sep 17 00:00:00 2001 From: Harshit Goel Date: Mon, 11 Mar 2024 03:44:50 +0530 Subject: [PATCH] Add support for extra thumb key (#691) * add support for extra thumb key * updated vial.json * rename labels for thumb keys * fix labels label typo for thumb keys --- keyboards/pteron36/info.json | 51 +++++ keyboards/pteron36/keymaps/vial/config.h | 4 +- keyboards/pteron36/keymaps/vial/keymap.c | 28 +-- keyboards/pteron36/keymaps/vial/vial.json | 241 ++++++++++++++-------- 4 files changed, 224 insertions(+), 100 deletions(-) diff --git a/keyboards/pteron36/info.json b/keyboards/pteron36/info.json index 76b6e59647..e2b9a3a377 100644 --- a/keyboards/pteron36/info.json +++ b/keyboards/pteron36/info.json @@ -136,6 +136,57 @@ {"matrix": [7, 1], "x": 9, "y": 4}, {"matrix": [7, 0], "x": 10, "y": 4} ] + }, + "LAYOUT_split_3x5_4_encoder": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 1}, + {"matrix": [0, 1], "x": 1, "y": 0.5}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.5}, + {"matrix": [0, 4], "x": 4, "y": 0.75}, + + {"matrix": [4, 4], "x": 10, "y": 0.75}, + {"matrix": [4, 3], "x": 11, "y": 0.5}, + {"matrix": [4, 2], "x": 12, "y": 0}, + {"matrix": [4, 1], "x": 13, "y": 0.5}, + {"matrix": [4, 0], "x": 14, "y": 1}, + + {"matrix": [1, 0], "x": 0, "y": 2}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [1, 4], "x": 4, "y": 1.75}, + + {"matrix": [5, 4], "x": 10, "y": 1.75}, + {"matrix": [5, 3], "x": 11, "y": 1.5}, + {"matrix": [5, 2], "x": 12, "y": 1}, + {"matrix": [5, 1], "x": 13, "y": 1.5}, + {"matrix": [5, 0], "x": 14, "y": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3}, + {"matrix": [2, 1], "x": 1, "y": 2.5}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.5}, + {"matrix": [2, 4], "x": 4, "y": 2.75}, + {"matrix": [3, 4], "x": 5.5, "y": 2.75}, + + {"matrix": [7, 4], "x": 8.5, "y": 2.75}, + {"matrix": [6, 4], "x": 10, "y": 2.75}, + {"matrix": [6, 3], "x": 11, "y": 2.5}, + {"matrix": [6, 2], "x": 12, "y": 2}, + {"matrix": [6, 1], "x": 13, "y": 2.5}, + {"matrix": [6, 0], "x": 14, "y": 3}, + + {"matrix": [3, 3], "x": 6, "y": 4}, + {"matrix": [3, 0], "x": 4, "y": 4}, + {"matrix": [3, 1], "x": 5, "y": 4}, + {"matrix": [3, 2], "x": 6, "y": 4}, + + {"matrix": [7, 2], "x": 8, "y": 4}, + {"matrix": [7, 1], "x": 9, "y": 4}, + {"matrix": [7, 0], "x": 10, "y": 4}, + {"matrix": [7, 3], "x": 10, "y": 4} + ] } } } diff --git a/keyboards/pteron36/keymaps/vial/config.h b/keyboards/pteron36/keymaps/vial/config.h index 4d23b941e7..ed954a5f88 100644 --- a/keyboards/pteron36/keymaps/vial/config.h +++ b/keyboards/pteron36/keymaps/vial/config.h @@ -1,5 +1,5 @@ #pragma once #define VIAL_KEYBOARD_UID {0xD6, 0x68, 0xF2, 0x55, 0x9B, 0x48, 0x07, 0x6E} -#define VIAL_UNLOCK_COMBO_ROWS { 0, 4 } -#define VIAL_UNLOCK_COMBO_COLS { 0, 0 } +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 4 } diff --git a/keyboards/pteron36/keymaps/vial/keymap.c b/keyboards/pteron36/keymaps/vial/keymap.c index 4fe0acf607..c9713fd615 100644 --- a/keyboards/pteron36/keymaps/vial/keymap.c +++ b/keyboards/pteron36/keymaps/vial/keymap.c @@ -33,52 +33,52 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x5_3_encoder( + [_QWERTY] = LAYOUT_split_3x5_4_encoder( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_Z, KC_X, KC_C, KC_V, KC_B,KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT + KC_C, KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT,KC_COMM ), - [_SYMB] = LAYOUT_split_3x5_3_encoder( + [_SYMB] = LAYOUT_split_3x5_4_encoder( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ), - [_NAV] = LAYOUT_split_3x5_3_encoder( + [_NAV] = LAYOUT_split_3x5_4_encoder( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ), - [_ADJUST] = LAYOUT_split_3x5_3_encoder( + [_ADJUST] = LAYOUT_split_3x5_4_encoder( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ), - [_MOUSE] = LAYOUT_split_3x5_3_encoder( + [_MOUSE] = LAYOUT_split_3x5_4_encoder( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ), - [_NUMB] = LAYOUT_split_3x5_3_encoder( + [_NUMB] = LAYOUT_split_3x5_4_encoder( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ), - [_FNR] = LAYOUT_split_3x5_3_encoder( + [_FNR] = LAYOUT_split_3x5_4_encoder( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ) }; diff --git a/keyboards/pteron36/keymaps/vial/vial.json b/keyboards/pteron36/keymaps/vial/vial.json index 3cdc39852d..02a192447c 100644 --- a/keyboards/pteron36/keymaps/vial/vial.json +++ b/keyboards/pteron36/keymaps/vial/vial.json @@ -8,9 +8,8 @@ "cols": 5 }, "layouts": { - + "labels":["No Outer Thumbs","No Inner Thumbs"], "keymap":[ - [ { "x": 2 @@ -23,26 +22,29 @@ ], [ { - "y": -0.5, + "y": -0.75, "x": 1 }, "0,1", { - "x": 1 - }, - "0,3", - { - "x": 7.5 - }, - "4,3", - { - "x": 1 + "x": 11.5 }, "4,1" ], [ { - "y": -0.75, + "y": -0.95, + "x": 3 + }, + "0,3", + { + "x": 7.5 + }, + "4,3" + ], + [ + { + "y": -0.9, "x": 4 }, "0,4", @@ -53,121 +55,135 @@ ], [ { - "y": -0.75 + "y": -0.65 }, "0,0", { - "x": 1 - }, - "1,2", - { - "x": 9.5 - }, - "5,2", - { - "x": 1 + "x": 13.5 }, "4,0" ], [ { - "y": -0.5, + "y": -0.75, + "x": 2 + }, + "1,2", + { + "x": 9.5 + }, + "5,2" + ], + [ + { + "y": -0.75, "x": 1 }, "1,1", { - "x": 1 + "x": 3 }, - "1,3", + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne", { - "x": 7.5 + "x": 1.5 }, - "5,3", + "1,0\n\n\n\n\n\n\n\n\ne", + "1,1\n\n\n\n\n\n\n\n\ne", { - "x": 1 + "x": 3 }, "5,1" ], [ { - "y": -0.75, + "y": -0.95, + "x": 3, + "n": true + }, + "1,3", + { + "x": 7.5, + "n": true + }, + "5,3" + ], + [ + { + "y": -0.8999999999999999, "x": 4 }, "1,4", { - "x": 0.25 - }, - "0,0\n\n\n\n\n\n\n\n\ne", - "0,1\n\n\n\n\n\n\n\n\ne", - { - "x": 1 - }, - "1,0\n\n\n\n\n\n\n\n\ne", - "1,1\n\n\n\n\n\n\n\n\ne", - { - "x": 0.25 + "x": 5.5 }, "5,4" ], [ { - "y": -0.75 + "y": -0.6499999999999999 }, "1,0", { - "x": 1 - }, - "2,2", - { - "x": 9.5 - }, - "6,2", - { - "x": 1 + "x": 13.5 }, "5,0" ], [ { - "y": -0.5, + "y": -0.75, + "x": 2 + }, + "2,2", + { + "x": 9.5 + }, + "6,2" + ], + [ + { + "y": -0.75, "x": 1 }, "2,1", { - "x": 1 + "x": 3 }, - "2,3", + "3,4", { - "x": 7.5 + "x": 3.5 }, - "6,3", + "7,4", { - "x": 1 + "x": 3 }, "6,1" ], [ { - "y": -0.75, + "y": -0.9500000000000002, + "x": 3 + }, + "2,3", + { + "x": 7.5 + }, + "6,3" + ], + [ + { + "y": -0.8999999999999999, "x": 4 }, "2,4", { - "x": 0.25 - }, - "3,4", - { - "x": 3 - }, - "7,4", - { - "x": 0.25 + "x": 5.5 }, "6,4" ], [ { - "y": -0.75 + "y": -0.6499999999999999 }, "2,0", { @@ -177,45 +193,102 @@ ], [ { - "x": 4 + "y": -0.25, + "x": 2.75, + "c": "#bababa", + "d": true }, - "3,0", + "3,3\n\n\n0,0\n36 keys", { - "x": 5.5 + "x": -1 }, - "7,0" + "3,3\n\n\n0,1\n38 keys", + { + "x": 8, + "d": true + }, + "7,3\n\n\n0,0\n36 keys", + { + "x": -1 + }, + "7,3\n\n\n0,1\n38 keys" ], [ { "r": 15, - "y": -2.5, - "x": 6.25 + "rx": 3.75, + "ry": 4.75, + "y": -1.25, + "c": "#888888" + }, + "3,0" + ], + [ + { + "r": 30, + "rx": 4.25, + "ry": 4.8, + "y": -1.2999999999999998, + "x": 0.5, + "c": "#bababa" }, "3,1" ], [ { - "r": 30, - "y": -3, - "x": 8 + "r": 45, + "rx": 4.75, + "ry": 4.9, + "y": -1.4000000000000004, + "x": 1 }, - "3,2" + "3,2\n\n\n1,1" + ], + [ + { + "y": -0.9999999999999996, + "x": 1, + "d": true + }, + "3,2\n\n\n1,0" + ], + [ + { + "r": -45, + "rx": 10.75, + "y": -1.4000000000000004, + "x": -2 + }, + "7,2\n\n\n1,1" + ], + [ + { + "y": -0.9999999999999996, + "x": -2, + "d": true + }, + "7,2\n\n\n1,0" ], [ { "r": -30, - "y": 6.75, - "x": 4.5 + "rx": 11.25, + "ry": 4.8, + "y": -1.2999999999999998, + "x": -1.5 }, - "7,2" + "7,1" ], [ { "r": -15, - "y": -2.75, - "x": 7.75 + "rx": 11.75, + "ry": 4.75, + "y": -1.25, + "x": -1, + "c": "#888888" }, - "7,1" + "7,0" ] ] }