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

Added a new keyboard - jcpm2 (JC Pro Macro 2) #24816

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
027dc71
Add files via upload
JeremySCook Jan 15, 2025
b7de925
Update keyboards/jcpm2/config.h
JeremySCook Jan 15, 2025
a236914
Update keyboards/jcpm2/keyboard.json
JeremySCook Jan 15, 2025
e6fb8dc
Update keyboards/jcpm2/keyboard.json
JeremySCook Jan 15, 2025
26979df
Update keyboards/jcpm2/keyboard.json
JeremySCook Jan 15, 2025
2b9cd1a
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 15, 2025
63e2599
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 15, 2025
5102342
Update readme.md
JeremySCook Jan 15, 2025
b6f30b1
Update readme.md
JeremySCook Jan 15, 2025
a150a57
Add files via upload
JeremySCook Jan 15, 2025
7be5ba0
Delete keyboards/jcpm2/rules.mk
JeremySCook Jan 15, 2025
44e5938
Add files via upload
JeremySCook Jan 16, 2025
8003198
Add files via upload
JeremySCook Jan 16, 2025
cc32b16
Update keyboards/jcpm2/keymaps/default/rules.mk
JeremySCook Jan 16, 2025
31f65f9
Update keyboards/jcpm2/config.h
JeremySCook Jan 16, 2025
f9d158f
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
0421992
Update keyboards/jcpm2/keyboard.json
JeremySCook Jan 16, 2025
ec82bc4
Update keyboards/jcpm2/jcpm2.c
JeremySCook Jan 16, 2025
c4cd53e
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
e0b2c92
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
fddda74
Update keyboards/jcpm2/keyboard.json
JeremySCook Jan 16, 2025
38da75a
Update keyboards/jcpm2/jcpm2.c
JeremySCook Jan 16, 2025
43eb6a1
Update keyboards/jcpm2/config.h
JeremySCook Jan 16, 2025
4ab5db3
Update keyboards/jcpm2/jcpm2.c
JeremySCook Jan 16, 2025
6bdeeb7
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
46a623f
Update keyboards/jcpm2/readme.md
JeremySCook Jan 16, 2025
f777b41
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
7825b93
Update keyboards/jcpm2/jcpm2.c
JeremySCook Jan 16, 2025
372e1fa
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
7e099cd
Update keyboards/jcpm2/jcpm2.c
JeremySCook Jan 16, 2025
04df54e
Update keyboards/jcpm2/keymaps/default/keymap.c
JeremySCook Jan 16, 2025
bb8d683
Update jcpm2.c
JeremySCook Jan 18, 2025
7b6cdd6
Update jcpm2.c
JeremySCook Jan 18, 2025
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
27 changes: 27 additions & 0 deletions keyboards/jcpm2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* Copyright 2025 Jeremy Cook Consulting LLC <[email protected]>
*
* 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.
*
* If you did not receive a copy of the GNU General Public License
* along with this program, see <http://www.gnu.org/licenses/>.
*/

#pragma once

// I2C Configuration
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
#define I2C_DRIVER I2CD1
#define I2C1_SCL_PIN D0
#define I2C1_SDA_PIN D1

// OLED Configuration
#define OLED_DISPLAY_128X64
#define OLED_DISPLAY_ADDRESS 0x3C
#define OLED_TIMEOUT 2000000
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
84 changes: 84 additions & 0 deletions keyboards/jcpm2/keyboard.json
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"manufacturer": "jeremyscook",
"keyboard_name": "jcpm2",
"maintainer": "jeremyscook",
"development_board": "promicro",
"features": {
"bootmagic": false,
"command": false,
"console": false,
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"oled": true,
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
"rgb_matrix": true
},
"matrix_pins": {
"direct": [
["D4", null, "F4", "B3"],
["B4", null, "F5", "B2"],
["B1", "F7", "F6", "B6"]
]
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2}
]
}
}
"rgb_matrix": {
"animations": {
"typing_heatmap": true,
"hue_breathing": true,
"digital_rain": true,
},
"default": {
"animation": "typing_heatmap",
"on": true,
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
"val": 180,
},
"driver": "ws2812",
"max_brightness": 255,
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
"sleep": true,
"layout": [
{"matrix": [2, 0], "x": 0, "y": 64, "flags": 4},
{"matrix": [2, 1], "x": 75, "y": 64, "flags": 4},
{"matrix": [2, 2], "x": 150, "y": 64, "flags": 4},
{"matrix": [1, 2], "x": 150, "y": 32, "flags": 4},
{"matrix": [0, 2], "x": 150, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 224, "y": 0, "flags": 4},
{"matrix": [1, 3], "x": 224, "y": 32, "flags": 4},
{"matrix": [2, 3], "x": 224, "y": 64, "flags": 4},

{"x": 224, "y": 0, "flags": 2},
{"x": 224, "y": 64, "flags": 2},
{"x": 112, "y": 64, "flags": 2},
{"x": 0, "y": 64, "flags": 2},
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
]
},
"encoder": {
"rotary": [
{"pin_a": "D2", "pin_b": "D3"},
]
},
"ws2812": {
"pin": "C6"
},
"url": "https://github.com/JeremySCook/JC-Pro-Macro-2",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
}
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
160 changes: 160 additions & 0 deletions keyboards/jcpm2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

// Define the layers
enum layer_names {
_LAYER0,
_LAYER0_MOD,
_LAYER1,
_LAYER2,
_LAYER3 //unused
};

const uint8_t UNDERGLOW = 60;
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┬───┬───┬───┐
* │ E │ n │ 6 │ 7 │
* ├───┼───┼───┼───┤
* │ B │ n │ 5 │ 8 │
* ├───┼───┼───┼───┤
* │ 2 │ 3 │ 4 │ 9 │
* └───┴───┴───┴───┘
*/
[_LAYER0] = LAYOUT( // default
KC_MUTE, LSFT(KC_COMM), LSFT(KC_DOT),
DF(_LAYER1), KC_J, KC_L,
KC_MPRV, KC_MPLY, KC_MNXT, TG(_LAYER0_MOD) // btm-right one shot mod layer
),
[_LAYER0_MOD] = LAYOUT( // default MOD
_______, RM_VALU, RM_NEXT, // _______ transparent, goes to above layer
_______, RM_VALD, RM_TOGG,
C(LGUI(KC_SPC)), _______, _______, TG(_LAYER0_MOD)
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
),
[_LAYER1] = LAYOUT( // FCPX
LSFT(LGUI(KC_B)), LGUI(KC_B), LGUI(KC_EQL),
DF(_LAYER2), LALT(KC_K), LGUI(KC_MINS),
KC_J, KC_K, KC_L, KC_BSPC
),
[_LAYER2] = LAYOUT( // KICAD
KC_E, KC_ESC, KC_M,
DF(_LAYER0), LGUI(KC_Z), KC_X,
KC_V, KC_D, KC_U, KC_BSPC
),
[_LAYER3] = LAYOUT( // Unused
MI_AOFF, MI_B3, MI_C4,
DF(_LAYER0), MI_G3, MI_A3,
MI_C3, MI_D3, MI_E3, MI_F3
),
};

#ifdef ENCODER_MAP_ENABLE //defined in rules.mk
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_LAYER0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, // default
[_LAYER0_MOD] = { ENCODER_CCW_CW(_______, _______) }, // default MOD
[_LAYER1] = { ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) }, // FCPX
[_LAYER2] = { ENCODER_CCW_CW(KC_R, S(KC_R)) }, // KICAD
[_LAYER3] = { ENCODER_CCW_CW(_______, _______) }, // UNUSED
};
#endif

#ifdef OLED_ENABLE
// Function to display the current layer and information on the OLED
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved

