Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2023-05-25 22:08:26 +00:00
commit 5e7448ade1
31 changed files with 186 additions and 301 deletions

View File

@ -152,6 +152,7 @@ endif
# To produce a UF2 file in your build, add to your keyboard's rules.mk:
# FIRMWARE_FORMAT = uf2
UF2CONV = $(TOP_DIR)/util/uf2conv.py
UF2CONV_ARGS ?=
UF2_FAMILY ?= 0x0
# Compiler flags to generate dependency files.
@ -219,7 +220,7 @@ gccversion :
@$(BUILD_CMD)
%.uf2: %.elf
$(eval CMD=$(HEX) $< $(BUILD_DIR)/$(TARGET).tmp && $(UF2CONV) $(BUILD_DIR)/$(TARGET).tmp --output $@ --convert --family $(UF2_FAMILY) >/dev/null 2>&1)
$(eval CMD=$(HEX) $< $(BUILD_DIR)/$(TARGET).tmp && $(UF2CONV) $(UF2CONV_ARGS) $(BUILD_DIR)/$(TARGET).tmp --output $@ --convert --family $(UF2_FAMILY) >/dev/null 2>&1)
#@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
@$(SILENT) || printf "$(MSG_UF2) $@" | $(AWK_CMD)
@$(BUILD_CMD)

View File

@ -943,6 +943,12 @@
"m3n3van": {
"target": "matthewdias/m3n3van"
},
"massdrop/thekey": {
"target": "drop/thekey/v1"
},
"massdrop/thekey_v2": {
"target": "drop/thekey/v2"
},
"mechmini/v1": {
"target": "mechkeys/mechmini/v1"
},

View File

@ -0,0 +1,7 @@
// Copyright 2023 Massdrop, Inc.
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_LCTL, KC_C, KC_V)
};

View File

@ -0,0 +1,7 @@
// Copyright 2023 Massdrop, Inc.
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_LCTL, KC_C, KC_V)
};

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -0,0 +1,59 @@
{
"keyboard_name": "The Key",
"manufacturer": "Drop Inc.",
"url": "https://drop.com/buy/stack-overflow-the-key-macropad",
"maintainer": "zvecr",
"usb": {
"vid": "0x359B",
"pid": "0x0002",
"device_version": "1.0.0"
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"backlight": true,
"rgblight": true
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"matrix_pins": {
"cols": ["D2", "D1", "D0"],
"rows": ["D4"]
},
"diode_direction": "ROW2COL",
"backlight": {
"pin": "B6",
"breathing": true
},
"rgblight": {
"led_count": 2,
"sleep": true,
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
}
},
"ws2812": {
"pin": "B1"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0}
]
}
}
}

View File

@ -2,37 +2,31 @@
![The Key](https://i.imgur.com/hL5cRj9.jpg)
The Stack Overflow "The Key" is a 3 button macropad based on atmega32u4 with Kailh Black Box switches.
> Some say a programmers 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 Overflows 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 Fools gag is now a full-fledged macropad—designed by our very own community member Cassidy, with a portion of proceeds benefiting digitalundivided.
Keyboard Maintainer: [Drop / Massdrop](https://github.com/Massdrop/qmk_firmware)
Hardware Supported: Massdrop, Inc. **The Key**
Hardware Availability: Limited Release - https://drop.com/buy/stack-overflow-the-key-macropad
* Keyboard Maintainer: [zvecr](https://github.com/zvecr)
* Hardware Supported: Drop **The Key**
* Hardware Availability: Limited Release - https://drop.com/buy/stack-overflow-the-key-macropad
Make example for this keyboard (after setting up your build environment):
```bash
# default provided by Drop / Stack Overflow
make massdrop/thekey:default
# common modification where C = CTRL+C, V = CTRL+V
make massdrop/thekey:url-copy-paste
```
# default provided by Drop / Stack Overflow
make drop/thekey/v1:default
# common modification where C = CTRL+C, V = CTRL+V
make drop/thekey/v1:url-copy-paste
Flashing example for this keyboard:
```bash
# install in dfu mode
make massdrop/thekey:default:dfu
```
make drop/thekey/v1:default:flash
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).
Make example for this keyboard (after setting up your build environment):
## Bootloader
Enter the bootloader as follows:
Enter the bootloader in 3 ways:
* **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.
* **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.
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@ -0,0 +1 @@
# This file intentionally left blank

View File

@ -0,0 +1,5 @@
// Copyright 2023 Massdrop, Inc.
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define RGBLIGHT_LED_MAP {4, 0, 1, 2, 3}

View File

@ -0,0 +1,54 @@
{
"keyboard_name": "The Key V2",
"manufacturer": "Drop Inc.",
"url": "https://drop.com/buy/stack-overflow-the-key-v2-macropad",
"maintainer": "zvecr",
"usb": {
"vid": "0x359B",
"pid": "0x000E",
"device_version": "2.0.0"
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"rgblight": true
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"matrix_pins": {
"cols": ["D2", "D1", "D0"],
"rows": ["D4"]
},
"diode_direction": "ROW2COL",
"rgblight": {
"led_count": 5,
"sleep": true,
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
}
},
"ws2812": {
"pin": "B1"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0}
]
}
}
}

