Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the Bento Box macropad #20521

Merged
merged 16 commits into from
Aug 2, 2023
Merged
37 changes: 37 additions & 0 deletions keyboards/synthandkeys/bento_box/bento_box.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2023 Synth-and-Keys (@Synth-and-Keys)
// SPDX-License-Identifier: GPL-2.0-or-later

#include "quantum.h"

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
}
/*Main Encoder*/
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
/* TOP LEFT*/
else if (index == 1) {
if (clockwise) {
tap_code16(C(KC_EQUAL));
} else {
tap_code16(C(KC_MINUS));
}
}
/* TOP RIGHT*/
else if (index == 2) {
if (clockwise) {
tap_code16(C(KC_Y));
} else {
tap_code16(C(KC_Z));
}
}
return true;
}
#endif
66 changes: 66 additions & 0 deletions keyboards/synthandkeys/bento_box/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"manufacturer": "Synth-and-Keys",
"keyboard_name": "bento_box",
"maintainer": "Synth-and-Keys",
"bootloader": "stm32-dfu",
"bootmagic": {
"matrix": [2, 0]
},
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "B2","pin_b": "B1"},
{"pin_a": "A13","pin_b": "A14"},
{"pin_a": "A15","pin_b": "B3"}
]
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"direct": [
["A9", "A8"],
["B9", "B6"],
["B0", "A5", "A2"],
["A7", "A4", "A1", "B8", "B5"],
["A6", "A3", "A0", "B7", "B4"]
Synth-and-Keys marked this conversation as resolved.
Show resolved Hide resolved
]
},
"processor": "STM32F072",
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"layout": [
{ "matrix": [0, 3], "x": 3.5, "y": 0 },
{ "matrix": [0, 4], "x": 4.5, "y": 0 },
{ "matrix": [1, 1], "x": 1, "y": 0.5 },
{ "matrix": [1, 3], "x": 3.5, "y": 1 },
{ "matrix": [1, 4], "x": 4.5, "y": 1 },
{ "matrix": [2, 0], "x": 0, "y": 2 },
{ "matrix": [2, 1], "x": 1, "y": 2 },
{ "matrix": [2, 2], "x": 2, "y": 2 },
{ "matrix": [3, 0], "x": 0, "y": 3 },
{ "matrix": [3, 1], "x": 1, "y": 3 },
{ "matrix": [3, 2], "x": 2, "y": 3 },
{ "matrix": [3, 3], "x": 3.5, "y": 2.5 },
{ "matrix": [3, 4], "x": 4.5, "y": 2.5 },
{ "matrix": [4, 0], "x": 0, "y": 4 },
{ "matrix": [4, 1], "x": 1, "y": 4 },
{ "matrix": [4, 2], "x": 2, "y": 4 },
{ "matrix": [4, 3], "x": 3.5, "y": 3.5, "h": 1.5},
{ "matrix": [4, 4], "x": 4.5, "y": 3.5, "h": 1.5}
Synth-and-Keys marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
}
41 changes: 41 additions & 0 deletions keyboards/synthandkeys/bento_box/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2023 Synth-and-Keys (@Synth-and-Keys)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
Synth-and-Keys marked this conversation as resolved.
Show resolved Hide resolved

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ----------------------------------------------------------------
* | | | | Ctrl+0 | GUI+Shift+S |
* ----------------------------------------------------------------
* | | Mute | | Copy | Paste |
* ----------------------------------------------------------------
* | Prev | Pause | Next | | |
* ----------------------------------------------------------------
* | Home | Up | End | Ctrl+T | Ctrl+W |
* ----------------------------------------------------------------
* | Left | Down | Right | Shift+Alt+Tab | Alt+Tab |
* ----------------------------------------------------------------
*/
[0] = LAYOUT(
C(KC_0), G(S(KC_S)),
KC_MUTE, C(KC_C), C(KC_V),
KC_MPRV, KC_MPLY, KC_MNXT,
KC_HOME, KC_UP, KC_END, C(KC_T), C(KC_W),
KC_LEFT, KC_DOWN, KC_RIGHT, S(C(KC_TAB)), C(KC_TAB)
)
};

/* LAYER TEMPLATE
* ------------------------------------
* | | | | | |
* ------------------------------------
* | | | | | |
* ------------------------------------
* | | | | | |
* ------------------------------------
* | | | | | |
* ------------------------------------
* | | | | | |
* ------------------------------------
*/
26 changes: 26 additions & 0 deletions keyboards/synthandkeys/bento_box/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# synthandkeys/bento_box

![synthandkeys/bento_box](https://i.imgur.com/J8NkYO8h.jpeg)

The Bento Box is a 15-key, 3-encoder macropad running on QMK.

* Keyboard Maintainer: [Synth-and-Keys](https://github.com/Synth-and-Keys)
* Hardware Supported: Bento Box PCB
* Hardware Availability: https://www.etsy.com/shop/SynthandKeys

Make example for this keyboard (after setting up your build environment):

make synthandkeys/bento_box:default

Flashing example for this keyboard:

make synthandkeys/bento_box: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).

## Bootloader

Enter the bootloader in 2 ways:

* **Bootmagic reset**: Hold down the top left key in the group of 9 and plug in the keyboard
* **Physical reset button**: Hold down the reset button on the back of the PCB for 5 seconds and release
1 change: 1 addition & 0 deletions keyboards/synthandkeys/bento_box/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file intentionally left blank