Community layout support for KBDpad Mk.I (#9220)

* Community layout support for KBDpad Mk.I

* Matching spacing
This commit is contained in:
Ryan 2020-05-28 11:27:14 +10:00 committed by GitHub
parent cb9be8a9dc
commit 13206b2f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 159 additions and 35 deletions

View file

@ -1,12 +1,100 @@
{ {
"keyboard_name": "KBDfans KBDPad MKI", "keyboard_name": "KBDfans KBDPad MKI",
"url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit", "url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit",
"maintainer": "qmk", "maintainer": "qmk",
"width": 4, "width": 4,
"height": 6.25, "height": 6.25,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"layout": [{"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": [
} {"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_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_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}
]
}
}
} }

View file

@ -17,11 +17,12 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(\ [0] = LAYOUT(
KC_DEL, KC_BSPC, \ KC_DEL, KC_BSPC,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, \ KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS, \ KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, \ KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT) \ KC_P0, KC_PDOT, KC_PENT
)
}; };

View file

@ -13,26 +13,59 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include "quantum.h" #include "quantum.h"
// This a shortcut to help you visually see your layout. // This is a shortcut to help you visually see your layout.
// The first section contains all of the arguments // The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array // The second converts the arguments into a two-dimensional array
#define LAYOUT( \ #define LAYOUT( \
k52, k53, \ k52, k53, \
k40, k41, k42, k43, \ k40, k41, k42, k43, \
k30, k31, k32, \ k30, k31, k32, \
k20, k21, k22, k23, \ k20, k21, k22, k23, \
k10, k11, k12, \ k10, k11, k12, \
k00, k02, k03 \ k00, k02, k03 \
){ \ ) { \
{ k00, KC_NO, k02, k03 }, \ { k00, KC_NO, k02, k03 }, \
{ k10, k11, k12, KC_NO }, \ { k10, k11, k12, KC_NO }, \
{ k20, k21, k22, k23 }, \ { k20, k21, k22, k23 }, \
{ k30, k31, k32, KC_NO }, \ { k30, k31, k32, KC_NO }, \
{ k40, k41, k42, k43 }, \ { k40, k41, k42, k43 }, \
{ KC_NO, KC_NO, k52, k53 }, \ { KC_NO, KC_NO, k52, k53 } \
}
#define LAYOUT_numpad_6x4( \
k50, k51, k52, k53, \
k40, k41, k42, k43, \
k30, k31, k32, \
k20, k21, k22, k23, \
k10, k11, k12, \
k00, k02, k03 \
) { \
{ k00, KC_NO, k02, k03 }, \
{ k10, k11, k12, KC_NO }, \
{ k20, k21, k22, k23 }, \
{ k30, k31, k32, KC_NO }, \
{ k40, k41, k42, k43 }, \
{ k50, k51, k52, k53 } \
}
#define LAYOUT_ortho_6x4( \
k50, k51, k52, k53, \
k40, k41, k42, k43, \
k30, k31, k32, k33, \
k20, k21, k22, k23, \
k10, k11, k12, k13, \
k00, k01, k02, k03 \
) { \
{ k00, k01, k02, k03 }, \
{ k10, k11, k12, k13 }, \
{ k20, k21, k22, k23 }, \
{ k30, k31, k32, k33 }, \
{ k40, k41, k42, k43 }, \
{ k50, k51, k52, k53 } \
} }

View file

@ -1,10 +1,10 @@
# KBDPad MKI # KBDPad MKI
Custom numpad. Custom numpad. The MKI shares the same ATmega32A and matrix layout as the newer V2 PCB (not to be confused with the MKII, which uses an ATmega32U2!).
* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
* Hardware Supported: KBDPad MKI * Hardware Supported: KBDPad MKI, KBDPad V2
* Hardware Availability: [KBDfans](https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit) * Hardware Availability: [KBDfans](https://kbdfans.com/collections/20/products/kbdfans-kbdpad-pcb-v2)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):

View file

@ -20,3 +20,5 @@ COMMAND_ENABLE = no
BACKLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show. RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show.
WS2812_DRIVER = i2c WS2812_DRIVER = i2c
LAYOUTS = ortho_6x4 numpad_6x4