View File

@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#pragma once
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_LGUI, KC_C, KC_V),
};
#define RGBLIGHT_LAYERS /* Enable lighting layers */
#define RGBLIGHT_LAYER_BLINK /* Enable lighting layer blink */

View File

@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#pragma once
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_LCTL, KC_C, KC_V),
};
#define RGBLIGHT_LAYERS /* Enable lighting layers */
#define RGBLIGHT_LAYER_BLINK /* Enable lighting layer blink */

View File

@ -2,37 +2,32 @@
![The Key V2](https://massdrop-s3.imgix.net/product-images/stack-overflow-the-key-v2-macropad/FP/vSqOp9eUQNGXW4zl3EVQ_7528-copy-pdp.jpg)
The Stack Overflow "The Key V2" is a 3 button macropad based on atmega32u4 with hot-swappble Kailh Black Box switches.
> Last year, we brought Stack Overflows iconic April Fools joke to life. Advertised as the new (and only) way to copy and paste on the site, it was an ultra-compact macropad called The Key. The punchline-turned product was a huge hit, selling over 10K units and earning a nearly 5-star average review. Now, were back with a second act: The Key V2. The same size as its portable predecessor, this punchline-turned-product has a few notable changes—including an acrylic case to accent its two built-in RGB LEDs. Plus, we made it hot-swappable, so you can easily change out the switches for a truly custom experience. And just like the original, a portion of all proceeds from The Key V2 will go to the data-driven social startup digitalundivided.
Keyboard Maintainer: [Drop / Massdrop](https://github.com/Massdrop/qmk_firmware)
Hardware Supported: Massdrop, Inc. **The Key V2**
Hardware Availability: Limited Release - https://drop.com/buy/stack-overflow-the-key-v2-macropad
* Keyboard Maintainer: [zvecr](https://github.com/zvecr)
* Hardware Supported: Drop **The Key V2**
* Hardware Availability: Limited Release - https://drop.com/buy/stack-overflow-the-key-v2-macropad
Make example for this keyboard (after setting up your build environment):
```bash
# default provided by Drop / Stack Overflow
make massdrop/thekey_v2:default
# common modification where C = CTRL+C, V = CTRL+V
make massdrop/thekey_v2:url-copy-paste
```
# default provided by Drop / Stack Overflow
make drop/thekey/v2:default
# common modification where C = CTRL+C, V = CTRL+V
make drop/thekey/v2:url-copy-paste
Flashing example for this keyboard:
```bash
# install in dfu mode
make massdrop/thekey_v2:default:dfu
```
make drop/thekey/v2:default:flash
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).
Make example for this keyboard (after setting up your build environment):
## Bootloader
Enter the bootloader as follows:
Enter the bootloader in 3 ways:
* **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.
* **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.
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@ -0,0 +1 @@
# This file intentionally left blank

View File

@ -1,24 +0,0 @@
/* Copyright 2021 Joe Maples <joe@maples.dev>
*
* 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
#define RGBLED_NUM 2
#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 */

View File

@ -1,33 +0,0 @@
{
"keyboard_name": "The Key",
"manufacturer": "Drop",
"url": "https://drop.com/buy/stack-overflow-the-key-macropad",
"maintainer": "massdrop",
"usb": {
"vid": "0xFEED",
"pid": "0x0000",
"device_version": "0.0.1"
},
"matrix_pins": {
"cols": ["D2", "D1", "D0"],
"rows": ["D4"]
},
"diode_direction": "ROW2COL",
"backlight": {
"pin": "B6"
},
"ws2812": {
"pin": "B1"
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0}
]
}
}
}

