From b8ebf88fc81c7d93e9d1b1fa34da6426f9acc144 Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sat, 11 Feb 2023 19:33:20 -0500 Subject: [PATCH 1/9] Squashed commit of the following: commit 5ab92a4a13a71071817a873d0b495602dd18cd47 Author: ThePanduuh Date: Sat Feb 11 19:29:53 2023 -0500 Create working branch --- keyboards/thepanduuh/degenpad/config.h | 38 +++ keyboards/thepanduuh/degenpad/degenpad.c | 17 ++ keyboards/thepanduuh/degenpad/degenpad.h | 136 ++++++++++ keyboards/thepanduuh/degenpad/info.json | 233 ++++++++++++++++++ .../degenpad/keymaps/default/keymap.c | 53 ++++ .../degenpad/keymaps/default/rules.mk | 1 + .../thepanduuh/degenpad/keymaps/via/keymap.c | 63 +++++ .../thepanduuh/degenpad/keymaps/via/rules.mk | 3 + keyboards/thepanduuh/degenpad/readme.md | 24 ++ keyboards/thepanduuh/degenpad/rules.mk | 19 ++ 10 files changed, 587 insertions(+) create mode 100644 keyboards/thepanduuh/degenpad/config.h create mode 100644 keyboards/thepanduuh/degenpad/degenpad.c create mode 100644 keyboards/thepanduuh/degenpad/degenpad.h create mode 100644 keyboards/thepanduuh/degenpad/info.json create mode 100644 keyboards/thepanduuh/degenpad/keymaps/default/keymap.c create mode 100644 keyboards/thepanduuh/degenpad/keymaps/default/rules.mk create mode 100644 keyboards/thepanduuh/degenpad/keymaps/via/keymap.c create mode 100644 keyboards/thepanduuh/degenpad/keymaps/via/rules.mk create mode 100644 keyboards/thepanduuh/degenpad/readme.md create mode 100644 keyboards/thepanduuh/degenpad/rules.mk diff --git a/keyboards/thepanduuh/degenpad/config.h b/keyboards/thepanduuh/degenpad/config.h new file mode 100644 index 000000000000..ef0aa253ad43 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2023 ThePanduuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D5, D6, D7, B4, B5, B6 } +#define MATRIX_COL_PINS { F4, F5, B1, D3 } + +#define ENCODERS_PAD_A { F1 } +#define ENCODERS_PAD_B { F0 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/keyboards/thepanduuh/degenpad/degenpad.c b/keyboards/thepanduuh/degenpad/degenpad.c new file mode 100644 index 000000000000..43590a0be666 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/degenpad.c @@ -0,0 +1,17 @@ +/* +Copyright 2023 ThePanduuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "degenpad.h" \ No newline at end of file diff --git a/keyboards/thepanduuh/degenpad/degenpad.h b/keyboards/thepanduuh/degenpad/degenpad.h new file mode 100644 index 000000000000..53f949a79fe2 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/degenpad.h @@ -0,0 +1,136 @@ +/* +Copyright 2023 ThePanduuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "quantum.h" +#define LAYOUT_ortho_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +) { \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {k50, k51, k52, k53} \ +} + +#define LAYOUT_numpad_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_zero( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k50, k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {k50, k51, k52, k53} \ +} + +#define LAYOUT_split_enter( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_enter_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_zero_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k50, k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {k50, k51, k52, k53} \ +} diff --git a/keyboards/thepanduuh/degenpad/info.json b/keyboards/thepanduuh/degenpad/info.json new file mode 100644 index 000000000000..c486acb8b8f0 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/info.json @@ -0,0 +1,233 @@ +{ + "keyboard_name": "Degenpad", + "manufacturer": "ThePanduuh", + "url": "https://github.com/ThePanduuh", + "maintainer": "ThePanduuh", + "usb": { + "vid": "0x4A44", + "pid": "0x4447", + "device_version": "1.0" + }, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} + ] + }, + "LAYOUT_numpad_6x4": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + }, + "LAYOUT_split_plus": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + }, + "LAYOUT_split_zero": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + }, + "LAYOUT_split_enter": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} + ] + }, + "LAYOUT_split_enter_plus": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} + ] + }, + "LAYOUT_split_zero_plus": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + } + } +} diff --git a/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c b/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..e44ef24b053a --- /dev/null +++ b/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2023 ThePanduuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_numpad_6x4( + KC_ESC , KC_EQL , KC_BSPC, MO(1) , + KC_NUM , KC_PSLS, KC_PAST, KC_PMNS, + KC_P7 , KC_P8 , KC_P9 , + KC_P4 , KC_P5 , KC_P6 , KC_PPLS, + KC_P1 , KC_P2 , KC_P3 , + KC_P0 , KC_PDOT, KC_PENT + ), + + [_FN] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_DEL , KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP , KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END , KC_DOWN, KC_PGDN, + KC_INS , KC_DEL , QK_BOOT + ) + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [_FN] = {ENCODER_CCW_CW(KC_NO, KC_NO)}, +}; +#endif diff --git a/keyboards/thepanduuh/degenpad/keymaps/default/rules.mk b/keyboards/thepanduuh/degenpad/keymaps/default/rules.mk new file mode 100644 index 000000000000..560b06762c13 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes #Encoder Mapping diff --git a/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c b/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c new file mode 100644 index 000000000000..657718303f40 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c @@ -0,0 +1,63 @@ +/* +Copyright 2023 ThePanduuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /*Base*/ + [0] = LAYOUT_numpad_6x4( + KC_ESC , KC_EQL , KC_BSPC, MO(1) , + KC_NUM , KC_PSLS, KC_PAST, KC_PMNS, + KC_P7 , KC_P8 , KC_P9 , + KC_P4 , KC_P5 , KC_P6 , KC_PPLS, + KC_P1 , KC_P2 , KC_P3 , + KC_P0 , KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_DEL , KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP , KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END , KC_DOWN, KC_PGDN, + KC_INS , KC_DEL , QK_BOOT + ), + [2] = LAYOUT_numpad_6x4( + 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 + ), + [3] = LAYOUT_numpad_6x4( + 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 + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [1] = {ENCODER_CCW_CW(KC_NO, KC_NO)}, + [2] = {ENCODER_CCW_CW(KC_NO, KC_NO)}, + [3] = {ENCODER_CCW_CW(KC_NO, KC_NO)}, +}; +#endif diff --git a/keyboards/thepanduuh/degenpad/keymaps/via/rules.mk b/keyboards/thepanduuh/degenpad/keymaps/via/rules.mk new file mode 100644 index 000000000000..ef4b7ef99171 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes #Enable VIA +ENCODER_MAP_ENABLE = yes #Encoder Mapping +LTO_ENABLE = yes #Firmware Size Reduction \ No newline at end of file diff --git a/keyboards/thepanduuh/degenpad/readme.md b/keyboards/thepanduuh/degenpad/readme.md new file mode 100644 index 000000000000..2feed8cbccf8 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/readme.md @@ -0,0 +1,24 @@ +# Degenpad + +![Degenpad](https://i.imgur.com/lrlEDMfh.jpg) +Numberpad created for degenerates with the option for 1 encoder. + +* Keyboard maintainer: [ThePanduuh](https://github.com/thepanduuh) +* Hardware Supported: Degenpad +* Hardware Availability: private buy + +Make example for this keyboard (after setting up your build environment): + + make thepanduuh/degenpad:default + +Flashing example for this keyboard: + + make thepanduuh/degenpad:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader +Enter the bootloader in 3 ways: +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard. +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. \ No newline at end of file diff --git a/keyboards/thepanduuh/degenpad/rules.mk b/keyboards/thepanduuh/degenpad/rules.mk new file mode 100644 index 000000000000..51bb8e6b1180 --- /dev/null +++ b/keyboards/thepanduuh/degenpad/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Rotary Encoder support From d8448f1bc02d9641648bab8a00514e1be0d3c54a Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sat, 11 Feb 2023 20:01:02 -0500 Subject: [PATCH 2/9] Update version number --- keyboards/thepanduuh/degenpad/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/thepanduuh/degenpad/info.json b/keyboards/thepanduuh/degenpad/info.json index c486acb8b8f0..df6feb4c7e12 100644 --- a/keyboards/thepanduuh/degenpad/info.json +++ b/keyboards/thepanduuh/degenpad/info.json @@ -6,7 +6,7 @@ "usb": { "vid": "0x4A44", "pid": "0x4447", - "device_version": "1.0" + "device_version": "1.0.0" }, "layouts": { "LAYOUT_ortho_6x4": { From d404e6b10cef4dd0f951b8bc3081c63f4ab6269a Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sat, 11 Feb 2023 21:06:02 -0500 Subject: [PATCH 3/9] Update keyboards/thepanduuh/degenpad/config.h Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/thepanduuh/degenpad/config.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/thepanduuh/degenpad/config.h b/keyboards/thepanduuh/degenpad/config.h index ef0aa253ad43..73ed3fda1839 100644 --- a/keyboards/thepanduuh/degenpad/config.h +++ b/keyboards/thepanduuh/degenpad/config.h @@ -16,12 +16,6 @@ along with this program. If not, see . */ #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 4 - // ROWS: Top to bottom, COLS: Left to right #define MATRIX_ROW_PINS { D5, D6, D7, B4, B5, B6 } From c8d8489227f922017e976663b51b2fb4a705eac0 Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sat, 11 Feb 2023 21:06:15 -0500 Subject: [PATCH 4/9] Update keyboards/thepanduuh/degenpad/rules.mk Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/thepanduuh/degenpad/rules.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/thepanduuh/degenpad/rules.mk b/keyboards/thepanduuh/degenpad/rules.mk index 51bb8e6b1180..39946d6840be 100644 --- a/keyboards/thepanduuh/degenpad/rules.mk +++ b/keyboards/thepanduuh/degenpad/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # From f6dda52dfce6c7524b72bc19471043cdc63177ec Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sat, 11 Feb 2023 21:06:22 -0500 Subject: [PATCH 5/9] Update keyboards/thepanduuh/degenpad/info.json Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/thepanduuh/degenpad/info.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/thepanduuh/degenpad/info.json b/keyboards/thepanduuh/degenpad/info.json index df6feb4c7e12..ee19795db33b 100644 --- a/keyboards/thepanduuh/degenpad/info.json +++ b/keyboards/thepanduuh/degenpad/info.json @@ -8,6 +8,8 @@ "pid": "0x4447", "device_version": "1.0.0" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT_ortho_6x4": { "layout": [ From b0d179aaef60bbeb20c62faa1d823c8a7831fcce Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sun, 12 Feb 2023 09:06:26 -0500 Subject: [PATCH 6/9] Added requested changes per drashna's suggestions. --- keyboards/thepanduuh/degenpad/degenpad.c | 16 +++++++++- .../degenpad/keymaps/default/keymap.c | 18 +++++------ .../thepanduuh/degenpad/keymaps/via/keymap.c | 32 +++++++++---------- 3 files changed, 40 insertions(+), 26 deletions(-) diff --git a/keyboards/thepanduuh/degenpad/degenpad.c b/keyboards/thepanduuh/degenpad/degenpad.c index 43590a0be666..d70c8b8c1a28 100644 --- a/keyboards/thepanduuh/degenpad/degenpad.c +++ b/keyboards/thepanduuh/degenpad/degenpad.c @@ -14,4 +14,18 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "degenpad.h" \ No newline at end of file +#include "degenpad.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + } + return true; +} +#endif diff --git a/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c b/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c index e44ef24b053a..223b4eb273a3 100644 --- a/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c +++ b/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c @@ -25,24 +25,24 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_numpad_6x4( + [_BASE] = LAYOUT_ortho_6x4( KC_ESC , KC_EQL , KC_BSPC, MO(1) , KC_NUM , KC_PSLS, KC_PAST, KC_PMNS, - KC_P7 , KC_P8 , KC_P9 , + KC_P7 , KC_P8 , KC_P9 , KC_PPLS, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, - KC_P1 , KC_P2 , KC_P3 , - KC_P0 , KC_PDOT, KC_PENT + KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_P0 , KC_P0 , KC_PDOT, KC_PENT ), - [_FN] = LAYOUT_numpad_6x4( + [_FN] = LAYOUT_ortho_6x4( KC_TRNS, KC_TRNS, KC_DEL , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_HOME, KC_UP , KC_PGUP, + KC_HOME, KC_UP , KC_PGUP, KC_TRNS, KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, - KC_END , KC_DOWN, KC_PGDN, - KC_INS , KC_DEL , QK_BOOT + KC_END , KC_DOWN, KC_PGDN, QK_BOOT, + KC_INS , KC_INS , KC_DEL , QK_BOOT ) - + }; #if defined(ENCODER_MAP_ENABLE) diff --git a/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c b/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c index 657718303f40..87b98be5bcdf 100644 --- a/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c +++ b/keyboards/thepanduuh/degenpad/keymaps/via/keymap.c @@ -18,38 +18,38 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*Base*/ - [0] = LAYOUT_numpad_6x4( + [0] = LAYOUT_ortho_6x4( KC_ESC , KC_EQL , KC_BSPC, MO(1) , KC_NUM , KC_PSLS, KC_PAST, KC_PMNS, - KC_P7 , KC_P8 , KC_P9 , + KC_P7 , KC_P8 , KC_P9 , KC_PPLS, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, - KC_P1 , KC_P2 , KC_P3 , - KC_P0 , KC_PDOT, KC_PENT + KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_P0 , KC_P0 , KC_PDOT, KC_PENT ), - [1] = LAYOUT_numpad_6x4( + [1] = LAYOUT_ortho_6x4( KC_TRNS, KC_TRNS, KC_DEL , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_HOME, KC_UP , KC_PGUP, + KC_HOME, KC_UP , KC_PGUP, KC_TRNS, KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, - KC_END , KC_DOWN, KC_PGDN, - KC_INS , KC_DEL , QK_BOOT + KC_END , KC_DOWN, KC_PGDN, QK_BOOT, + KC_INS , KC_INS , KC_DEL , QK_BOOT ), - [2] = LAYOUT_numpad_6x4( + [2] = LAYOUT_ortho_6x4( 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 ), - [3] = LAYOUT_numpad_6x4( + [3] = LAYOUT_ortho_6x4( + 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 ), }; From 64eb2da7ef0a06fc6d528205e55eecb8244e6564 Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sun, 12 Feb 2023 13:42:45 -0500 Subject: [PATCH 7/9] Update keyboards/thepanduuh/degenpad/config.h Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/thepanduuh/degenpad/config.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboards/thepanduuh/degenpad/config.h b/keyboards/thepanduuh/degenpad/config.h index 73ed3fda1839..a2a171890d2a 100644 --- a/keyboards/thepanduuh/degenpad/config.h +++ b/keyboards/thepanduuh/degenpad/config.h @@ -26,7 +26,3 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 From fcee5d1cfa5eebe794d70a717a569a61448474ed Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Sun, 12 Feb 2023 14:25:31 -0500 Subject: [PATCH 8/9] Delete Encoder Map in default keymap. --- keyboards/thepanduuh/degenpad/keymaps/default/rules.mk | 1 - 1 file changed, 1 deletion(-) delete mode 100644 keyboards/thepanduuh/degenpad/keymaps/default/rules.mk diff --git a/keyboards/thepanduuh/degenpad/keymaps/default/rules.mk b/keyboards/thepanduuh/degenpad/keymaps/default/rules.mk deleted file mode 100644 index 560b06762c13..000000000000 --- a/keyboards/thepanduuh/degenpad/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes #Encoder Mapping From 0b88517aee2379bb8c6c9ab166c6e1889bbf31be Mon Sep 17 00:00:00 2001 From: ThePanduuh Date: Fri, 17 Feb 2023 11:41:05 -0500 Subject: [PATCH 9/9] Remove Encoder Mapping from default keymap.c --- keyboards/thepanduuh/degenpad/keymaps/default/keymap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c b/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c index 223b4eb273a3..82b553d10404 100644 --- a/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c +++ b/keyboards/thepanduuh/degenpad/keymaps/default/keymap.c @@ -45,9 +45,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, - [_FN] = {ENCODER_CCW_CW(KC_NO, KC_NO)}, -}; -#endif