Skip to content

Commit

Permalink
Add Vial support to miniMACRO5 (#809)
Browse files Browse the repository at this point in the history
* Port miniMACRO5 to RP2040 + add VIAL keymap

* Remove rp2040_ce explicit configuration

* Add license in code files
  • Loading branch information
0rax authored Nov 17, 2024
1 parent d78b387 commit b19abfa
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 0 deletions.
12 changes: 12 additions & 0 deletions keyboards/minimacro5/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2024 JP Roemer (@0rax)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define VIAL_KEYBOARD_UID {0xFE, 0x06, 0xBF, 0x52, 0x18, 0xBA, 0x4F, 0x8A}

#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
#define VIAL_UNLOCK_COMBO_COLS {0, 4}

#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
27 changes: 27 additions & 0 deletions keyboards/minimacro5/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2024 JP Roemer (@0rax)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

enum layers {
_MAIN,
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_MAIN] = {
ENCODER_CCW_CW(KC_2, KC_1), /* First encoder*/
ENCODER_CCW_CW(KC_4, KC_3), /* Second encoder*/
ENCODER_CCW_CW(KC_6, KC_5), /* Third encoder*/
ENCODER_CCW_CW(KC_8, KC_7), /* Fourth encoder*/
ENCODER_CCW_CW(KC_0, KC_9) /* Fifth encoder*/
}
};
#endif

//
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first
[_MAIN] = LAYOUT_ortho_1x5(
KC_A, KC_B, KC_C, KC_D, KC_E
)
};
11 changes: 11 additions & 0 deletions keyboards/minimacro5/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
ENCODER_MAP_ENABLE = yes

# Reduce size on atmega32u4
ifeq ($(strip $(CONVERT_TO)), )
TAP_DANCE_ENABLE = no
QMK_SETTINGS = no
KEY_OVERRIDE_ENABLE = no
COMBO_ENABLE = no
endif
125 changes: 125 additions & 0 deletions keyboards/minimacro5/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"name": "miniMACRO5",
"vendorId": "0xCEEB",
"productId": "0x0007",
"lighting": "qmk_rgblight",
"matrix": {
"rows": 1,
"cols": 5
},
"layouts": {
"labels": [
"Encoder 1",
"Encoder 2",
"Encoder 3",
"Encoder 4",
"Encoder 5"
],
"keymap": [
[
{
"w": 2,
"h": 2,
"w2": 0.5
},
"0,0\n\n\n0,0",
{
"x": 0.25,
"w": 2,
"h": 2,
"w2": 0.5
},
"0,1\n\n\n1,0",
{
"x": 0.25,
"w": 2,
"h": 2,
"w2": 0.5
},
"0,2\n\n\n2,0",
{
"x": 0.25,
"w": 2,
"h": 2,
"w2": 0.5
},
"0,3\n\n\n3,0",
{
"x": 0.25,
"w": 2,
"h": 2,
"w2": 0.5
},
"0,4\n\n\n4,0"
],
[
{
"y": 1.5,
"x": 1
},
"0,1\n\n\n0,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"1,1\n\n\n1,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"2,1\n\n\n2,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"3,1\n\n\n3,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"4,1\n\n\n4,1\n\n\n\n\n\ne"
],
[
{
"y": -0.5
},
"0,0\n\n\n0,1",
{
"x": 1.25
},
"0,1\n\n\n1,1",
{
"x": 1.25
},
"0,2\n\n\n2,1",
{
"x": 1.25
},
"0,3\n\n\n3,1",
{
"x": 1.25
},
"0,4\n\n\n4,1"
],
[
{
"y": -0.5,
"x": 1
},
"0,0\n\n\n0,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"1,0\n\n\n1,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"2,0\n\n\n2,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"3,0\n\n\n3,1\n\n\n\n\n\ne",
{
"x": 1.25
},
"4,0\n\n\n4,1\n\n\n\n\n\ne"
]
]
}
}

0 comments on commit b19abfa

Please sign in to comment.