View File

@ -1,23 +0,0 @@
/* Copyright 2021 Joe Maples <joe@maples.dev>
*
* 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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_LCTL, KC_C, KC_V),
};

View File

@ -1,12 +0,0 @@
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

View File

@ -1,37 +0,0 @@
/* Copyright 2022 Jason Wihardja
*
* 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
#define RGBLED_NUM 5
#define RGBLIGHT_LED_MAP {4, 0, 1, 2, 3}
#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
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 10
#define RGBLIGHT_VAL_STEP 15
#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 */
#define RGBLIGHT_LAYERS /* Enable lighting layers */
#define RGBLIGHT_LAYER_BLINK /* Enable lighting layer blink */

View File

@ -1,30 +0,0 @@
{
"keyboard_name": "The Key V2",
"manufacturer": "Drop",
"url": "https://drop.com/buy/stack-overflow-the-key-v2-macropad",
"maintainer": "massdrop",
"usb": {
"vid": "0xFEED",
"pid": "0x0000",
"device_version": "0.0.2"
},
"ws2812": {
"pin": "B1"
},
"matrix_pins": {
"cols": ["D2", "D1", "D0"],
"rows": ["D4"]
},
"diode_direction": "ROW2COL",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0}
]
}
}
}

View File

@ -1,39 +0,0 @@
/* Copyright 2022 Jason Wihardja
*
* 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
enum custom_keycodes {
TK_URL = SAFE_RANGE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(TK_URL, G(KC_C), G(KC_V)),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case TK_URL:
if (record->event.pressed) {
// when keycode TK_URL is pressed
SEND_STRING("https://stackoverflow.com/\n");
}
break;
default:
break;
}
return true;
}

View File

@ -1,40 +0,0 @@
/* Copyright 2022 Jason Wihardja
*
* 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
enum custom_keycodes {
TK_URL = SAFE_RANGE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(TK_URL, C(KC_C), C(KC_V)),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case TK_URL:
if (record->event.pressed) {
// when keycode TK_URL is pressed
SEND_STRING("https://stackoverflow.com/");
}
break;
default:
break;
}
return true;
}

View File

@ -1,12 +0,0 @@
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

View File

@ -151,10 +151,15 @@ class Block:
flags = 0x0
if familyid:
flags |= 0x2000
if devicetype:
flags |= 0x8000
hd = struct.pack("<IIIIIIII",
UF2_MAGIC_START0, UF2_MAGIC_START1,
flags, self.addr, 256, blockno, numblocks, familyid)
hd += self.bytes[0:256]
if devicetype:
hd += bytearray(b'\x08\x29\xa7\xc8')
hd += bytearray(devicetype.to_bytes(4, 'little'))
while len(hd) < 512 - 4:
hd += b"\x00"
hd += struct.pack("<I", UF2_MAGIC_END)
@ -283,6 +288,8 @@ def main():
parser.add_argument('-f', '--family', dest='family', type=str,
default="0x0",
help='specify familyID - number or name (default: 0x0)')
parser.add_argument('-t' , '--device-type', dest='devicetype', type=str,
help='specify deviceTypeID extension tag - number')
parser.add_argument('-o', '--output', metavar="FILE", dest='output', type=str,
help='write output to named file; defaults to "flash.uf2" or "flash.bin" where sensible')
parser.add_argument('-d', '--device', dest="device_path",
@ -312,6 +319,9 @@ def main():
except ValueError:
error("Family ID needs to be a number or one of: " + ", ".join(families.keys()))
global devicetype
devicetype = int(args.devicetype, 0) if args.devicetype else None
if args.list:
list_drives()
else: