aboutsummaryrefslogtreecommitdiff
path: root/keyboards/handwired/tritium_numpad
diff options
context:
space:
mode:
authorAgent Blu, 006 <blu006@ucr.edu>2019-06-24 23:11:51 -0700
committerDrashna Jaelre <drashna@live.com>2019-06-24 23:11:51 -0700
commit48b5903677b773940f1f92d9cb1bf278290fc075 (patch)
tree1da2c2119aeb468ae184ff83f313aae1539e72a7 /keyboards/handwired/tritium_numpad
parent1a2a54c326d0bb0dba899b3098487450d6d9dee6 (diff)
downloadqmk_firmware-48b5903677b773940f1f92d9cb1bf278290fc075.tar.gz
qmk_firmware-48b5903677b773940f1f92d9cb1bf278290fc075.zip
[Keyboard] Added 3d printable, handwired numpad by tritiumfusion (#6125)
* Added tritium_numpad Adding tritium numpad handwired 6x4 numpad design from thingiverse user tritiumfusion. * Updated readme with more tritiumfusion information * Changed spacing in readme * Changed blu keymap * Update keyboards/handwired/tritium_numpad/config.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/config.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/config.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/keymaps/max/keymap.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/tritium_numpad.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/tritium_numpad.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/tritium_numpad.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/tritium_numpad/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/handwired/tritium_numpad/rules.mk Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/handwired/tritium_numpad/readme.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * Removed action_function(), function_id, and MODS_CTRL_MASK * Reformatted keymaps so that they look nicer. Removed hackey backslashes that were there for no reason whatsoever. * Update keyboards/handwired/tritium_numpad/readme.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * Removed more backslashes * Added bootmagic to tritium_numpad
Diffstat (limited to 'keyboards/handwired/tritium_numpad')
-rw-r--r--keyboards/handwired/tritium_numpad/config.h83
-rw-r--r--keyboards/handwired/tritium_numpad/info.json21
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c40
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/blu/layers.json1
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/blu/readme.md13
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/default/keymap.c59
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/max/keymap.c59
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c59
-rw-r--r--keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c61
-rw-r--r--keyboards/handwired/tritium_numpad/readme.md28
-rw-r--r--keyboards/handwired/tritium_numpad/rules.mk61
-rw-r--r--keyboards/handwired/tritium_numpad/tritium_numpad.c29
-rw-r--r--keyboards/handwired/tritium_numpad/tritium_numpad.h95
13 files changed, 609 insertions, 0 deletions
diff --git a/keyboards/handwired/tritium_numpad/config.h b/keyboards/handwired/tritium_numpad/config.h
new file mode 100644
index 000000000..83333c0fb
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/config.h
@@ -0,0 +1,83 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED
24#define PRODUCT_ID 0x6060
25#define DEVICE_VER 0x0003
26#define MANUFACTURER Handwired
27#define PRODUCT Tritium Numpad
28#define DESCRIPTION QMK keyboard firmware for handwired numpad
29
30/* key matrix size */
31#define MATRIX_ROWS 6
32#define MATRIX_COLS 4
33
34// ROWS: Top to bottom, COLS: Left to right
35
36#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6 }
37#define MATRIX_COL_PINS { F4, F6, B1, B2 }
38#define UNUSED_PINS
39
40#define BACKLIGHT_PIN B6
41
42/* COL2ROW or ROW2COL */
43#define DIODE_DIRECTION COL2ROW
44
45/* define if matrix has ghost */
46//#define MATRIX_HAS_GHOST
47
48/* Set 0 if debouncing isn't needed */
49#define DEBOUNCE 5
50
51/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
52#define LOCKING_SUPPORT_ENABLE
53/* Locking resynchronize hack */
54#define LOCKING_RESYNC_ENABLE
55
56/* Backlight configuration
57 */
58#define BACKLIGHT_LEVELS 4
59
60/* Underlight configuration
61 */
62
63#define RGB_DI_PIN D2
64#define RGBLED_NUM 4 // Number of LEDs
65
66/*
67 * Feature disable options
68 * These options are also useful to firmware size reduction.
69 */
70
71/* disable debug print */
72//#define NO_DEBUG
73
74/* disable print */
75//#define NO_PRINT
76
77/* disable action features */
78//#define NO_ACTION_LAYER
79//#define NO_ACTION_TAPPING
80//#define NO_ACTION_ONESHOT
81//#define NO_ACTION_MACRO
82//#define NO_ACTION_FUNCTION
83
diff --git a/keyboards/handwired/tritium_numpad/info.json b/keyboards/handwired/tritium_numpad/info.json
new file mode 100644
index 000000000..bc10efc82
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/info.json
@@ -0,0 +1,21 @@
1{
2 "keyboard_name": "Tritium_numpad",
3 "url": "https://www.thingiverse.com/thing:2855938",
4 "maintainer": "qmk",
5 "width": 4,
6 "height": 6,
7 "layouts": {
8 "LAYOUT_numpad_6x4": {
9 "key_count": 21,
10 "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k23", "x":3, "y":2, "h":2}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k50", "x":0, "y":5, "w":2}, {"label":"k52", "x":2, "y":5}, {"label":"k43", "x":3, "y":4, "h":2}]
11 },
12 "LAYOUT_nontra_6x4": {
13 "key_count": 22,
14 "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2, "h":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4, "h":2}, {"label":"k50", "x":0, "y":5}, {"label":"k51", "x":1, "y":5}, {"label":"k52", "x":2, "y":5}]
15 },
16 "LAYOUT_ortho_6x4": {
17 "key_count": 24,
18 "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k33", "x":3, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4}, {"label":"k50", "x":0, "y":5}, {"label":"k51", "x":1, "y":5}, {"label":"k52", "x":2, "y":5}, {"label":"k53", "x":3, "y":5}]
19 }
20 }
21}
diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c
new file mode 100644
index 000000000..958c17e42
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c
@@ -0,0 +1,40 @@
1#include QMK_KEYBOARD_H
2
3void keyboard_pre_init_user(void)
4{
5 // Set layer LED as an output
6 setPinOutput(B0);
7}
8
9uint32_t layer_state_set_user(uint32_t state)
10{
11 // Switch layer LED accordingly
12 switch (biton32(state)) {
13 case 0:
14 writePinHigh(B0);
15 break;
16 case 1:
17 writePinLow(B0);
18 break;
19 }
20 return state;
21}
22
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24 [0] = LAYOUT_ortho_6x4(
25 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
26 KC_P7, KC_P8, KC_P9, KC_PPLS,
27 KC_P4, KC_P5, KC_P6, KC_BSPC,
28 KC_P1, KC_P2, KC_P3, KC_PENT,
29 KC_P0, KC_UP, KC_PDOT, TT(1),
30 KC_LEFT, KC_DOWN, KC_RGHT, BL_STEP
31 ),
32 [1] = LAYOUT_ortho_6x4(
33 KC_NO, KC_NO, KC_NO, KC_NO,
34 KC_NO, KC_K, KC_NO, KC_NO,
35 KC_H, KC_NO, KC_L, KC_NO,
36 KC_NO, KC_J, KC_NO, KC_NO,
37 KC_LSFT, KC_Z, KC_X, KC_TRNS,
38 KC_NO, KC_NO, KC_NO, KC_NO
39 )
40};
diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/layers.json b/keyboards/handwired/tritium_numpad/keymaps/blu/layers.json
new file mode 100644
index 000000000..5335c651f
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/blu/layers.json
@@ -0,0 +1 @@
[["KC_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_P4", "KC_P5", "KC_P6", "KC_BSPC", "KC_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_P0", "KC_UP", "KC_PDOT", "TT(1)", "KC_LEFT", "KC_DOWN", "KC_RGHT", "BL_STEP"], ["KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_K", "KC_NO", "KC_NO", "KC_H", "KC_NO", "KC_L", "KC_NO", "KC_NO", "KC_J", "KC_NO", "KC_NO", "KC_LSFT", "KC_Z", "KC_X", "KC_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO"]] \ No newline at end of file
diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/readme.md b/keyboards/handwired/tritium_numpad/keymaps/blu/readme.md
new file mode 100644
index 000000000..fd07b155f
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/blu/readme.md
@@ -0,0 +1,13 @@
1# Generated Keymap Layout
2
3This layout was generated by the QMK API. You can find the JSON data used to
4generate this keymap in the file layers.json.
5
6To make use of this file you will need follow the following steps:
7
8* Download or Clone QMK Firmware: <https://github.com/qmk/qmk_firmware/>
9* Extract QMK Firmware to a location on your hard drive
10* Copy this folder into %s
11* You are now ready to compile or use your keymap with the source
12
13More information can be found in the QMK docs: <https://docs.qmk.fm> \ No newline at end of file
diff --git a/keyboards/handwired/tritium_numpad/keymaps/default/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/default/keymap.c
new file mode 100644
index 000000000..60430217b
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/default/keymap.c
@@ -0,0 +1,59 @@
1#include QMK_KEYBOARD_H
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7#define _BL 0
8#define _FL 1
9
10const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11 /* Keymap _BL: (Base Layer) Default Layer
12 * ,-------------------.
13 * |Esc |TAB |BS | = |
14 * |----|----|----|----|
15 * | NL | / | * | - |
16 * |----|----|----|----|
17 * | 7 | 8 | 9 | |
18 * |----|----|----| + |
19 * | 4 | 5 | 6 | |
20 * |----|----|----|----|
21 * | 1 | 2 | 3 | |
22 * |----|----|----| En |
23 * | 0 |./FN| |
24 * `-------------------'
25 */
26
27 [_BL] = LAYOUT_numpad_6x4(
28 KC_ESC, KC_TAB, KC_BSPC, KC_PEQL,
29 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
30 KC_P7, KC_P8, KC_P9,
31 KC_P4, KC_P5, KC_P6, KC_PPLS,
32 KC_P1, KC_P2, KC_P3,
33 KC_P0, LT(_FL,KC_PDOT), KC_PENT
34 ),
35
36 /* Keymap _FL: Function Layer
37 * ,-------------------.
38 * |Esc |TAB |BS | = |
39 * |----|----|----|----|
40 * | NL | / | * | - |
41 * |----|----|----|----|
42 * | 7 | 8 | 9 | |
43 * |----|----|----|RST |
44 * | 4 | 5 | 6 | |
45 * |----|----|----|----|
46 * | 1 | 2 | 3 | |
47 * |----|----|----| En |
48 * | 0 |./FN| |
49 * `-------------------'
50 */
51 [_FL] = LAYOUT_numpad_6x4(
52 KC_ESC, KC_TAB, KC_BSPC, KC_PEQL,
53 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
54 KC_P7, KC_P8, KC_P9,
55 KC_P4, KC_P5, KC_P6, RESET,
56 KC_P1, KC_P2, KC_P3,
57 KC_P0, LT(_FL,KC_PDOT), KC_PENT
58 ),
59};
diff --git a/keyboards/handwired/tritium_numpad/keymaps/max/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/max/keymap.c
new file mode 100644
index 000000000..bba5c43bb
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/max/keymap.c
@@ -0,0 +1,59 @@
1#include QMK_KEYBOARD_H
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7#define _BL 0
8#define _FL 1
9
10const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11 /* Keymap _BL: (Base Layer) Default Layer
12 * ,-------------------.
13 * |Esc |Setp| - | = |
14 * |----|----|----|----|
15 * | F1 | F2 | F3 | F4 |
16 * |----|----|----|----|
17 * | 7 | 8 | 9 | - |
18 * |----|----|----|----|
19 * | 4 | 5 | 6 | LF |
20 * |----|----|----|----|
21 * | 1 | 2 | 3 | \ |
22 * |----|----|----|----|
23 * |Left|Down| Up |Rght|
24 * `-------------------'
25 */
26
27 [_BL] = LAYOUT_ortho_6x4(
28 KC_ESC, KC_TAB, KC_MINS,KC_EQL,
29 KC_F1, KC_F2, KC_F3, KC_F4,
30 KC_P7, KC_P8, KC_P9, KC_PMNS,
31 KC_P4, KC_P5, KC_P6, KC_PENT,
32 KC_P1, KC_P2, KC_P3, KC_BSLS,
33 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
34 ),
35
36 /* Keymap _FL: Function Layer
37 * ,-------------------.
38 * |Esc |TAB |BS | = |
39 * |----|----|----|----|
40 * | NL | / | * | - |
41 * |----|----|----|----|
42 * | 7 | 8 | 9 | |
43 * |----|----|----|RST |
44 * | 4 | 5 | 6 | |
45 * |----|----|----|----|
46 * | 1 | 2 | 3 | |
47 * |----|----|----| En |
48 * | 0 |./FN| |
49 * `-------------------'
50 */
51 [_FL] = LAYOUT_ortho_6x4(
52 KC_ESC, KC_TAB, KC_BSPC, KC_PEQL,
53 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
54 KC_P7, KC_P8, KC_P9, RESET,
55 KC_P4, KC_P5, KC_P6, KC_PENT,
56 KC_P1, KC_P2, KC_P3, KC_PENT,
57 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
58 ),
59};
diff --git a/keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c
new file mode 100644
index 000000000..9d569f18a
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c
@@ -0,0 +1,59 @@
1#include QMK_KEYBOARD_H
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7#define _BL 0
8#define _FL 1
9
10const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11 /* Keymap _BL: (Base Layer) Default Layer
12 * ,-------------------.
13 * | T | G | B |Spac|
14 * |----|----|----|----|
15 * | R | F | V | Fn |
16 * |----|----|----|----|
17 * | E | D | C | OS |
18 * |----|----|----|----|
19 * | W | S | X | Alt|
20 * |----|----|----|----|
21 * | Q | A | Z | Ctl|
22 * |----|----|----|----|
23 * | Esc| Tab|Shft| Fn2|
24 * `-------------------'
25 */
26
27 [_BL] = LAYOUT_ortho_6x4(
28 KC_T, KC_G, KC_B, KC_SPACE,
29 KC_R, KC_F, KC_V, MO(1),
30 KC_E, KC_D, KC_C, KC_LGUI,
31 KC_W, KC_S, KC_X, KC_LALT,
32 KC_Q, KC_A, KC_Z, KC_LCTL,
33 KC_TAB, KC_ESC, KC_LSHIFT, MO(1)
34 ),
35
36 /* Keymap _FL: Function Layer
37 * ,-------------------.
38 * | 5 | F5 | F11|Spac|
39 * |----|----|----|----|
40 * | 4 | F4 | F10| |
41 * |----|----|----|----|
42 * | 3 | F3 | F9 | OS |
43 * |----|----|----|----|
44 * | 2 | F2 | F8 | Alt|
45 * |----|----|----|----|
46 * | 1 | F1 | F7 | Ctl|
47 * |----|----|----|----|
48 * | ` | Del|Shft| |
49 * `-------------------'
50 */
51 [_FL] = LAYOUT_ortho_6x4(
52 KC_5, KC_F5, KC_F11, _______,
53 KC_4, KC_F4, KC_F10, _______,
54 KC_3, KC_F3, KC_F9, _______,
55 KC_2, KC_F2, KC_F8, _______,
56 KC_1, KC_F1, KC_F7, _______,
57 KC_GRV,KC_DEL, _______, _______
58 ),
59};
diff --git a/keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c
new file mode 100644
index 000000000..0dc2f81bc
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c
@@ -0,0 +1,61 @@
1#include QMK_KEYBOARD_H
2
3#ifdef RGBLIGHT_ENABLE
4#endif
5
6// Each layer gets a name for readability, which is then used in the keymap matrix below.
7// The underscores don't mean anything - you can have a layer called STUFF or any other name.
8// Layer names don't all need to be of the same length, obviously, and you can also skip them
9// entirely and just use numbers.
10#define _BL 0
11#define _FL 1
12
13const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
14 /* Keymap _BL: (Base Layer) Default Layer
15 * ,-------------------.
16 * |Spac| N | H | Y |
17 * |----|----|----|----|
18 * | Fn | M | J | U |
19 * |----|----|----|----|
20 * |Left| , | K | I |
21 * |----|----|----|----|
22 * |Down| . | L | O |
23 * |----|----|----|----|
24 * | Up | / | ; | P |
25 * |----|----|----|----|
26 * |Rght| Ret| " |Bspc|
27 * `-------------------'
28 */
29 [_BL] = LAYOUT_ortho_6x4(
30 KC_SPACE, KC_N, KC_H, KC_Y,
31 MO(1), KC_M, KC_J, KC_U,
32 KC_LEFT, KC_COMM, KC_K, KC_I,
33 KC_DOWN, KC_DOT, KC_L, KC_O,
34 KC_UP, KC_SLASH, KC_SCLN, KC_P,
35 KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC
36 ),
37
38 /* Keymap _FL: Function Layer
39 * ,-------------------.
40 * |Esc | F12| F6 | 6 |
41 * |----|----|----|----|
42 * | NL | M | - | 7 |
43 * |----|----|----|----|
44 * |Left| , | = | 8 |
45 * |----|----|----|----|
46 * |Down| . | [ | 9 |
47 * |----|----|----|----|
48 * | Up | / | ] | 0 |
49 * |----|----|----|----|
50 * |Rght| Ret| \ | Del|
51 * `-------------------'
52 */
53 [_FL] = LAYOUT_ortho_6x4(
54 _______, KC_F12, KC_F6, KC_6,
55 _______, _______, KC_MINS, KC_7,
56 _______, _______, KC_EQL, KC_8,
57 _______, _______, KC_LBRC, KC_9,
58 _______, _______, KC_RBRC, KC_0,
59 _______, _______, KC_BSLS, KC_DEL
60 ),
61};
diff --git a/keyboards/handwired/tritium_numpad/readme.md b/keyboards/handwired/tritium_numpad/readme.md
new file mode 100644
index 000000000..21acfe759
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/readme.md
@@ -0,0 +1,28 @@
1Tritium Numpad
2===
3
4Keyboard Maintainer: QMK Community
5Hardware Supported: Handwired 6x4 numpads using promicro controller
6Hardware Availability: https://www.thingiverse.com/thing:2855938
7
8Wiring is accomplished on the Pro Micro board using the following pins as rows:
9* D2 : Row 1
10* D3 : Row 2
11* D4 : Row 3
12* D5 : Row 4
13* D6 : Row 5
14* D7 : Row 6
15
16and the following pins as columns:
17* A3 : Col 1
18* A1 : Col 2
19* D15 : Col 3
20* D16 : Col 4
21
22Make example for this keyboard (after setting up your build environment):
23
24 make tritium_numpad:default
25
26Bootmagic is enabled. Press the key at 0,0 (usually escape or numlock in the top left corner) while plugging the keyboard in to jump to bootloader.
27
28See 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).
diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk
new file mode 100644
index 000000000..c990a6ab1
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/rules.mk
@@ -0,0 +1,61 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Bootloader
37# This definition is optional, and if your keyboard supports multiple bootloaders of
38# different sizes, comment this out, and the correct address will be loaded
39# automatically (+60). See bootloader.mk for all options.
40BOOTLOADER = caterina
41
42# Interrupt driven control endpoint task(+60)
43OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
44
45# Build Options
46# comment out to disable the options.
47#
48BOOTMAGIC_ENABLE = lite # Key at 0,0 makes the keyboard go into bootloader(+1000)
49MOUSEKEY_ENABLE = no # Mouse keys(+4700)
50EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
51CONSOLE_ENABLE = yes # Console for debug(+400)
52COMMAND_ENABLE = yes # Commands for debug and configuration
53NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
54RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870)
55BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150)
56MIDI_ENABLE = no # MIDI controls
57AUDIO_ENABLE = no
58UNICODE_ENABLE = no # Unicode
59BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
60
61LAYOUTS = numpad_6x4 ortho_6x4 nontra_6x4
diff --git a/keyboards/handwired/tritium_numpad/tritium_numpad.c b/keyboards/handwired/tritium_numpad/tritium_numpad.c
new file mode 100644
index 000000000..7193a934d
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/tritium_numpad.c
@@ -0,0 +1,29 @@
1#include "tritium_numpad.h"
2#include "led.h"
3
4void keyboard_pre_init_kb(void) {
5 // put your keyboard start-up code here
6 // runs once when the firmware starts up
7 keyboard_pre_init_user();
8 led_init_ports();
9};
10
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 // * Set our LED pins as output
19 // Numlock LED
20 setPinOutput(D5);
21}
22
23void led_set_kb(uint8_t usb_led) {
24 if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
25 writePinLow(D5);
26 } else {
27 writePinHigh(D5);
28 }
29}
diff --git a/keyboards/handwired/tritium_numpad/tritium_numpad.h b/keyboards/handwired/tritium_numpad/tritium_numpad.h
new file mode 100644
index 000000000..8d2e78329
--- /dev/null
+++ b/keyboards/handwired/tritium_numpad/tritium_numpad.h
@@ -0,0 +1,95 @@
1#pragma once
2
3#include "quantum.h"
4
5// readability
6#define XXX KC_NO
7
8/* matrix layout
9 * ,-------------------.
10 * | 00 | 01 | 02 | 03 |
11 * |----|----|----|----|
12 * | 10 | 11 | 12 | 13 |
13 * |----|----|----|----|
14 * | 20 | 21 | 22 | |
15 * |----|----|----| 23 |
16 * | 30 | 31 | 32 | |
17 * |----|----|----|----|
18 * | 40 | 41 | 42 | |
19 * |----|----|----| 43 |
20 * | 50 | 52 | |
21 * `-------------------'
22 */
23// The first section contains all of the arguments
24// The second converts the arguments into a two-dimensional array
25#define LAYOUT_numpad_6x4( \
26 k00, k01, k02, k03, \
27 k10, k11, k12, k13, \
28 k20, k21, k22, \
29 k30, k31, k32, k23, \
30 k40, k41, k42, \
31 k50, k52, k43 \
32) \
33{ \
34 {k00, k01, k02, k03}, \
35 {k10, k11, k12, k13}, \
36 {k20, k21, k22, k23}, \
37 {k30, k31, k32, XXX}, \
38 {k40, k41, k42, k43}, \
39 {k50, XXX, k52, XXX} \
40}
41
42/* matrix layout
43 * ,-------------------.
44 * | 00 | 01 | 02 | 03 |
45 * |----|----|----|----|
46 * | 10 | 11 | 12 | 13 |
47 * |----|----|----|----|
48 * | 20 | 21 | 22 | |
49 * |----|----|----| 23 |
50 * | 30 | 31 | 32 | |
51 * |----|----|----|----|
52 * | 40 | 41 | 42 | |
53 * |----|----|----| 43 |
54 * | 50 | 51 | 52 | |
55 * `-------------------'
56 */
57// The first section contains all of the arguments
58// The second converts the arguments into a two-dimensional array
59#define LAYOUT_nontra_6x4( \
60 k00, k01, k02, k03, \
61 k10, k11, k12, k13, \
62 k20, k21, k22, \
63 k30, k31, k32, k23, \
64 k40, k41, k42, \
65 k50, k51, k52, k43 \
66) \
67{ \
68 {k00, k01, k02, k03}, \
69 {k10, k11, k12, k13}, \
70 {k20, k21, k22, k23}, \
71 {k30, k31, k32, xxx}, \
72 {k40, k41, k42, k43}, \
73 {k50, k51, k52, xxx} \
74}
75
76#define LAYOUT_ortho_6x4( \
77 k00, k01, k02, k03, \
78 k10, k11, k12, k13, \
79 k20, k21, k22, k23, \
80 k30, k31, k32, k33, \
81 k40, k41, k42, k43, \
82 k50, k51, k52, k53 \
83) \
84{ \
85 {k00, k01, k02, k03}, \
86 {k10, k11, k12, k13}, \
87 {k20, k21, k22, k23}, \
88 {k30, k31, k32, k33}, \
89 {k40, k41, k42, k43}, \
90 {k50, k51, k52, k53} \
91}
92
93void keyboard_pre_init_user(void);
94void matrix_scan_user(void);
95