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

New keyboard: rainkeebs trailmix #20189

Merged
merged 26 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
eaec503
feat: first draft of trailmix keyboard support
ATron789 Mar 6, 2023
6e781b6
Merge branch 'master' into new-keyboard/rainkeebs-trailmix
ATron789 Mar 19, 2023
834d84a
feat: clean up qmkconfig and config_common, expanded info.json
ATron789 Mar 19, 2023
4a551f9
feat: changed bootloader to atmel and added readme
ATron789 Mar 19, 2023
0ead759
Update keyboards/rainkeebs/trailmix/info.json
ATron789 Mar 26, 2023
32c033d
Update keyboards/rainkeebs/trailmix/keymaps/default/keymap.c
ATron789 Mar 26, 2023
f973e28
Update keyboards/rainkeebs/trailmix/keymaps/default/keymap.c
ATron789 Mar 26, 2023
2b76bb4
Update keyboards/rainkeebs/trailmix/rules.mk
ATron789 Mar 26, 2023
14ee73c
fix: pr fixes still working on encoder definition
ATron789 Mar 26, 2023
c323052
fix: switch encoder for encoder map approach on km
ATron789 Mar 26, 2023
e739fe3
fix: fixed readme to template standards
ATron789 Mar 26, 2023
c9f541a
feat: PR fixes minus fully empty rules.mk
ATron789 Mar 29, 2023
c151fa2
feat: encoder_update_kb on keyboard level
ATron789 Mar 31, 2023
ff5d82c
fix: clang formatting
ATron789 Mar 31, 2023
d59c490
fix: added headers
ATron789 Mar 31, 2023
4b7d413
fix: latests pr comments fix
ATron789 Apr 8, 2023
f80e2d8
fix: added blank line between consecutive lines in readme
ATron789 Apr 8, 2023
37b2008
Merge branch 'master' into new-keyboard/rainkeebs-trailmix
ATron789 Apr 23, 2023
11b7b8a
fix: latest PR comments
ATron789 Apr 23, 2023
9193f85
fix: fixed default layout with missing keys
ATron789 Apr 23, 2023
1fca7d0
fix: latest PR review comments
ATron789 May 8, 2023
9734a5f
fix: latest PR comments about info.json layout formatting
ATron789 May 9, 2023
89cc1ec
fix: pr suggested lint
ATron789 May 11, 2023
c0f2d32
fix: pr formatting comment
ATron789 May 12, 2023
99ad48c
Merge branch 'master' into new-keyboard/rainkeebs-trailmix
ATron789 May 31, 2023
f05126a
fix: from constant to NUM_ENCODERS
ATron789 Jun 11, 2023
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
95 changes: 95 additions & 0 deletions keyboards/rainkeebs/trailmix/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"manufacturer": "rainkeebs",
waffle87 marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
]
},
"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"
}
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
]
}
},
"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], "w": 1, "x": 0, "y": 0 },
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
{ "label": "L01", "matrix": [0, 1], "w": 1, "x": 1, "y": 0 },
{ "label": "L02", "matrix": [0, 2], "w": 1, "x": 2, "y": 0 },
{ "label": "L03", "matrix": [0, 3], "w": 1, "x": 3, "y": 0 },
{ "label": "L04", "matrix": [0, 4], "w": 1, "x": 4, "y": 0 },
{ "label": "R04", "matrix": [4, 4], "w": 1, "x": 8, "y": 0 },
{ "label": "R03", "matrix": [4, 3], "w": 1, "x": 9, "y": 0 },
{ "label": "R02", "matrix": [4, 2], "w": 1, "x": 10, "y": 0 },
{ "label": "R01", "matrix": [4, 1], "w": 1, "x": 11, "y": 0 },
{ "label": "R00", "matrix": [4, 0], "w": 1, "x": 12, "y": 0 },
{ "label": "L10", "matrix": [1, 0], "w": 1, "x": 0, "y": 1 },
{ "label": "L11", "matrix": [1, 1], "w": 1, "x": 1, "y": 1 },
{ "label": "L12", "matrix": [1, 2], "w": 1, "x": 2, "y": 1 },
{ "label": "L13", "matrix": [1, 3], "w": 1, "x": 3, "y": 1 },
{ "label": "L14", "matrix": [1, 4], "w": 1, "x": 4, "y": 1 },
{ "label": "R14", "matrix": [5, 4], "w": 1, "x": 8, "y": 1 },
{ "label": "R13", "matrix": [5, 3], "w": 1, "x": 9, "y": 1 },
{ "label": "R12", "matrix": [5, 2], "w": 1, "x": 10, "y": 1 },
{ "label": "R11", "matrix": [5, 1], "w": 1, "x": 11, "y": 1 },
{ "label": "R10", "matrix": [5, 0], "w": 1, "x": 12, "y": 1 },
{ "label": "L20", "matrix": [2, 0], "w": 1, "x": 0, "y": 2 },
{ "label": "L21", "matrix": [2, 1], "w": 1, "x": 1, "y": 2 },
{ "label": "L22", "matrix": [2, 2], "w": 1, "x": 2, "y": 2 },
{ "label": "L23", "matrix": [2, 3], "w": 1, "x": 3, "y": 2 },
{ "label": "L24", "matrix": [2, 4], "w": 1, "x": 4, "y": 2 },
{ "label": "L25", "matrix": [2, 5], "w": 1, "x": 5, "y": 2 },
{ "label": "R25", "matrix": [6, 5], "w": 1, "x": 7, "y": 2 },
{ "label": "R24", "matrix": [6, 4], "w": 1, "x": 8, "y": 2 },
{ "label": "R23", "matrix": [6, 3], "w": 1, "x": 9, "y": 2 },
{ "label": "R22", "matrix": [6, 2], "w": 1, "x": 10, "y": 2 },
{ "label": "R21", "matrix": [6, 1], "w": 1, "x": 11, "y": 2 },
{ "label": "R20", "matrix": [6, 0], "w": 1, "x": 12, "y": 2 },
{ "label": "L30", "matrix": [3, 0], "w": 1, "x": 0, "y": 3 },
{ "label": "L31", "matrix": [3, 1], "w": 1, "x": 1, "y": 3 },
{ "label": "L32", "matrix": [3, 2], "w": 1, "x": 2, "y": 3 },
{ "label": "L33", "matrix": [3, 3], "w": 1, "x": 3, "y": 3 },
{ "label": "L34", "matrix": [3, 4], "w": 2, "x": 4, "y": 3 },
{ "label": "R34", "matrix": [7, 4], "w": 2, "x": 7, "y": 3 },
{ "label": "R33", "matrix": [7, 3], "w": 1, "x": 9, "y": 3 },
{ "label": "R32", "matrix": [7, 2], "w": 1, "x": 10, "y": 3 },
{ "label": "R31", "matrix": [7, 1], "w": 1, "x": 11, "y": 3 },
{ "label": "R30", "matrix": [7, 0], "w": 1, "x": 12, "y": 3 }
]
}
}
}
77 changes: 77 additions & 0 deletions keyboards/rainkeebs/trailmix/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* 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 };
ATron789 marked this conversation as resolved.
Show resolved Hide resolved

#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
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
),

[_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][2] = {
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
[_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 change: 1 addition & 0 deletions keyboards/rainkeebs/trailmix/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
28 changes: 28 additions & 0 deletions keyboards/rainkeebs/trailmix/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Trailmix

![Trailmix](https://i.postimg.cc/wB4Zk1pS/IMG-20230326-222616.jpg)
waffle87 marked this conversation as resolved.
Show resolved Hide resolved


Ortho split 40% keyboard by rainkeenbs with encoders.

ATron789 marked this conversation as resolved.
Show resolved Hide resolved
* 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)
ATron789 marked this conversation as resolved.
Show resolved Hide resolved

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 change: 1 addition & 0 deletions keyboards/rainkeebs/trailmix/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file intentionally left blank
91 changes: 91 additions & 0 deletions keyboards/rainkeebs/trailmix/trailmix.c
Original file line number Diff line number Diff line change
@@ -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) {
waffle87 marked this conversation as resolved.
Show resolved Hide resolved
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;
}
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
#endif