[Keyboard] rainkeebs trailmix (#20189)
Co-authored-by: jack <0x6a73@protonmail.com>
This commit is contained in:
parent
dabbc93df4
commit
e8b7244bb5
96
keyboards/rainkeebs/trailmix/info.json
Normal file
96
keyboards/rainkeebs/trailmix/info.json
Normal file
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"manufacturer": "rainkeebs",
|
||||
"keyboard_name": "trailmix",
|
||||
"maintainer": "ATron789",
|
||||
"bootloader": "atmel-dfu",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"diode_direction": "COL2ROW",
|
||||
"encoder": {
|
||||
"enabled": true,
|
||||
"rotary": [
|
||||
{"pin_a": "B2", "pin_b": "B4"}
|
||||
]
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F6", "D4", "F5", "D0", "F4", "B6"],
|
||||
"rows": ["D1", "D7", "F7", "C6"]
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"encoder": {
|
||||
"right": {
|
||||
"rotary": [
|
||||
{"pin_a": "B2", "pin_b": "B4"}
|
||||
]
|
||||
}
|
||||
},
|
||||
"soft_serial_pin": "D3"
|
||||
},
|
||||
"url": "https://www.rainkeebs.mx",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x7363",
|
||||
"vid": "0x726B"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label": "L00", "matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"label": "L01", "matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"label": "L02", "matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"label": "L03", "matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"label": "L04", "matrix": [0, 4], "x": 4, "y": 0},
|
||||
|
||||
{"label": "R04", "matrix": [4, 4], "x": 8, "y": 0},
|
||||
{"label": "R03", "matrix": [4, 3], "x": 9, "y": 0},
|
||||
{"label": "R02", "matrix": [4, 2], "x": 10, "y": 0},
|
||||
{"label": "R01", "matrix": [4, 1], "x": 11, "y": 0},
|
||||
{"label": "R00", "matrix": [4, 0], "x": 12, "y": 0},
|
||||
|
||||
{"label": "L10", "matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"label": "L11", "matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"label": "L12", "matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"label": "L13", "matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"label": "L14", "matrix": [1, 4], "x": 4, "y": 1},
|
||||
|
||||
{"label": "R14", "matrix": [5, 4], "x": 8, "y": 1},
|
||||
{"label": "R13", "matrix": [5, 3], "x": 9, "y": 1},
|
||||
{"label": "R12", "matrix": [5, 2], "x": 10, "y": 1},
|
||||
{"label": "R11", "matrix": [5, 1], "x": 11, "y": 1},
|
||||
{"label": "R10", "matrix": [5, 0], "x": 12, "y": 1},
|
||||
|
||||
{"label": "L20", "matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"label": "L21", "matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"label": "L22", "matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"label": "L23", "matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"label": "L24", "matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"label": "L25", "matrix": [2, 5], "x": 5, "y": 2},
|
||||
|
||||
{"label": "R25", "matrix": [6, 5], "x": 7, "y": 2},
|
||||
{"label": "R24", "matrix": [6, 4], "x": 8, "y": 2},
|
||||
{"label": "R23", "matrix": [6, 3], "x": 9, "y": 2},
|
||||
{"label": "R22", "matrix": [6, 2], "x": 10, "y": 2},
|
||||
{"label": "R21", "matrix": [6, 1], "x": 11, "y": 2},
|
||||
{"label": "R20", "matrix": [6, 0], "x": 12, "y": 2},
|
||||
|
||||
{"label": "L30", "matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"label": "L31", "matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"label": "L32", "matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"label": "L33", "matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"label": "L34", "matrix": [3, 4], "x": 4, "y": 3, "w": 2},
|
||||
|
||||
{"label": "R34", "matrix": [7, 4], "x": 7, "y": 3, "w": 2},
|
||||
{"label": "R33", "matrix": [7, 3], "x": 9, "y": 3},
|
||||
{"label": "R32", "matrix": [7, 2], "x": 10, "y": 3},
|
||||
{"label": "R31", "matrix": [7, 1], "x": 11, "y": 3},
|
||||
{"label": "R30", "matrix": [7, 0], "x": 12, "y": 3}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
66
keyboards/rainkeebs/trailmix/keymaps/default/keymap.c
Normal file
66
keyboards/rainkeebs/trailmix/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,66 @@
|
|||
/* Copyright 2021 Regan Palmer
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_BASE,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define ADJUST MO(_ADJUST)
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_BASE] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENTER,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MPLY, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSPC,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, LOWER,KC_LSFT, KC_SPC, RAISE, KC_RGUI, KC_ESC, KC_TAB
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_ESC, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS,
|
||||
KC_TAB, KC_INSERT, KC_DELETE, KC_BACKSLASH,KC_MINUS, KC_TRNS, KC_TRNS, KC_PLUS, KC_SLSH, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_LGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
||||
KC_GRAVE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LCBR, KC_RCBR, KC_COLN, KC_DQT, KC_TRNS,
|
||||
KC_TRNS, KC_CAPS, KC_TRNS, KC_PIPE, KC_UNDS, KC_TRNS, KC_TRNS, KC_EQUAL, KC_QUESTION, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ADJUST, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
KC_F11, KC_F12, KC_PRINT_SCREEN, KC_SCROLL_LOCK, KC_PAUSE, KC_H, KC_J, KC_K, KC_L, KC_ENTER,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MPLY, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSPC,
|
||||
KC_LCTL, KC_LALT, ADJUST, RAISE, KC_SPC, KC_LSFT, LOWER, ADJUST, KC_RALT, KC_RCTL
|
||||
),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[_BASE] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN)},
|
||||
[_LOWER] = {ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_HOME, KC_END)},
|
||||
[_RAISE] = {ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_WH_L, KC_WH_R)},
|
||||
[_ADJUST] = {ENCODER_CCW_CW(KC_MS_LEFT, KC_MS_RIGHT), ENCODER_CCW_CW(KC_MS_UP, KC_MS_DOWN)},
|
||||
};
|
||||
#endif
|
1
keyboards/rainkeebs/trailmix/keymaps/default/rules.mk
Normal file
1
keyboards/rainkeebs/trailmix/keymaps/default/rules.mk
Normal file
|
@ -0,0 +1 @@
|
|||
ENCODER_MAP_ENABLE = yes
|
28
keyboards/rainkeebs/trailmix/readme.md
Normal file
28
keyboards/rainkeebs/trailmix/readme.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Trailmix
|
||||
|
||||
![Trailmix](https://i.postimg.cc/wB4Zk1pS/IMG-20230326-222616.jpg)
|
||||
|
||||
|
||||
Ortho split 40% keyboard by rainkeenbs with encoders.
|
||||
|
||||
* Keyboard Maintainer: [ATron789](https://github.com/atron789)
|
||||
* Hardware Supported: `Elite Pi`, `Pro Micro Type-C USB`, `Elite-C (v4)`, `nice!nano v2` controllers
|
||||
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make rainkeebs/trailmix:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make rainkeebs/rainkeeb:default:flash
|
||||
|
||||
(Flash one side of the keyboard at the time)
|
||||
|
||||
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:
|
||||
|
||||
* **Physical reset button**: reset button located next to the encoder slot, one on each side of the keyboard.
|
1
keyboards/rainkeebs/trailmix/rules.mk
Normal file
1
keyboards/rainkeebs/trailmix/rules.mk
Normal file
|
@ -0,0 +1 @@
|
|||
# This file intentionally left blank
|
91
keyboards/rainkeebs/trailmix/trailmix.c
Normal file
91
keyboards/rainkeebs/trailmix/trailmix.c
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
Copyright 2023 Alberto Pavano "ATron789" <albertopavano@gmail.com>
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
enum layers { _BASE, _LOWER, _RAISE, _ADJUST };
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _BASE:
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
} else {
|
||||
tap_code(KC_MS_WH_UP);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case _RAISE:
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_WH_R);
|
||||
} else {
|
||||
tap_code(KC_WH_L);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case _LOWER:
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGUP);
|
||||
} else {
|
||||
tap_code(KC_PGDN);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_END);
|
||||
} else {
|
||||
tap_code(KC_HOME);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case _ADJUST:
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_RIGHT);
|
||||
} else {
|
||||
tap_code(KC_MS_LEFT);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_DOWN);
|
||||
} else {
|
||||
tap_code(KC_MS_UP);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
Loading…
Reference in a new issue