Skip to content

Commit 22dd685

Browse files
softplusdrashnafauxpark
authored
[Keyboard] Add 3keyecosystem and 2key2 keyboard (#14023)
Co-authored-by: Drashna Jaelre <[email protected]> Co-authored-by: Ryan <[email protected]>
1 parent 99d465b commit 22dd685

File tree

9 files changed

+268
-0
lines changed

9 files changed

+268
-0
lines changed

keyboards/3keyecosystem/2key2/2key2.c

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
Copyright 2021 John Mueller
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 2 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
#include "2key2.h"
18+
19+
// RGB Matrix configuration
20+
// based on https://docs.qmk.fm/#/feature_rgb_matrix?id=common-configuration
21+
22+
#ifdef RGB_MATRIX_ENABLE
23+
led_config_t g_led_config = { {
24+
// Key Matrix to LED Index
25+
{ 0, 1 }
26+
}, {
27+
// LED Index to Physical Position
28+
// Using range { 0..224, 0..64 }
29+
{ 0, 32 }, { 224, 32 }
30+
}, {
31+
// LED Index to Flag
32+
// https://docs.qmk.fm/#/feature_rgb_matrix?id=flags
33+
LED_FLAG_ALL, LED_FLAG_ALL
34+
} };
35+
#endif

keyboards/3keyecosystem/2key2/2key2.h

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Copyright 2021 John Mueller
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 2 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
#pragma once
18+
19+
#include "quantum.h"
20+
21+
/* This is a shortcut to help you visually see your layout.
22+
*
23+
* The first section contains all of the arguments representing the physical
24+
* layout of the board and position of the keys.
25+
*
26+
* The second converts the arguments into a two-dimensional array which
27+
* represents the switch matrix.
28+
*/
29+
#define LAYOUT( \
30+
k00, k01 \
31+
) { \
32+
{ k00, k01 } \
33+
}
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
Copyright 2021 John Mueller
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 2 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
#pragma once
18+
19+
#include "config_common.h"
20+
21+
/* USB Device descriptor parameter */
22+
#define VENDOR_ID 0x1209
23+
#define PRODUCT_ID 0x3304
24+
#define DEVICE_VER 0x0001
25+
#define MANUFACTURER 3-Key-Ecosystem
26+
#define PRODUCT 2key2
27+
28+
/* key matrix size */
29+
#define MATRIX_ROWS 1
30+
#define MATRIX_COLS 2
31+
32+
/* Keyboard Matrix Assignments */
33+
#define MATRIX_ROW_PINS { F6 }
34+
#define MATRIX_COL_PINS { F4, D7 }
35+
#define UNUSED_PINS
36+
37+
// LED on kbmount base board is on B7
38+
#define LED_CAPS_LOCK_PIN B7 // onboard LED for testing
39+
40+
/* COL2ROW, ROW2COL */
41+
#define DIODE_DIRECTION COL2ROW
42+
43+
/* RGB matrix key backlighting */
44+
#define RGB_DI_PIN B2
45+
#define DRIVER_LED_TOTAL 2
46+
#define RGB_MATRIX_KEYPRESSES
47+
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE
48+
#define RGB_MATRIX_STARTUP_HUE 90
49+
#define RGB_MATRIX_STARTUP_SPD 20
50+
#define RGB_MATRIX_STARTUP_VAL 128
51+
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
52+
#define RGB_DISABLE_WHEN_USB_SUSPENDED true
53+
54+
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
55+
#define DEBOUNCE 5
56+
57+
/* disable these deprecated features by default */
58+
#define NO_ACTION_MACRO
59+
#define NO_ACTION_FUNCTION
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"keyboard_name": "3-Key-Ecosystem 2key2: 2x1 macro-keyboard",
3+
"url": "https://github.com/softplus/3keyecosystem/tree/main/2key2",
4+
"maintainer": "softplus",
5+
"layouts": {
6+
"LAYOUT": {
7+
"layout": [
8+
{"label": "k00", "x": 0, "y": 0},
9+
{"label": "k01", "x": 1, "y": 0}
10+
]
11+
}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* Copyright 2021 John Mueller
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+
// Defines names for use in layer keycodes and the keymap
19+
enum layer_names {
20+
_BASE
21+
};
22+
23+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24+
/* Base */
25+
[_BASE] = LAYOUT(
26+
KC_A, KC_B
27+
),
28+
29+
[1] = LAYOUT(
30+
KC_TRNS, KC_TRNS
31+
),
32+
33+
[2] = LAYOUT(
34+
KC_TRNS, KC_TRNS
35+
),
36+
37+
[3] = LAYOUT(
38+
KC_TRNS, KC_TRNS
39+
)
40+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* Copyright 2021 John Mueller
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+
// Defines names for use in layer keycodes and the keymap
19+
enum layer_names {
20+
_BASE
21+
};
22+
23+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24+
/* Base */
25+
[_BASE] = LAYOUT(
26+
KC_A, KC_B
27+
),
28+
29+
[1] = LAYOUT(
30+
KC_TRNS, KC_TRNS
31+
),
32+
33+
[2] = LAYOUT(
34+
KC_TRNS, KC_TRNS
35+
),
36+
37+
[3] = LAYOUT(
38+
KC_TRNS, KC_TRNS
39+
)
40+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VIA_ENABLE = yes
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 3-Key-Ecosystem - 2key2
2+
3+
![keyboard](https://i.imgur.com/IJ1Zyc7.jpeg)
4+
5+
This is a 2x1 macro keyboard with WS2812B key lighting.
6+
It's designed for a modular keyboard mount using an ATmega32U4.
7+
8+
* Keyboard Maintainer: [softplus](https://github.com/softplus)
9+
* Hardware Supported: [3keyecosystem-2key2](https://github.com/softplus/3keyecosystem/tree/main/2key2)
10+
* Hardware Availability: Open-Source files at above link
11+
12+
Make example for this keyboard (after setting up your build environment):
13+
14+
make 3keyecosystem/2key2:default
15+
16+
Flashing example for this keyboard:
17+
18+
make 3keyecosystem/2key2:default:flash
19+
20+
## Bootloader
21+
22+
To Enter the bootloader, click reset button on the main board.
23+
24+
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).
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# MCU name
2+
MCU = atmega32u4
3+
4+
# Bootloader selection
5+
BOOTLOADER = caterina
6+
7+
# Build Options
8+
# change yes to no to disable
9+
#
10+
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11+
MOUSEKEY_ENABLE = no # Mouse keys
12+
EXTRAKEY_ENABLE = yes # Audio control and System control
13+
CONSOLE_ENABLE = no # Console for debug
14+
COMMAND_ENABLE = no # Commands for debug and configuration
15+
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16+
SLEEP_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
18+
NKRO_ENABLE = no # USB Nkey Rollover
19+
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20+
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21+
RGB_MATRIX_ENABLE = yes # Enable RGB matrix
22+
RGB_MATRIX_DRIVER = WS2812 # Select WS2812 driver for RGB matrix
23+
AUDIO_ENABLE = no # Audio output

0 commit comments

Comments
 (0)