aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/handwired/6key/6key.c16
-rw-r--r--keyboards/handwired/6key/6key.h27
-rw-r--r--keyboards/handwired/6key/config.h41
-rw-r--r--keyboards/handwired/6key/info.json13
-rw-r--r--keyboards/handwired/6key/keymaps/default/keymap.c46
-rw-r--r--keyboards/handwired/6key/readme.md13
-rw-r--r--keyboards/handwired/6key/rules.mk23
7 files changed, 179 insertions, 0 deletions
diff --git a/keyboards/handwired/6key/6key.c b/keyboards/handwired/6key/6key.c
new file mode 100644
index 000000000..ab4263bde
--- /dev/null
+++ b/keyboards/handwired/6key/6key.c
@@ -0,0 +1,16 @@
1 /* Copyright 2020 Bratzworth
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "6key.h"
diff --git a/keyboards/handwired/6key/6key.h b/keyboards/handwired/6key/6key.h
new file mode 100644
index 000000000..fe02df44e
--- /dev/null
+++ b/keyboards/handwired/6key/6key.h
@@ -0,0 +1,27 @@
1 /* Copyright 2020 Bratzworth
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20#define LAYOUT( \
21 k00, k01, k02, \
22 k03, k04, k05 \
23) \
24{ \
25 { k00, k01, k02 }, \
26 { k03, k04, k05 } \
27}
diff --git a/keyboards/handwired/6key/config.h b/keyboards/handwired/6key/config.h
new file mode 100644
index 000000000..40eb478b0
--- /dev/null
+++ b/keyboards/handwired/6key/config.h
@@ -0,0 +1,41 @@
1 /* Copyright 2020 Bratzworth
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xBEEF
23#define PRODUCT_ID 0x0007
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Bratzworth
26#define PRODUCT 6key
27
28/* key matrix size */
29#define MATRIX_ROWS 2
30#define MATRIX_COLS 3
31
32/* pin-out */
33#define MATRIX_ROW_PINS { B4, D0 }
34#define MATRIX_COL_PINS { D3, D2, D1 }
35#define UNUSED_PINS
36
37/* dip switch */
38#define DIP_SWITCH_PINS { C6 }
39
40/* COL2ROW or ROW2COL */
41#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/handwired/6key/info.json b/keyboards/handwired/6key/info.json
new file mode 100644
index 000000000..f60b9ec86
--- /dev/null
+++ b/keyboards/handwired/6key/info.json
@@ -0,0 +1,13 @@
1{
2 "keyboard_name": "6key",
3 "url": "https://github.com/Bratzworth/6key",
4 "maintainer": "bratzworth",
5 "width": 3,
6 "height": 2,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}]
10 }
11 }
12 }
13 \ No newline at end of file
diff --git a/keyboards/handwired/6key/keymaps/default/keymap.c b/keyboards/handwired/6key/keymaps/default/keymap.c
new file mode 100644
index 000000000..509d999e5
--- /dev/null
+++ b/keyboards/handwired/6key/keymaps/default/keymap.c
@@ -0,0 +1,46 @@
1 /* Copyright 2020 Bratzworth
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18#define _MAIN 0
19#define _FN 1
20
21#define KC_UNDO LCTL(KC_Z)
22#define KC_REDO LCTL(KC_Y)
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 [_MAIN] = LAYOUT(
26 KC_UNDO, KC_REDO, KC_A,
27 KC_C, KC_D, KC_S
28 ),
29
30 [_FN] = LAYOUT(
31 KC_F13, KC_F14, KC_F15,
32 KC_F16, KC_F17, KC_F18
33 )
34};
35
36void dip_switch_update_user(uint8_t index, bool active) {
37 switch (index) {
38 case 0: {
39 if (active) {
40 set_single_persistent_default_layer(_FN);
41 } else {
42 set_single_persistent_default_layer(_MAIN);
43 }
44 }
45 }
46} \ No newline at end of file
diff --git a/keyboards/handwired/6key/readme.md b/keyboards/handwired/6key/readme.md
new file mode 100644
index 000000000..ce647d745
--- /dev/null
+++ b/keyboards/handwired/6key/readme.md
@@ -0,0 +1,13 @@
1# 6key
2
3A 6-key macropad made by Bratzworth.
4
5* Keyboard Maintainer: [bratzworth](https://github.com/Bratzworth)
6* Hardware Supported: Pro Micro ATmega32U4, Teensy 2.0
7* Hardware Availability: [bratzworth](https://github.com/Bratzworth/6key)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make handwired/6key:default
12
13See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
diff --git a/keyboards/handwired/6key/rules.mk b/keyboards/handwired/6key/rules.mk
new file mode 100644
index 000000000..c31208d51
--- /dev/null
+++ b/keyboards/handwired/6key/rules.mk
@@ -0,0 +1,23 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = yes # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23DIP_SWITCH_ENABLE = yes