From 4d7ba77a42dde8b09b02042d59cca51d8a5d659a Mon Sep 17 00:00:00 2001 From: Harshit Goel Date: Wed, 7 Jul 2021 11:01:07 +0530 Subject: [PATCH] Pteron36 encoder (#26) * added encoder support * added encoder support * update encoder config Co-authored-by: Harshti Goel --- keyboards/pteron36/config.h | 14 +- keyboards/pteron36/keymaps/via/rules.mk | 3 +- keyboards/pteron36/keymaps/via/vial.json | 212 ++++++++++++++++++++++- keyboards/pteron36/rules.mk | 5 +- 4 files changed, 229 insertions(+), 5 deletions(-) diff --git a/keyboards/pteron36/config.h b/keyboards/pteron36/config.h index b0564237fa..2d70bb9dd5 100644 --- a/keyboards/pteron36/config.h +++ b/keyboards/pteron36/config.h @@ -156,4 +156,16 @@ along with this program. If not, see . #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 } \ No newline at end of file +#define VIAL_UNLOCK_COMBO_COLS { 0, 0 } + +//for encoder +//left encoder +#define ENCODERS_PAD_A { F5 } +#define ENCODERS_PAD_B { F4 } + +//right encoder +#define ENCODERS_PAD_A_RIGHT { F4 } +#define ENCODERS_PAD_B_RIGHT { F5 } + +//default trans keycode. +#define VIAL_ENCODER_DEFAULT { 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/via/rules.mk b/keyboards/pteron36/keymaps/via/rules.mk index e3a4356ff0..e17516d5cf 100644 --- a/keyboards/pteron36/keymaps/via/rules.mk +++ b/keyboards/pteron36/keymaps/via/rules.mk @@ -1,3 +1,4 @@ LTO_ENABLE = yes VIA_ENABLE = yes -VIAL_ENABLE = yes \ No newline at end of file +VIAL_ENABLE = yes +VIAL_ENCODERS_ENABLE = yes diff --git a/keyboards/pteron36/keymaps/via/vial.json b/keyboards/pteron36/keymaps/via/vial.json index 5268219621..d2458e4a19 100644 --- a/keyboards/pteron36/keymaps/via/vial.json +++ b/keyboards/pteron36/keymaps/via/vial.json @@ -9,6 +9,214 @@ }, "layouts": { - "keymap":[[{"x":2},"0,2",{"x":9.5},"4,2"],[{"y":-0.5,"x":1},"0,1",{"x":1},"0,3",{"x":7.5},"4,3",{"x":1},"4,1"],[{"y":-0.75,"x":4},"0,4",{"x":5.5},"4,4"],[{"y":-0.75},"0,0",{"x":1},"1,2",{"x":9.5},"5,2",{"x":1},"4,0"],[{"y":-0.5,"x":1},"1,1",{"x":1},"1,3",{"x":7.5},"5,3",{"x":1},"5,1"],[{"y":-0.75,"x":4},"1,4",{"x":5.5},"5,4"],[{"y":-0.75},"1,0",{"x":1},"2,2",{"x":9.5},"6,2",{"x":1},"5,0"],[{"y":-0.5,"x":1},"2,1",{"x":1},"2,3",{"x":7.5},"6,3",{"x":1},"6,1"],[{"y":-0.75,"x":4},"2,4",{"x":0.25},"3,4",{"x":3},"7,4",{"x":0.25},"6,4"],[{"y":-0.75},"2,0",{"x":13.5},"6,0"],[{"x":4},"3,0","3,1","3,2",{"x":1.5},"7,2","7,1","7,0"]] + "keymap":[ + + [ + { + "x": 2 + }, + "0,2", + { + "x": 9.5 + }, + "4,2" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "0,1", + { + "x": 1 + }, + "0,3", + { + "x": 7.5 + }, + "4,3", + { + "x": 1 + }, + "4,1" + ], + [ + { + "y": -0.75, + "x": 4 + }, + "0,4", + { + "x": 5.5 + }, + "4,4" + ], + [ + { + "y": -0.75 + }, + "0,0", + { + "x": 1 + }, + "1,2", + { + "x": 9.5 + }, + "5,2", + { + "x": 1 + }, + "4,0" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "1,1", + { + "x": 1 + }, + "1,3", + { + "x": 7.5 + }, + "5,3", + { + "x": 1 + }, + "5,1" + ], + [ + { + "y": -0.75, + "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 + }, + "5,4" + ], + [ + { + "y": -0.75 + }, + "1,0", + { + "x": 1 + }, + "2,2", + { + "x": 9.5 + }, + "6,2", + { + "x": 1 + }, + "5,0" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "2,1", + { + "x": 1 + }, + "2,3", + { + "x": 7.5 + }, + "6,3", + { + "x": 1 + }, + "6,1" + ], + [ + { + "y": -0.75, + "x": 4 + }, + "2,4", + { + "x": 0.25 + }, + "3,4", + { + "x": 3 + }, + "7,4", + { + "x": 0.25 + }, + "6,4" + ], + [ + { + "y": -0.75 + }, + "2,0", + { + "x": 13.5 + }, + "6,0" + ], + [ + { + "x": 4 + }, + "3,0", + { + "x": 5.5 + }, + "7,0" + ], + [ + { + "r": 15, + "y": -2.5, + "x": 6.25 + }, + "3,1" + ], + [ + { + "r": 30, + "y": -3, + "x": 8 + }, + "3,2" + ], + [ + { + "r": -30, + "y": 6.75, + "x": 4.5 + }, + "7,2" + ], + [ + { + "r": -15, + "y": -2.75, + "x": 7.75 + }, + "7,1" + ] + ] } -} \ No newline at end of file +} diff --git a/keyboards/pteron36/rules.mk b/keyboards/pteron36/rules.mk index b5c6b14ef6..e3c3ef2873 100644 --- a/keyboards/pteron36/rules.mk +++ b/keyboards/pteron36/rules.mk @@ -24,4 +24,7 @@ AUDIO_ENABLE = no # Audio output OLED_DRIVER_ENABLE = no # OLED display; work in progress to add support. will be update in future. SPLIT_KEYBOARD = yes -LAYOUTS = split_3x5_3 \ No newline at end of file +#Encoder +ENCODER_ENABLE = yes + +LAYOUTS = split_3x5_3