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

add kbdpadmk3 #18795

Merged
merged 19 commits into from
Dec 4, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
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
62 changes: 62 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* Copyright 2022 DZTECH <[email protected]>
*
* 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
#include "config_common.h"

#define MATRIX_ROW_PINS { F4, C7, C6, B6, B5, D7 }
#define MATRIX_COL_PINS { F7, F6, D5, D3 }

#define RGB_DI_PIN F5 // RGB LED pin
#define RGBLED_NUM 21 // Number of LEDs
#define DRIVER_LED_TOTAL 21 // Number of LEDs
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128
#define RGB_MATRIX_LED_FLUSH_LIMIT 16
#define RGB_MATRIX_KEYPRESSES

#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_BAND_SAT
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define ENABLE_RGB_MATRIX_HUE_BREATHING
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
#define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH

54 changes: 54 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"manufacturer": "kbdfans",
"keyboard_name": "Kbdpadmk3",
"maintainer": "kbdfans",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix":true
},
"processor": "atmega32u4",
"usb": {
"device_version": "3.0.0",
"pid": "0x0012",
"vid": "0x4B42"
}
"layouts" :{
"LAYOUT_numpad_6x4": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},

{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},

{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},

{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":2, "h":2},

{"x":0, "y":4},
{"x":1, "y":4},
{"x":2, "y":4},

{"x":0, "y":5, "w":2},
{"x":2, "y":5},
{"x":3, "y":4, "h":2}
]
}
}
}
28 changes: 28 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright 2022 DZTECH <[email protected]>
*
* 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


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_6x4( /* Base */
KC_ESC, KC_LCTL, KC_LALT, 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,
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
)
};
52 changes: 52 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Copyright 2022 DZTECH <[email protected]>
*
* 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


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_6x4( /* Base */
KC_ESC, KC_LCTL, KC_LALT, 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,
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
),
[1] = LAYOUT_numpad_6x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[2] = LAYOUT_numpad_6x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
[3] = LAYOUT_numpad_6x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______,
_______, _______, _______
),
};
1 change: 1 addition & 0 deletions keyboards/kbdfans/kbdpad/mk3/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
51 changes: 51 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/mk3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Copyright 2022 DZTECH <[email protected]>
*
* 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 "mk3.h"

#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
{ 0, 1, 2, 3 },
{ 7, 6, 5, 4 },
{ 8, 9, 10, 11 },
{ 14, 13, 12, NO_LED },
{ 15, 16, 17, 18 },
{ 20, NO_LED, 19,NO_LED }
}, {
{0, 0}, {75, 0}, {150, 0},{224, 0},
{224, 12.8}, {150, 12.8},{75, 12.8},{0, 12.8},
{0, 25.6}, {75, 25.6},{150, 25.6},{224, 32},
{150, 38.4}, {75, 38.4},{0, 38.4},
{0, 51.2}, {75, 51.2},{150, 51.24},{224, 57.6},
{150, 64}, {37.5, 64}
}, {
4,4,4,4,
4,4,4,4,
4,4,4,4,
4,4,4,
4,4,4,4,
4,4
} };


__attribute__ ((weak))
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
void rgb_matrix_indicators_user(void)
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
{
if (host_keyboard_led_state().num_lock)
{
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
rgb_matrix_set_color(7, 0xFF, 0xFF, 0xFF);
}
}
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
#endif
43 changes: 43 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/mk3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* Copyright 2022 DZTECH <[email protected]>
*
* 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

#include "quantum.h"

/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_numpad_6x4( \
K00, K01, K02, K03, \
K10, K11, K12, K13, \
K20, K21, K22, \
K30, K31, K32, K23, \
K40, K41, K42, \
K50, K52, K43, \
moyi4681 marked this conversation as resolved.
Show resolved Hide resolved
) \
{ \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, KC_NO}, \
{ K40, K41, K42, K43 }, \
{ K50, KC_NO, K52, KC_NO } \
}
23 changes: 23 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# KBDPAD MK3

An RGB hotswap 21key numpad.

* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681)
* Hardware Supported: KBDFANS
* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/)


## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix
* **Physical reset button**: Briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `RESET` if it is available


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

make kbdfans/kbdpad/mk3:default

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).
2 changes: 2 additions & 0 deletions keyboards/kbdfans/kbdpad/mk3/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RGB_MATRIX_DRIVER = WS2812
LTO_ENABLE = yes