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

[Keyboard] Add Marcopad #24636

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions keyboards/marcopad/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"keyboard_name": "Marcopad",
"manufacturer": "pelegrini.ca",
"url": "https://pelegrini.ca/marcopad",
"maintainer": "Marco Pelegrini",
"bootloader": "rp2040",
"processor": "RP2040",
"diode_direction": "ROW2COL",
"features": {
"bootmagic": true,
"rgb_matrix": true
},
"matrix_pins": {
"cols": ["GP4", "GP26", "GP27"],
"rows": ["GP15", "GP14", "GP29"]
},
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"ws2812": {
"driver": "vendor",
"pin": "GP28"
},
"rgb_matrix": {
"driver": "ws2812",
"animations": {
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"dual_beacon": true,
"rainbow_beacon": true,
"pixel_rain": true,
"typing_heatmap": true,
"solid_reactive": true,
"solid_reactive_multiwide": true,
"solid_reactive_multicross": true,
"solid_reactive_multinexus": true,
"splash": true
},
"layout": [
{ "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 },
{ "flags": 4, "matrix": [0, 1], "x": 0, "y": 32 },
{ "flags": 4, "matrix": [0, 2], "x": 0, "y": 64 },
{ "flags": 4, "matrix": [1, 0], "x": 112, "y": 0 },
{ "flags": 4, "matrix": [1, 1], "x": 112, "y": 32 },
{ "flags": 4, "matrix": [1, 2], "x": 112, "y": 64 },
{ "flags": 4, "matrix": [2, 0], "x": 224, "y": 0 },
{ "flags": 4, "matrix": [2, 1], "x": 224, "y": 32 },
{ "flags": 4, "matrix": [2, 2], "x": 224, "y": 64 }
],
"default": {
"animation": "splash",
"hue": 132,
"sat": 102,
"val": 255,
"speed": 80
},
"sleep": true
},
marcopelegrini marked this conversation as resolved.
Show resolved Hide resolved
"community_layouts": ["ortho_3x3"],
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 1], "x": 0, "y": 1 },
{ "matrix": [0, 2], "x": 0, "y": 2 },
{ "matrix": [1, 0], "x": 1, "y": 0 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 1, "y": 2 },
{ "matrix": [2, 0], "x": 2, "y": 0 },
{ "matrix": [2, 1], "x": 2, "y": 1 },
{ "matrix": [2, 2], "x": 2, "y": 2 }
]
}
}
}
44 changes: 44 additions & 0 deletions keyboards/marcopad/keymaps/backlit/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2022 Marco Pelegrini <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┬───┬───┐
* │ 7 │ 8 │ 9 │
* ├───┼───┼───┤
* │ 4 │ 5 │ 6 │
* ├───┼───┼───┤
* │ 1 │ 2 │ 3 │
* └───┴───┴───┘
*/
[0] = LAYOUT_ortho_3x3(
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3
)
};

const uint16_t PROGMEM backlight_next[] = {KC_P7, KC_P8, COMBO_END};
const uint16_t PROGMEM backlight_toggle[] = {KC_P7, KC_P9, COMBO_END};
const uint16_t PROGMEM hue_up[] = {KC_P7, KC_P4, COMBO_END};
const uint16_t PROGMEM hue_down[] = {KC_P7, KC_P1, COMBO_END};
const uint16_t PROGMEM sat_up[] = {KC_P7, KC_P5, COMBO_END};
const uint16_t PROGMEM sat_down[] = {KC_P7, KC_P2, COMBO_END};
const uint16_t PROGMEM value_up[] = {KC_P7, KC_P6, COMBO_END};
const uint16_t PROGMEM value_down[] = {KC_P7, KC_P3, COMBO_END};
const uint16_t PROGMEM speed_up[] = {KC_P8, KC_P4, COMBO_END};
const uint16_t PROGMEM speed_down[] = {KC_P8, KC_P1, COMBO_END};
combo_t key_combos[] = {
COMBO(backlight_next, RGB_MODE_FORWARD),
COMBO(backlight_toggle, RGB_TOG),
COMBO(hue_up, RGB_HUI),
COMBO(hue_down, RGB_HUD),
COMBO(sat_up, RGB_SAI),
COMBO(sat_down, RGB_SAD),
COMBO(value_up, RGB_VAI),
COMBO(value_down, RGB_VAD),
COMBO(speed_up, RGB_SPI),
COMBO(speed_down, RGB_SPD)
};
4 changes: 4 additions & 0 deletions keyboards/marcopad/keymaps/backlit/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2022 Marco Pelegrini <[email protected]>
# SPDX-License-Identifier: GPL-2.0-or-later

COMBO_ENABLE = yes
21 changes: 21 additions & 0 deletions keyboards/marcopad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2022 Marco Pelegrini <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┬───┬───┐
* │ 7 │ 8 │ 9 │
* ├───┼───┼───┤
* │ 4 │ 5 │ 6 │
* ├───┼───┼───┤
* │ 1 │ 2 │ 3 │
* └───┴───┴───┘
*/
[0] = LAYOUT_ortho_3x3(
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3
)
};
27 changes: 27 additions & 0 deletions keyboards/marcopad/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Marcopad

![marcopad](https://pelegrini.ca/assets/img/marcopad/hardware/macropad.png)

*A compact 3x3 keys macropad built with RP-2040 Zero*

* Keyboard Maintainer: [pelegrini.ca](https://pelegrini.ca/marcopad)
* Hardware Supported: [Marcopad](https://pelegrini.ca/marcopad)
* Hardware Availability: [Marcopad](https://pelegrini.ca/marcopad)

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

make marcopad:default

Flashing example for this keyboard:

make marcopad: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 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key) and plug in the keyboard
* **Physical reset button**: Using 2 paperclips, press and hold the BOOT button, then short press the RESET button on the back of the Marcopad
* **Physical reset button + plug in**: Using a paperclip, press and hold the BOOT button, then plug in the Marcopad