Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community layout support for KBDpad Mk.I #9220

Merged
merged 2 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 93 additions & 10 deletions keyboards/kbdfans/kbdpad/mk1/info.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,95 @@
{
"keyboard_name": "KBDfans KBDPad MKI",
"url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit",
"maintainer": "qmk",
"width": 4,
"height": 6.25,
"layouts": {
"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}]
}
}
"keyboard_name": "KBDfans KBDPad MKI",
"url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit",
"maintainer": "qmk",
"width": 4,
"height": 6.25,
"layouts": {
"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_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}
]
}
}
}
15 changes: 8 additions & 7 deletions keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(\
KC_DEL, KC_BSPC, \
KC_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) \
[0] = LAYOUT(
KC_DEL, KC_BSPC,
KC_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
)
};
63 changes: 48 additions & 15 deletions keyboards/kbdfans/kbdpad/mk1/mk1.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,59 @@
* 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

#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 second converts the arguments into a two-dimensional array

#define LAYOUT( \
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 }, \
{ KC_NO, KC_NO, k52, k53 }, \
#define LAYOUT( \
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 }, \
{ 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 } \
}
6 changes: 3 additions & 3 deletions keyboards/kbdfans/kbdpad/mk1/readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 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)
* Hardware Supported: KBDPad MKI
* Hardware Availability: [KBDfans](https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit)
* Hardware Supported: KBDPad MKI, KBDPad V2
* Hardware Availability: [KBDfans](https://kbdfans.com/collections/20/products/kbdfans-kbdpad-pcb-v2)

Make example for this keyboard (after setting up your build environment):

Expand Down
2 changes: 2 additions & 0 deletions keyboards/kbdfans/kbdpad/mk1/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ COMMAND_ENABLE = no
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show.
WS2812_DRIVER = i2c

LAYOUTS = ortho_6x4 numpad_6x4