Skip to content
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
182,062 changes: 182,062 additions & 0 deletions hackpads/MacroCalco/CAD/macrocalco.step

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions hackpads/MacroCalco/Firmware/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define ENCODER_A_PINS { GP0 }
#define ENCODER_B_PINS { GP1 }
44 changes: 44 additions & 0 deletions hackpads/MacroCalco/Firmware/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"manufacturer": "spacefall",
"keyboard_name": "macrocalco",
"maintainer": "spacefall",
"bootloader": "rp2040",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["GP2", "GP4", "GP3"],
"rows": ["GP29", "GP28", "GP27", "GP26"]
},
"processor": "RP2040",
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"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},
{"matrix": [3, 0], "x": 3, "y": 0},
{"matrix": [3, 1], "x": 3, "y": 1},
{"matrix": [3, 2], "x": 3, "y": 2}
]
}
}
}
105 changes: 105 additions & 0 deletions hackpads/MacroCalco/Firmware/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

#define _MAC 0
#define _NUM 1
#define _ALT 2

#if defined(ENCODER_MAP_ENABLE)
// https://docs.qmk.fm/features/encoders
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_MAC] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_NUM] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_ALT] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU) },
};
#endif

#ifdef OLED_ENABLE
bool oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false);

switch (get_highest_layer(layer_state)) {
case _MAC:
oled_write_ln_P(PSTR("Shortcuts"), false);
break;
case _NUM:
oled_write_P(PSTR("Numpad | NUM LOCK: "), false);
if (host_keyboard_led_state().num_lock) {
oled_write_ln_P(PSTR("ON"), false);
} else {
oled_write_ln_P(PSTR("OFF"), false);
}
break;
case _ALT:
oled_write_ln_P(PSTR("Alt"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}

// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);

return false;
}
#endif

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┬───┬───┐
* │Cpy│Und│Slp│
* ├───┼───┼───┤
* │Pst│Red│Wak│
* ├───┼───┼───┤
* │Cal│Nxt│Prv│
* ├───┼───┼───┤
* │Psc│Alt│Med│
* └───┴───┴───┘
*/
[_MAC] = LAYOUT(
KC_COPY, KC_UNDO, KC_SLEP,
KC_PSTE, KC_AGIN, KC_WAKE,
KC_CALC, KC_MNXT, KC_MPRV,
KC_PSCR, MO(_ALT),KC_MPLY
),
/*
* ┌───┬───┬───┐
* │ 7 │ 8 │ 9 │
* ├───┼───┼───┤
* │ 4 │ 5 │ 6 │
* ├───┼───┼───┤
* │ 1 │ 2 │ 3 │
* ├───┼───┼───┤
* │ 0 │ │ │
* └───┴───┴───┘
*/
[_NUM] = LAYOUT(
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_TRNS, KC_TRNS
),
/*
* ┌───┬───┬───┐
* │---│---│---│
* ├───┼───┼───┤
* │Num│ * │ / │
* ├───┼───┼───┤
* │MOD│ + │ - |
* ├───┼───┼───┤
* │Ent│ │Mut│
* └───┴───┴───┘
*/
[_ALT] = LAYOUT(
KC_NO, KC_NO, KC_NO,
KC_LNUM, KC_PAST, KC_PSLS,
TG(_NUM),KC_PPLS, KC_PMNS,
KC_PENT, KC_TRNS, KC_MUTE
),
};
1 change: 1 addition & 0 deletions hackpads/MacroCalco/Firmware/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
27 changes: 27 additions & 0 deletions hackpads/MacroCalco/Firmware/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# macrocalco

![macrocalco](imgur.com image replace me!)

*A short description of the keyboard/project*

* Keyboard Maintainer: [spacefall](https://github.com/spacefall)
* Hardware Supported: *The PCBs, controllers supported*
* Hardware Availability: *Links to where you can find this hardware*

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

make macrocalco:default

Flashing example for this keyboard:

make macrocalco: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 (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
8 changes: 8 additions & 0 deletions hackpads/MacroCalco/Firmware/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
OLED_ENABLE = yes
OLED_TRANSPORT = i2c
OLED_DRIVER = ssd1306

ENCODER_ENABLE = yes
#ENCODER_MAP_ENABLE = yes

LTO_ENABLE = yes
Loading