aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWyatt Neal <wyattearp@users.noreply.github.com>2021-12-22 02:36:48 -0500
committerGitHub <noreply@github.com>2021-12-22 18:36:48 +1100
commitb8cd899dfb740083d712778221b9f28b38a3461e (patch)
tree1aa44b2f3a4020ae0e4764fae878843cc149bec8
parent83b21deafc58acaa630606ec68698a25a2e6cf02 (diff)
downloadqmk_firmware-b8cd899dfb740083d712778221b9f28b38a3461e.tar.gz
qmk_firmware-b8cd899dfb740083d712778221b9f28b38a3461e.zip
[Keyboard] support for Stack Overflow The Key from Drop - adapted from @frap129 (#15520)
* support for Stack Overflow The Key from Drop - adapted from @frap129 * addressing code review comments there's still some issues related to LEDs so i think for now the best course of action is to remove those items until we can get better details on the assembly of the board. * removing this on the correct branch * cleaning up more code review comments, moving to simpler/common formats for maps * it is a C not a G fool * well, looks like you can do it this way too for booting/dfu * fixing missing newline for gcc to be quiet * removing busted links * formatting to match current template * Update keyboards/massdrop/thekey/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Andy Piper <andypiper@users.noreply.github.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/massdrop/thekey/config.h49
-rw-r--r--keyboards/massdrop/thekey/info.json14
-rw-r--r--keyboards/massdrop/thekey/keymaps/default-macos/keymap.c23
-rw-r--r--keyboards/massdrop/thekey/keymaps/default/keymap.c23
-rw-r--r--keyboards/massdrop/thekey/keymaps/url-copy-paste-macos/keymap.c39
-rw-r--r--keyboards/massdrop/thekey/keymaps/url-copy-paste/keymap.c40
-rw-r--r--keyboards/massdrop/thekey/readme.md38
-rw-r--r--keyboards/massdrop/thekey/rules.mk18
-rw-r--r--keyboards/massdrop/thekey/thekey.c17
-rw-r--r--keyboards/massdrop/thekey/thekey.h27
10 files changed, 288 insertions, 0 deletions
diff --git a/keyboards/massdrop/thekey/config.h b/keyboards/massdrop/thekey/config.h
new file mode 100644
index 000000000..a19562820
--- /dev/null
+++ b/keyboards/massdrop/thekey/config.h
@@ -0,0 +1,49 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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 0xFEED
23#define PRODUCT_ID 0x0000
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Drop
26#define PRODUCT The Key
27
28/* key matrix size */
29#define MATRIX_ROWS 1
30#define MATRIX_COLS 3
31
32/*
33 * Keyboard Matrix Assignments
34 */
35#define MATRIX_ROW_PINS { D4 }
36#define MATRIX_COL_PINS { D2, D1, D0 }
37
38#define DIODE_DIRECTION ROW2COL
39
40#define BACKLIGHT_PIN B6
41#define BACKLIGHT_LEVELS 3
42
43#define RGB_DI_PIN B1
44#define RGBLED_NUM 2
45#define RGBLIGHT_HUE_STEP 8
46#define RGBLIGHT_SAT_STEP 8
47#define RGBLIGHT_VAL_STEP 8
48#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
49#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
diff --git a/keyboards/massdrop/thekey/info.json b/keyboards/massdrop/thekey/info.json
new file mode 100644
index 000000000..ac4c17e8c
--- /dev/null
+++ b/keyboards/massdrop/thekey/info.json
@@ -0,0 +1,14 @@
1{
2 "keyboard_name": "The Key",
3 "url": "https://drop.com/buy/stack-overflow-the-key-macropad",
4 "maintainer": "massdrop",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 { "label": "K00 (D4,D2)", "x": 0, "y": 0 },
9 { "label": "K01 (D4,D1)", "x": 1, "y": 0 },
10 { "label": "K02 (D4,D0)", "x": 2, "y": 0 }
11 ]
12 }
13 }
14}
diff --git a/keyboards/massdrop/thekey/keymaps/default-macos/keymap.c b/keyboards/massdrop/thekey/keymaps/default-macos/keymap.c
new file mode 100644
index 000000000..7e389e304
--- /dev/null
+++ b/keyboards/massdrop/thekey/keymaps/default-macos/keymap.c
@@ -0,0 +1,23 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20
21 [0] = LAYOUT(KC_LGUI, KC_C, KC_V),
22
23};
diff --git a/keyboards/massdrop/thekey/keymaps/default/keymap.c b/keyboards/massdrop/thekey/keymaps/default/keymap.c
new file mode 100644
index 000000000..047def84b
--- /dev/null
+++ b/keyboards/massdrop/thekey/keymaps/default/keymap.c
@@ -0,0 +1,23 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20
21 [0] = LAYOUT(KC_LCTL, KC_C, KC_V),
22
23};
diff --git a/keyboards/massdrop/thekey/keymaps/url-copy-paste-macos/keymap.c b/keyboards/massdrop/thekey/keymaps/url-copy-paste-macos/keymap.c
new file mode 100644
index 000000000..16c73ba6a
--- /dev/null
+++ b/keyboards/massdrop/thekey/keymaps/url-copy-paste-macos/keymap.c
@@ -0,0 +1,39 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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#include QMK_KEYBOARD_H
18
19enum custom_keycodes {
20 TK_URL = SAFE_RANGE,
21};
22
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24 [0] = LAYOUT(TK_URL, C(KC_C), C(KC_V)),
25};
26
27bool process_record_user(uint16_t keycode, keyrecord_t *record) {
28 switch (keycode) {
29 case TK_URL:
30 if (record->event.pressed) {
31 // when keycode TK_URL is pressed
32 SEND_STRING("https://stackoverflow.com/\n");
33 }
34 break;
35 default:
36 break;
37 }
38 return true;
39}
diff --git a/keyboards/massdrop/thekey/keymaps/url-copy-paste/keymap.c b/keyboards/massdrop/thekey/keymaps/url-copy-paste/keymap.c
new file mode 100644
index 000000000..18778d194
--- /dev/null
+++ b/keyboards/massdrop/thekey/keymaps/url-copy-paste/keymap.c
@@ -0,0 +1,40 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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#include QMK_KEYBOARD_H
18
19enum custom_keycodes {
20 TK_URL = SAFE_RANGE,
21};
22
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24 [0] = LAYOUT(TK_URL, C(KC_C), C(KC_V)),
25};
26
27
28bool process_record_user(uint16_t keycode, keyrecord_t *record) {
29 switch (keycode) {
30 case TK_URL:
31 if (record->event.pressed) {
32 // when keycode TK_URL is pressed
33 SEND_STRING("https://stackoverflow.com/");
34 }
35 break;
36 default:
37 break;
38 }
39 return true;
40}
diff --git a/keyboards/massdrop/thekey/readme.md b/keyboards/massdrop/thekey/readme.md
new file mode 100644
index 000000000..74eab45f5
--- /dev/null
+++ b/keyboards/massdrop/thekey/readme.md
@@ -0,0 +1,38 @@
1# The Key
2
3![The Key](https://i.imgur.com/hL5cRj9.jpg)
4
5
6The Stack Overflow "The Key" is a 3 button macropad based on atmega32u4 with Kailh Black Box switches.
7
8> Some say a programmer’s best solution is a simple two-step process: copy and paste. On April 1st, 2021, Stack Overflow proved it. On that fateful day, each time users went to copy a piece of code, they were met with a pop-up for a fake product. It was called The Key: an ultra-compact macropad advertised as the new (and only) way to copy and paste on the platform. As it turns out, roughly one fourth of Stack Overflow’s 15 million users tries to copy and paste within five minutes of visiting the site. An even greater number saw the joke and loved it, with many demanding that The Key be developed in earnest. So, naturally, we teamed up with Stack Overflow to make it happen. What started as an April Fool’s gag is now a full-fledged macropad—designed by our very own community member Cassidy, with a portion of proceeds benefiting digitalundivided.
9
10Keyboard Maintainer: [Drop / Massdrop](https://github.com/Massdrop/qmk_firmware)
11
12Hardware Supported: Massdrop, Inc. **The Key**
13
14Hardware Availability: Limited Release - https://drop.com/buy/stack-overflow-the-key-macropad
15
16
17Make example for this keyboard (after setting up your build environment):
18```bash
19# default provided by Drop / Stack Overflow
20make massdrop/thekey:default
21# common modification where C = CTRL+C, V = CTRL+V
22make massdrop/thekey:url-copy-paste
23```
24
25Flashing example for this keyboard:
26```bash
27# install in dfu mode
28make massdrop/thekey:default:dfu
29```
30
31See 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).
32Make example for this keyboard (after setting up your build environment):
33
34## Bootloader
35
36Enter the bootloader as follows:
37* **Bootmagic reset**: Hold down the "Stack Overflow" key, the "left-most" or furthest from the USB plug while inserting the USB cable for a few seconds. The LEDs will **NOT** turn on.
38* **Physical reset button**: Briefly press and hold the reset button while pluggin in the USB port. The LEDs on the back will **NOT** turn on. Depending on your case revision, you may have to remove the 4 screws on the back plate to access the switch OR you can use the associated access hole on newer releases.
diff --git a/keyboards/massdrop/thekey/rules.mk b/keyboards/massdrop/thekey/rules.mk
new file mode 100644
index 000000000..5b0dcd2db
--- /dev/null
+++ b/keyboards/massdrop/thekey/rules.mk
@@ -0,0 +1,18 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = yes # Console for debug
14COMMAND_ENABLE = yes # Commands for debug and configuration
15NKRO_ENABLE = no # Enable N-Key Rollover
16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output
diff --git a/keyboards/massdrop/thekey/thekey.c b/keyboards/massdrop/thekey/thekey.c
new file mode 100644
index 000000000..b32c302cd
--- /dev/null
+++ b/keyboards/massdrop/thekey/thekey.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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#include "thekey.h"
diff --git a/keyboards/massdrop/thekey/thekey.h b/keyboards/massdrop/thekey/thekey.h
new file mode 100644
index 000000000..f889c973c
--- /dev/null
+++ b/keyboards/massdrop/thekey/thekey.h
@@ -0,0 +1,27 @@
1/* Copyright 2021 Joe Maples <joe@maples.dev>
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 "quantum.h"
20
21#define XXX KC_NO
22
23#define LAYOUT( \
24 K00, K01, K02 \
25) { \
26 { K00, K01, K02 }, \
27}