bool oled_task_user(void) {
switch (get_highest_layer(layer_state | default_layer_state)) {
case _LAYER0:
oled_write_ln_P(PSTR("(VOL- VOL+) LAYER0"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("MUTE SLOW FAST"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("LAYR RSET 10BK 10FW"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("MREV MPLA MFWD +OPT"), false);
break;
case _LAYER0_MOD:
oled_write_ln_P(PSTR("____ ____ 0-MOD"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("____ BRI+ ANIM"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("____ ____ BRI- TOGG"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("EMOJ ____ ____ -OPT"), false);
break;
case _LAYER1:
oled_write_ln_P(PSTR("(FRA- FRA+) FCPX"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("XXXX BRAK ZOM+"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("LAYR RSET KFRA ZOM-"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("BACK STOP FORW DELT"), false);
break;
case _LAYER2:
oled_write_ln_P(PSTR("(RO L RO R) KICAD"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("EDIT ESCP MOVE"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("LAYR RSET UNDO TRAK"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("VIA DRAG SALL DELT"), false);
break;
case _LAYER3: //not used
oled_write_ln_P(PSTR("(RO L RO R) MIDI"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("EDIT B3 C4"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("LAYR RSET G3 A3"), false);
oled_write_ln_P(PSTR(""), false);
oled_write_ln_P(PSTR("C3 D3 E3 F3"), false);
break;
}
return false;
}
#endif

bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t i = led_min; i < led_max; i++) {
switch(get_highest_layer(layer_state|default_layer_state)) {
case _LAYER2:
rgb_matrix_set_color(11, 0, 0, UNDERGLOW);
rgb_matrix_set_color(10, 0, 0, UNDERGLOW);
rgb_matrix_set_color(9, 0, 0, UNDERGLOW);
rgb_matrix_set_color(8, 0, 0, UNDERGLOW);
break;
case _LAYER1:
rgb_matrix_set_color(11, 0, UNDERGLOW, 0);
rgb_matrix_set_color(10, 0, UNDERGLOW, 0);
rgb_matrix_set_color(9, 0, UNDERGLOW, 0);
rgb_matrix_set_color(8, 0, UNDERGLOW, 0);
break;
case _LAYER0_MOD:
rgb_matrix_set_color(11, UNDERGLOW/2, 0, UNDERGLOW/2);
rgb_matrix_set_color(10, UNDERGLOW/2, 0, UNDERGLOW/2);
rgb_matrix_set_color(9, UNDERGLOW/2, 0, UNDERGLOW/2);
rgb_matrix_set_color(8, UNDERGLOW/2, 0, UNDERGLOW/2);
break;
case _LAYER0:
rgb_matrix_set_color(11, UNDERGLOW, 0, 0);
rgb_matrix_set_color(10, UNDERGLOW, 0, 0);
rgb_matrix_set_color(9, UNDERGLOW, 0, 0);
rgb_matrix_set_color(8, UNDERGLOW, 0, 0);
break;
case _LAYER3: //not used
rgb_matrix_set_color(11, 0, UNDERGLOW/2, UNDERGLOW/2);
rgb_matrix_set_color(10, 0, UNDERGLOW/2, UNDERGLOW/2);
rgb_matrix_set_color(9, 0, UNDERGLOW/2, UNDERGLOW/2);
rgb_matrix_set_color(8, 0, UNDERGLOW/2, UNDERGLOW/2);
break;
default:
break;
}
}
return false;
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
}
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions keyboards/jcpm2/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
25 changes: 25 additions & 0 deletions keyboards/jcpm2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# jcpm2

![jcpm2](https://github.com/JeremySCook/JC-Pro-Macro-2/blob/main/documentation/images/JCPM2.jpg)
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved

An 8-key macro pad with rotary encoder, RGB backlighting and underlighting. Made and sold by JCC LLC.

* Keyboard Maintainer: [jeremyscook](https://github.com/jeremyscook)
* Hardware Supported: JCPM2 PCB, Pro Micro
* Hardware Availability: [Tindie.com](https://www.tindie.com/products/25414)

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

make jcpm2:default

Flashing example for this keyboard:

make jcpm2: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:

* **Physical reset button**: Double-click the small inside button on top of the PCB
2 changes: 2 additions & 0 deletions keyboards/jcpm2/rules.mk
JeremySCook marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OLED_DRIVER = ssd1306
OLED_TRANSPORT = i2c
Loading