summaryrefslogtreecommitdiff
path: root/keyboards/joshajohnson/hub20
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/joshajohnson/hub20')
-rw-r--r--keyboards/joshajohnson/hub20/chconf.h41
-rw-r--r--keyboards/joshajohnson/hub20/config.h24
-rw-r--r--keyboards/joshajohnson/hub20/halconf.h31
-rw-r--r--keyboards/joshajohnson/hub20/hub20.c171
-rw-r--r--keyboards/joshajohnson/hub20/info.json147
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/default/keymap.c54
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c60
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c62
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/via/keymap.c70
-rw-r--r--keyboards/joshajohnson/hub20/keymaps/via/rules.mk1
-rw-r--r--keyboards/joshajohnson/hub20/mcuconf.h34
-rwxr-xr-xkeyboards/joshajohnson/hub20/readme.md24
-rw-r--r--keyboards/joshajohnson/hub20/rules.mk15
13 files changed, 734 insertions, 0 deletions
diff --git a/keyboards/joshajohnson/hub20/chconf.h b/keyboards/joshajohnson/hub20/chconf.h
new file mode 100644
index 0000000000..3ac1345068
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/chconf.h
@@ -0,0 +1,41 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/hub20/chconf.h -r platforms/chibios/common/configs/chconf.h`
+ */
+
+#pragma once
+
+#define CH_CFG_ST_FREQUENCY 10000
+
+#define CH_CFG_OPTIMIZE_SPEED FALSE
+
+#define CH_CFG_USE_REGISTRY TRUE
+
+#define CH_CFG_USE_WAITEXIT TRUE
+
+#define CH_CFG_USE_CONDVARS TRUE
+
+#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+
+#define CH_CFG_USE_MESSAGES TRUE
+
+#define CH_CFG_USE_MAILBOXES TRUE
+
+#include_next <chconf.h>
+
diff --git a/keyboards/joshajohnson/hub20/config.h b/keyboards/joshajohnson/hub20/config.h
new file mode 100644
index 0000000000..29471149d1
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/config.h
@@ -0,0 +1,24 @@
+/*
+Copyright 2020 joshajohnson
+Copyright 2021 peepeetee
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/joshajohnson/hub20/halconf.h b/keyboards/joshajohnson/hub20/halconf.h
new file mode 100644
index 0000000000..80669d6dc6
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/halconf.h
@@ -0,0 +1,31 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/hub20/halconf.h -r platforms/chibios/common/configs/halconf.h`
+ */
+
+#pragma once
+
+#define HAL_USE_I2C TRUE
+
+#define HAL_USE_PWM TRUE
+
+#define HAL_USE_SPI TRUE
+
+#include_next <halconf.h>
+
diff --git a/keyboards/joshajohnson/hub20/hub20.c b/keyboards/joshajohnson/hub20/hub20.c
new file mode 100644
index 0000000000..8b1c58e1f7
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/hub20.c
@@ -0,0 +1,171 @@
+/* Copyright 2020 joshajohnson 2021 peepeetee
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "quantum.h"
+
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = { {
+ // Key Matrix to LED Index
+ {NO_LED,NO_LED,NO_LED,NO_LED},
+ { 7, 8, 9, 10},
+ { 11, 12, 13, 14},
+ { 15, 16, 17, 18},
+ { 19, 20, 21, 22},
+ { 23, 24, 25, 26}
+ //todo: assign leds to keys differently for the different layouts
+}, {
+ // LED Index to Physical Position
+ { 190, 50}, { 111, 50}, { 35, 50}, {38, 0}, {38, 35}, {186, 35}, {186, 0}, // UNDERGLOW
+ //todo: underglow location needs to be recalculated. The top row is above row 4, and for now they have the same y value 0
+ { 0, 0}, {75, 0}, {150, 0}, {225, 0}, // row 4
+ { 0, 16}, {75, 16}, {150, 16}, {225, 16}, // row 3
+ { 0, 32}, {75, 32}, {150, 32}, {225, 32}, // row 2
+ { 0, 48}, {75, 48}, {150, 48}, {225, 48}, // row 1
+ { 0, 64}, {75, 64}, {150, 64}, {225, 64} // row 0
+
+}, {
+ // LED Index to Flag
+ LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, // UNDERGLOW
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 4
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 3
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 2
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // row 1
+ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT // row 0
+
+} };
+#endif
+
+
+
+// #if LED_MERGE_NUMPAD_LEFT_HANDED_ENTER && LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO
+// #error lower left enter conflicts with lower left zero
+// #endif
+
+// #if LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER && LED_MERGE_NUMPAD_LEFT_HANDED_ZERO
+// #error lower right enter conflicts with lower right zero
+// #endif
+
+// /* LAYOUT_left_handed
+
+
+// * ┌───┬───┐
+// * │01 │02 │
+// * ┌───┼───┼───┼───┐
+// * │10 │11 │12 │13 │
+// * ├───┼───┼───┼───┤
+// * │ │21 │22 │23 │
+// * │20 ├───┼───┼───┤
+// * │ │31 │32 │33 │
+// * ├───┼───┼───┼───┤
+// * │ │41 │42 │43 │
+// * │40 ├───┼───┴───┤
+// * │ │51 │ 52 │
+// * └───┴───┴───────┘
+// */
+
+// #ifndef LED_MERGE_NUMPAD_LEFT_HANDED_PLUS //key 20
+// #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS FALSE
+// #endif // LED_MERGE_NUMPAD_LEFT_HANDED_PLUS
+
+// #ifndef LED_MERGE_NUMPAD_LEFT_HANDED_ENTER //key 40
+// #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER FALSE
+// #endif // LED_MERGE_NUMPAD_LEFT_HANDED_ENTER
+
+// #ifndef LED_MERGE_NUMPAD_LEFT_HANDED_ZERO //key 52
+// #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO FALSE
+// #endif // LED_MERGE_NUMPAD_LEFT_HANDED_ZERO
+
+
+// /* LAYOUT_right_handed
+
+
+// * ┌───┬───┐
+// * │01 │02 │
+// * ┌───┼───┼───┼───┐
+// * │10 │11 │12 │13 │
+// * ├───┼───┼───┼───┤
+// * │20 │21 │22 │ │
+// * ├───┼───┼───┤23 │
+// * │30 │31 │32 │ │
+// * ├───┼───┼───┼───┤
+// * │40 │41 │42 │ │
+// * ├───┴───┼───┤43 │
+// * │ 50 │52 │ │
+// * └───────┴───┴───┘
+// */
+// //LOCATION OF bottom row 0 NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER
+
+// #ifndef LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS // key 23
+// #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS FALSE
+// #endif // LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS
+
+// #ifndef LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER // key 43
+// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER FALSE
+// #endif // LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER
+
+// #ifndef LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO // key 50 (confirm with manufacturer)
+// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO FALSE
+// #endif // LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO
+
+// uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
+// // Keys here have 2 leds. Here we add the led that is not bound to the key
+// // and the default led would be added
+// // by the default code that runs after this in rgb_matrix_map_row_column_to_led
+
+// uint8_t counter = 0;
+
+// #if LED_MERGE_NUMPAD_LEFT_HANDED_PLUS //key 20, leds 7 and 11, 7 already bound
+
+// if (row == 2 && column == 0) {
+// led_i[counter] = 11;
+// counter ++;
+// }
+// #endif
+// #if LED_MERGE_NUMPAD_LEFT_HANDED_ENTER //key 40, leds 19 and 23, 23 already bound
+// if (row == 4 && column == 0) {
+// led_i[counter] = 23;
+// counter ++;
+// }
+// #endif
+// #if LED_MERGE_NUMPAD_LEFT_HANDED_ZERO //key 52, leds 25 and 26, 26 already bound
+// if (row == 5 && column == 2) {
+// led_i[counter] = 26;
+// counter ++;
+// }
+// #endif
+
+// #if LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS // key 23, led 14 and 18, 14 already bound
+// if (row == 2 && column == 3) {
+// led_i[counter] = 18;
+// counter ++;
+// }
+// #endif
+// #if LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER // key 43, led 22 and 26, 22 already bound
+// if (row == 4 && column == 3) {
+// led_i[counter] = 26;
+// counter ++;
+// }
+// #endif
+// #if LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO // key 50 (confirm with manufacturer)
+// // LED 23 and 24, 23(?) already bound
+// if (row == 5 && column == 0) {
+// led_i[counter] = 24;
+// counter ++;
+// }
+// #endif
+// return counter;
+// }
diff --git a/keyboards/joshajohnson/hub20/info.json b/keyboards/joshajohnson/hub20/info.json
new file mode 100644
index 0000000000..b1b25dc1d4
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/info.json
@@ -0,0 +1,147 @@
+{
+ "keyboard_name": "Hub20",
+ "manufacturer": "Josh Johnson",
+ "url": "https://github.com/joshajohnson/hub20",
+ "maintainer": "joshajohnson",
+ "usb": {
+ "vid": "0x6A6A",
+ "pid": "0x4414",
+ "device_version": "0.0.1"
+ },
+ "rgb_matrix": {
+ "animations": {
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true
+ },
+ "driver": "ws2812"
+ },
+ "matrix_pins": {
+ "cols": ["A6", "A7", "B7", "B6"],
+ "rows": ["A13", "B14", "A10", "A0", "A2", "A1"]
+ },
+ "diode_direction": "COL2ROW",
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B12", "pin_b": "B13"},
+ {"pin_a": "A8", "pin_b": "A9"}
+ ]
+ },
+ "qmk": {
+ "tap_keycode_delay": 10
+ },
+ "rgblight": {
+ "led_count": 27
+ },
+ "ws2812": {
+ "pin": "B15"
+ },
+ "processor": "STM32F072",
+ "bootloader": "stm32-dfu",
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"matrix": [0, 1], "x": 0.5, "y": 0},
+
+ {"matrix": [0, 2], "x": 2.5, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4},
+ {"matrix": [4, 1], "x": 1, "y": 4},
+ {"matrix": [4, 2], "x": 2, "y": 4},
+ {"matrix": [4, 3], "x": 3, "y": 4},
+
+ {"matrix": [5, 0], "x": 0, "y": 5},
+ {"matrix": [5, 1], "x": 1, "y": 5},
+ {"matrix": [5, 2], "x": 2, "y": 5},
+ {"matrix": [5, 3], "x": 3, "y": 5}
+ ]
+ },
+ "LAYOUT_left_handed": {
+ "layout": [
+ {"matrix": [0, 1], "x": 0.5, "y": 0},
+
+ {"matrix": [0, 2], "x": 2.5, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+
+ {"matrix": [2, 0], "x": 0, "y": 2, "h": 2},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3},
+
+ {"matrix": [4, 1], "x": 0, "y": 4, "h": 2},
+ {"matrix": [4, 2], "x": 1, "y": 4},
+ {"matrix": [4, 3], "x": 2, "y": 4},
+ {"matrix": [4, 0], "x": 3, "y": 4},
+
+ {"matrix": [5, 1], "x": 1, "y": 5},
+ {"matrix": [5, 2], "x": 2, "y": 5, "w": 2}
+ ]
+ },
+ "LAYOUT_right_handed": {
+ "layout": [
+ {"matrix": [0, 1], "x": 0.5, "y": 0},
+
+ {"matrix": [0, 2], "x": 2.5, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [2, 3], "x": 3, "y": 2, "h": 2},
+
+ {"matrix": [4, 0], "x": 0, "y": 4},
+ {"matrix": [4, 1], "x": 1, "y": 4},
+ {"matrix": [4, 2], "x": 2, "y": 4},
+
+ {"matrix": [5, 0], "x": 0, "y": 5, "w": 2},
+ {"matrix": [5, 2], "x": 2, "y": 5},
+ {"matrix": [4, 3], "x": 3, "y": 4, "h": 2}
+ ]
+ }
+ }
+}
diff --git a/keyboards/joshajohnson/hub20/keymaps/default/keymap.c b/keyboards/joshajohnson/hub20/keymaps/default/keymap.c
new file mode 100644
index 0000000000..e943780258
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/keymaps/default/keymap.c
@@ -0,0 +1,54 @@
+/* Copyright 2020 joshajohnson
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+#define MO_NLCK LT(1, KC_NUM) // Numlock on tap, layer change on hold
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ KC_MUTE, KC_MPLY,
+ KC_PMNS, KC_PAST, KC_PSLS, MO_NLCK,
+ KC_PPLS, KC_P7, KC_P8, KC_P9,
+ KC_PPLS, KC_P4, KC_P5, KC_P6,
+ KC_PENT, KC_P1, KC_P2, KC_P3,
+ KC_PENT, KC_PDOT, KC_P0, KC_P0
+),
+ [1] = LAYOUT_all(
+ QK_BOOT, _______,
+ RGB_TOG, RGB_RMOD, RGB_MOD, _______,
+ _______, RGB_VAD, RGB_VAI, _______,
+ _______, RGB_HUD, RGB_HUI, _______,
+ _______, RGB_SAD, RGB_SAI, _______,
+ _______, _______, _______, _______
+)
+};
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* Left Encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) { /* Right Encoder */
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c b/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c
new file mode 100644
index 0000000000..fe848d7c33
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/keymaps/left_hand_numpad/keymap.c
@@ -0,0 +1,60 @@
+/* Copyright 2020 joshajohnson 2021 peepeetee
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS TRUE
+// #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER TRUE
+// #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO TRUE
+
+#define MO_NLCK LT(1, KC_NUM) // Numlock on tap, layer change on hold
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_left_handed(
+ KC_MUTE, KC_MPLY,
+ KC_PMNS, KC_PAST, KC_PSLS, MO_NLCK,
+ KC_P7, KC_P8, KC_P9,
+ KC_PPLS, KC_P4, KC_P5, KC_P6,
+ KC_P1, KC_P2, KC_P3,
+ KC_PENT, KC_PDOT, KC_P0
+),
+ [1] = LAYOUT_left_handed(
+ QK_BOOT, _______,
+ RGB_TOG, RGB_RMOD, RGB_MOD, _______,
+ _______, RGB_VAD, RGB_VAI, _______,
+ RGB_HUD, RGB_HUI, _______,
+ _______, RGB_SAD, RGB_SAI, _______,
+ _______, _______
+)
+};
+// clang-format of
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* Left Encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) { /* Right Encoder */
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c b/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c
new file mode 100644
index 0000000000..71168069fb
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/keymaps/right_hand_numpad/keymap.c
@@ -0,0 +1,62 @@
+/* Copyright 2021 peepeetee
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS TRUE
+// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER TRUE
+// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO TRUE
+
+#define MO_NLCK LT(1, KC_NUM) // Numlock on tap, layer change on hold
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+//NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER
+ [0] = LAYOUT_right_handed(
+ KC_MUTE, KC_MPLY,
+ MO_NLCK, 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_right_handed(
+ QK_BOOT, _______,
+ RGB_TOG, RGB_RMOD, RGB_MOD, _______,
+ _______, RGB_VAD, RGB_VAI,
+ _______, RGB_HUD, RGB_HUI, _______,
+ _______, RGB_SAD, RGB_SAI,
+ _______, _______, _______
+)
+};
+// clang-format on
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* Left Encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) { /* Right Encoder */
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/joshajohnson/hub20/keymaps/via/keymap.c b/keyboards/joshajohnson/hub20/keymaps/via/keymap.c
new file mode 100644
index 0000000000..b8d7e6fdc8
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/keymaps/via/keymap.c
@@ -0,0 +1,70 @@
+/* Copyright 2020 joshajohnson
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+#define MO_NLCK LT(1, KC_NUM)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ KC_MUTE, KC_MPLY,
+ KC_PMNS, KC_PAST, KC_PSLS, MO_NLCK,
+ KC_PPLS, KC_P7, KC_P8, KC_P9,
+ KC_PPLS, KC_P4, KC_P5, KC_P6,
+ KC_PENT, KC_P1, KC_P2, KC_P3,
+ KC_PENT, KC_PDOT, KC_P0, KC_P0
+),
+ [1] = LAYOUT_all(
+ QK_BOOT, _______,
+ RGB_TOG, RGB_RMOD, RGB_MOD, _______,
+ _______, RGB_VAD, RGB_VAI, _______,
+ _______, RGB_HUD, RGB_HUI, _______,
+ _______, RGB_SAD, RGB_SAI, _______,
+ _______, _______, _______, _______
+),
+ [2] = LAYOUT_all(
+ _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+),
+ [3] = LAYOUT_all(
+ _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+)
+};
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* Left Encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) { /* Right Encoder */
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/joshajohnson/hub20/keymaps/via/rules.mk b/keyboards/joshajohnson/hub20/keymaps/via/rules.mk
new file mode 100644
index 0000000000..1e5b99807c
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/joshajohnson/hub20/mcuconf.h b/keyboards/joshajohnson/hub20/mcuconf.h
new file mode 100644
index 0000000000..f783c39b1d
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/mcuconf.h
@@ -0,0 +1,34 @@
+/* Copyright 2020 QMK
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * This file was auto-generated by:
+ * `qmk chibios-confmigrate -i keyboards/hub20/mcuconf.h -r platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h`
+ */
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 TRUE
+
+#undef STM32_SPI_USE_SPI2
+#define STM32_SPI_USE_SPI2 TRUE
+
diff --git a/keyboards/joshajohnson/hub20/readme.md b/keyboards/joshajohnson/hub20/readme.md
new file mode 100755
index 0000000000..a3b5aba641
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/readme.md
@@ -0,0 +1,24 @@
+# Hub20
+
+Hub20 is a 20 key macro pad with an inbuilt USB 2.0 hub and dual rotary encoders. It can be configured to be a left / right hand numberpad, along with a 4x5 1u layout.
+
+For more information regarding the keyboard, please visit the [Hub20 Website](https://www.joshajohnson.com/hub20) or [GitHub Repo](https://github.com/joshajohnson/Hub20).
+
+* Keyboard Maintainer: [Josh Johnson](https://github.com/joshajohnson)
+* Hardware Supported: Hub20 PCB (STM32F072)
+* Hardware Availability: [Josh Johnson](https://www.joshajohnson.com/hub20)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make joshajohnson/hub20:default
+
+Flashing example for this keyboard:
+
+ make joshajohnson/hub20:default:flash
+
+To reset the board into bootloader mode, do one of the following:
+
+* Press the reset switch between the center two USB-C ports while the board is plugged in
+* Hold the top left key while connecting the USB cable (also erases persistent settings)
+
+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).
diff --git a/keyboards/joshajohnson/hub20/rules.mk b/keyboards/joshajohnson/hub20/rules.mk
new file mode 100644
index 0000000000..f559246b9e
--- /dev/null
+++ b/keyboards/joshajohnson/hub20/rules.mk
@@ -0,0 +1,15 @@
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # 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 = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+RGB_MATRIX_ENABLE = yes
+ENCODER_ENABLE = yes
+