Skip to content
Permalink
Browse files

New Keyboard: Sentraq Number Pad RGB DIY Kit (#5047)

* Added QMK Config for Sentraq Number Pad keyboard.

* Sentraq Number Pad documentation cleanup.

* mend

* Added json for configurator.

* Small documentation tweaks.

* Updated the layouts to use the default layouts that match.

* Uncommended user level functions in keymap, left custom keycode/macro code commented but documented why.

* Switched to #pragma once from #ifndef structure in header file.

* Moved Sentraq number pad to sentraq creator directory.

* Renamed sentraq_number_pad to number_pad now that it's nested in the sentraq directory.

* Updated references inside the files for the keyboard rename and nesting.
  • Loading branch information
ShadeDream authored and mechmerlin committed Feb 4, 2019
1 parent c4ce613 commit b6fbcd9d6210524fe73921db12209e8703c74d2d
@@ -0,0 +1,83 @@
/*
Copyright 2019 QMK Community
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"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER Sentraq
#define PRODUCT Sentraq Number Pad
#define DESCRIPTION RBG backlit number pad kit

/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 4

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { F5, F0, B5, D6, D4 }
#define MATRIX_COL_PINS { C7, D5, D1, D0 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3

#define RGB_DI_PIN B0
#ifdef RGB_DI_PIN
#define RGBLED_NUM 13
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
#define RGBLIGHT_ANIMATIONS
/*== or choose animations ==*/
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#endif

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5

/* key combination for magic key command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
@@ -0,0 +1,29 @@
{
"keyboard_name": "Sentraq Number Pad",
"maintainer": "qmk",
"url": "https://sentraq.com/collections/kits/products/number-pad-rgb-kit",
"width": 4,
"height": 5,
"layouts": {
"LAYOUT_numpad_5x4": {
"keycount": 17,
"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, "h":2},
{"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":3, "h":2},
{"x":0, "y":4, "w":2}, {"x":2, "y":4}
]
},
"LAYOUT_ortho_5x4": {
"keycount": 20,
"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":3, "y":2},
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3},
{"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}
]
}
}
}
@@ -0,0 +1,105 @@
/* Copyright 2019 QMK Community
*
* 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 _BL 0
#define _FN 1

// Defines the keycodes used by our macros in process_record_user.
// Disabled as it isn't used in this keymap, but available for modification.
// enum custom_keycodes {
// QMKBEST = SAFE_RANGE,
// QMKURL
// };

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_numpad_5x4(
/* Base Layer: Number Pad
* ,---------------.
* |FN | / | * | - |
* |---+---+---|---|
* | 7 | 8 | 9 | |
* |---+---+---| + |
* | 4 | 5 | 6 | |
* |---+---+---|---|
* | 1 | 2 | 3 | |
* |---+---+---|Ent|
* | 0 | . | |
* `---------------'
*/
MO(_FN), 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
),
/* Function Layer: RGB Controls and Numlock
* ,---------------.
* |FN |TOG|M+ |M- | Mode
* |---+---+---|---|
* | |H- |H+ | | Hue
* |---+---+---| |
* | |S- |S+ | | Saturation
* |---+---+---|---|
* | |B- |B+ |NUM| Brightness
* |---+---+---| |
* | | |LCK|
* `---------------'
*/
[_FN] = LAYOUT_numpad_5x4(
KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, \
KC_NO, RGB_HUD, RGB_HUI, \
KC_NO, RGB_SAD, RGB_SAI, KC_NO, \
KC_NO, RGB_VAD, RGB_VAI, \
KC_NO, KC_NO, KC_NLCK
),
};

// Handles macros for keycodes defined above.
// Disabled as it isn't used in this keymap, but available for modification.
// bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// switch (keycode) {
// case QMKBEST:
// if (record->event.pressed) {
// // when keycode QMKBEST is pressed
// SEND_STRING("QMK is the best thing ever!");
// } else {
// // when keycode QMKBEST is released
// }
// break;
// case QMKURL:
// if (record->event.pressed) {
// // when keycode QMKURL is pressed
// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
// } else {
// // when keycode QMKURL is released
// }
// break;
// }
// return true;
// }

void matrix_init_user(void) {

}

void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}
@@ -0,0 +1 @@
# The default keymap for Sentraq Number Pad RGB DIY Kit
@@ -0,0 +1,43 @@
/* Copyright 2019 QMK Community
*
* 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 "number_pad.h"

void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up

matrix_init_user();
}

void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)

matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware

return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

led_set_user(usb_led);
}
@@ -0,0 +1,56 @@
/* Copyright 2019 QMK Community
*
* 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_5x4( \
K00, K01, K02, K03, \
K10, K11, K12, \
K20, K21, K22, K23, \
K30, K31, K32, \
K40, K42, K43 \
) \
{ \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, KC_NO }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, KC_NO }, \
{ K40, KC_NO, K42, K43 } \
}

#define LAYOUT_ortho_5x4( \
K00, K01, K02, K03, \
K10, K11, K12, K13, \
K20, K21, K22, K23, \
K30, K31, K32, K33, \
K40, K41, K42, K43 \
) \
{ \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 } \
}
@@ -0,0 +1,13 @@
# Sentraq Number Pad RGB DIY Kit

Sentraq Number Pad RGB DIY Kit.

Keyboard Maintainer: QMK Community\
Hardware Supported: Sentraq Number Pad PCB\
Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/number-pad-rgb-kit)

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

make sentraq/number_pad:default:dfu

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).

0 comments on commit b6fbcd9

Please sign in to comment.