From 76c63609b60be00e300cf3d1bb7c2cdc2bfb910d Mon Sep 17 00:00:00 2001 From: a-quan Date: Sat, 4 Jul 2020 22:20:38 -0700 Subject: [PATCH 1/9] Added VIA functionality for Maypad Added VIA functionality --- keyboards/keyhive/maypad/config.h | 2 +- keyboards/keyhive/maypad/keymaps/via/config.h | 19 +++++++++ keyboards/keyhive/maypad/keymaps/via/keymap.c | 41 +++++++++++++++++++ .../keyhive/maypad/keymaps/via/readme.md | 3 ++ keyboards/keyhive/maypad/keymaps/via/rules.mk | 4 ++ 5 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 keyboards/keyhive/maypad/keymaps/via/config.h create mode 100644 keyboards/keyhive/maypad/keymaps/via/keymap.c create mode 100644 keyboards/keyhive/maypad/keymaps/via/readme.md create mode 100644 keyboards/keyhive/maypad/keymaps/via/rules.mk diff --git a/keyboards/keyhive/maypad/config.h b/keyboards/keyhive/maypad/config.h index 4fce7ffa0c80..b21c48ddc993 100644 --- a/keyboards/keyhive/maypad/config.h +++ b/keyboards/keyhive/maypad/config.h @@ -17,7 +17,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B48 //KH for Keyhive #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER KeyHive diff --git a/keyboards/keyhive/maypad/keymaps/via/config.h b/keyboards/keyhive/maypad/keymaps/via/config.h new file mode 100644 index 000000000000..867ac3066fae --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 codybender + * + * 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 + +// place overrides here diff --git a/keyboards/keyhive/maypad/keymaps/via/keymap.c b/keyboards/keyhive/maypad/keymaps/via/keymap.c new file mode 100644 index 000000000000..dc7709871590 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 codybender + * + * 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] = { + +LAYOUT_ortho_5x4( + KC_1, KC_2, KC_3, KC_4, + KC_1, KC_2, KC_3, KC_4, + KC_1, KC_2, KC_3, KC_4, + KC_1, KC_2, KC_3, KC_4, + KC_1, KC_2, KC_3, KC_4, +) + +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/keyhive/maypad/keymaps/via/readme.md b/keyboards/keyhive/maypad/keymaps/via/readme.md new file mode 100644 index 000000000000..77c1ab4c8ec1 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Via supported ortho layout, with 5 rows and 4 columns. +# Unfortunately the only Maypad I've built is in the 5x4 pattern (I use it as a macropad), but it should be relatively simple to do the same with the numpad. + diff --git a/keyboards/keyhive/maypad/keymaps/via/rules.mk b/keyboards/keyhive/maypad/keymaps/via/rules.mk new file mode 100644 index 000000000000..cb3806ae5cfa --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LT0_ENABLE = yes +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes From 1694c678c9509f22a54697c2e618d9f1fa8de74c Mon Sep 17 00:00:00 2001 From: a-quan Date: Sat, 4 Jul 2020 22:25:26 -0700 Subject: [PATCH 2/9] Updated readme.md --- keyboards/keyhive/maypad/keymaps/via/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keyhive/maypad/keymaps/via/readme.md b/keyboards/keyhive/maypad/keymaps/via/readme.md index 77c1ab4c8ec1..d874b694639e 100644 --- a/keyboards/keyhive/maypad/keymaps/via/readme.md +++ b/keyboards/keyhive/maypad/keymaps/via/readme.md @@ -1,3 +1,3 @@ # Via supported ortho layout, with 5 rows and 4 columns. -# Unfortunately the only Maypad I've built is in the 5x4 pattern (I use it as a macropad), but it should be relatively simple to do the same with the numpad. + From 427b7f1120dbab3fd0375744b36df1a4adf31c5c Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 22:30:38 -0700 Subject: [PATCH 3/9] Update readme.md --- keyboards/keyhive/maypad/keymaps/via/readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/keyhive/maypad/keymaps/via/readme.md b/keyboards/keyhive/maypad/keymaps/via/readme.md index d874b694639e..7f3b71756352 100644 --- a/keyboards/keyhive/maypad/keymaps/via/readme.md +++ b/keyboards/keyhive/maypad/keymaps/via/readme.md @@ -1,3 +1,6 @@ -# Via supported ortho layout, with 5 rows and 4 columns. +# VIA Support for Maypad +This adds [VIA](https://caniusevia.com/) support for the Keyhive Maypad. + +Please note that this is a keymap for the Ortho_5x4 layout. From 57231a1e4bd8b073d02577774a75409913b4a91a Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 22:58:09 -0700 Subject: [PATCH 4/9] Update keymap.c Removed comma causing error when trying to compile. --- keyboards/keyhive/maypad/keymaps/via/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/keyhive/maypad/keymaps/via/keymap.c b/keyboards/keyhive/maypad/keymaps/via/keymap.c index dc7709871590..40087dc68a37 100644 --- a/keyboards/keyhive/maypad/keymaps/via/keymap.c +++ b/keyboards/keyhive/maypad/keymaps/via/keymap.c @@ -18,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_5x4( - KC_1, KC_2, KC_3, KC_4, - KC_1, KC_2, KC_3, KC_4, - KC_1, KC_2, KC_3, KC_4, - KC_1, KC_2, KC_3, KC_4, - KC_1, KC_2, KC_3, KC_4, + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, KC_H, + KC_I, KC_J, KC_K, KC_L, + KC_M, KC_N, KC_O, KC_P, + KC_Q, KC_R, KC_S, KC_T ) }; From 36e63b014c47c0e1ea0c041b5b29cc6e869c7518 Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 23:06:59 -0700 Subject: [PATCH 5/9] Update keyboards/keyhive/maypad/config.h Change product_ID to value for MP Co-authored-by: Ryan --- keyboards/keyhive/maypad/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keyhive/maypad/config.h b/keyboards/keyhive/maypad/config.h index b21c48ddc993..00a46dafc1c3 100644 --- a/keyboards/keyhive/maypad/config.h +++ b/keyboards/keyhive/maypad/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x4B48 //KH for Keyhive -#define PRODUCT_ID 0x6060 +#define PRODUCT_ID 0x4D50 // MP #define DEVICE_VER 0x0001 #define MANUFACTURER KeyHive #define PRODUCT maypad From 6f401bc92d51570dce2931bd2e6a402a38782018 Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 23:08:06 -0700 Subject: [PATCH 6/9] Update config.h Removed copyright as part of line 1 per suggestion. --- keyboards/keyhive/maypad/keymaps/via/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keyhive/maypad/keymaps/via/config.h b/keyboards/keyhive/maypad/keymaps/via/config.h index 867ac3066fae..b0763142361e 100644 --- a/keyboards/keyhive/maypad/keymaps/via/config.h +++ b/keyboards/keyhive/maypad/keymaps/via/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 codybender +/* * * 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 From 5a1aac9d6ee5344c8d859f6b0eb5285900676683 Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 23:09:28 -0700 Subject: [PATCH 7/9] Update keyboards/keyhive/maypad/keymaps/via/keymap.c Update VIA Layout to match the default layout. Co-authored-by: Ryan --- keyboards/keyhive/maypad/keymaps/via/keymap.c | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/keyboards/keyhive/maypad/keymaps/via/keymap.c b/keyboards/keyhive/maypad/keymaps/via/keymap.c index 40087dc68a37..04ad4501b214 100644 --- a/keyboards/keyhive/maypad/keymaps/via/keymap.c +++ b/keyboards/keyhive/maypad/keymaps/via/keymap.c @@ -16,26 +16,11 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -LAYOUT_ortho_5x4( - KC_A, KC_B, KC_C, KC_D, - KC_E, KC_F, KC_G, KC_H, - KC_I, KC_J, KC_K, KC_L, - KC_M, KC_N, KC_O, KC_P, - KC_Q, KC_R, KC_S, KC_T -) - + LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ) }; - - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} From 08d9578fa4aba79ebd9206d30aee01cf51033d8f Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 23:10:26 -0700 Subject: [PATCH 8/9] Update keyboards/keyhive/maypad/keymaps/via/rules.mk Remove extra options that are not required. Co-authored-by: Ryan --- keyboards/keyhive/maypad/keymaps/via/rules.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/keyhive/maypad/keymaps/via/rules.mk b/keyboards/keyhive/maypad/keymaps/via/rules.mk index cb3806ae5cfa..36b7ba9cbc98 100644 --- a/keyboards/keyhive/maypad/keymaps/via/rules.mk +++ b/keyboards/keyhive/maypad/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes -LT0_ENABLE = yes -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +LTO_ENABLE = yes From e55a386af47ea7903df7bc248dfc9228b401b8ea Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Sat, 4 Jul 2020 23:14:51 -0700 Subject: [PATCH 9/9] Delete config.h Removed config.h from keymaps/via folder by suggestion. --- keyboards/keyhive/maypad/keymaps/via/config.h | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 keyboards/keyhive/maypad/keymaps/via/config.h diff --git a/keyboards/keyhive/maypad/keymaps/via/config.h b/keyboards/keyhive/maypad/keymaps/via/config.h deleted file mode 100644 index b0763142361e..000000000000 --- a/keyboards/keyhive/maypad/keymaps/via/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * - * 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 - -// place overrides here