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 4 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
69 changes: 69 additions & 0 deletions keyboards/rainkeebs/trailmix/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* 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/>.
*/
#pragma once

waffle87 marked this conversation as resolved.
Show resolved Hide resolved
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 6

/* key matrix pins */
#define MATRIX_ROW_PINS { D1, D7, F7, C6 }
#define MATRIX_COL_PINS { F6, D4, F5, D0, F4, B6 }
#define MATRIX_ROW_PINS_RIGHT { D1, D7, F7, C6 }
#define MATRIX_COL_PINS_RIGHT { F6, D4, F5, D0, F4, B6 }
// #define UNUSED_PINS

#define ENCODERS_PAD_A { B2 }
#define ENCODERS_PAD_B { B4 }
#define ENCODERS_PAD_A_RIGHT { B2 }
#define ENCODERS_PAD_B_RIGHT { B4 }

/* usb handedness? */
#define SPLIT_USB_DETECT

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* number of backlight levels */

#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)


/* define serial pin */
#define SOFT_SERIAL_PIN D3

#ifdef RGB_DI_PIN
#define RGBLED_NUM 0
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
20 changes: 20 additions & 0 deletions keyboards/rainkeebs/trailmix/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"keyboard_name": "trailmix",
"url": "https://www.rainkeebs.mx",
"maintainer": "ATron789",
"width": 13,
"height": 4,
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
"usb": {
"vid": "0x726B",
"pid": "0x7363",
"device_version": "1.0.0"
},
"manufacturer": "rainkeebs",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "w":2}, {"x":7, "y":3, "w":2}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}]
}
}
}
140 changes: 140 additions & 0 deletions keyboards/rainkeebs/trailmix/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/* 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 "trailmix.h"
ATron789 marked this conversation as resolved.
Show resolved Hide resolved

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, RAISE , KC_LSFT, KC_SPC, LOWER, KC_RGUI, KC_RALT, KC_RCTL
),

[_LOWER] = LAYOUT(
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
KC_TILD, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_LCBR, KC_RCBR, KC_COLN, KC_DQT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_PIPE, KC_UNDS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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
),

[_RAISE] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_ESC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS,
KC_TAB, KC_CAPS, KC_DELETE, KC_SLASH, 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
),

[_ADJUST] = 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, ADJUST, RAISE, KC_SPC, KC_LSFT, LOWER, ADJUST, KC_RALT, KC_RCTL
),
};


void matrix_init_user(void) {
}

void matrix_scan_user(void) {
}

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

ATron789 marked this conversation as resolved.
Show resolved Hide resolved
bool encoder_update_user(uint8_t index, bool clockwise) {


switch (get_highest_layer(layer_state)) {
waffle87 marked this conversation as resolved.
Show resolved Hide resolved
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;
}
25 changes: 25 additions & 0 deletions keyboards/rainkeebs/trailmix/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Rainkeebs/trailmix

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)

## DISCLAIMER
This readme is set for a keyboard using `elite c` controllers.
If using different controllers be sure to update the `rules.mk` and `info.json` to your needs.

### Compiling and flashing firmware:

#### Compile firmware via Makefile
Make example for this keyboard (after setting up your build environment):
```
make rainkeebs/trailmix:default
```

#### Compile and flash firmware via Makefile
Before proceeding disconnect the 2 sides from each other. Connect one side to your machine, put the keyboard's in DFU mode via the button next to the encoder, run the following. Once completed do the same for the other side.
```
make rainkeebs/rainkeeb: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).
21 changes: 21 additions & 0 deletions keyboards/rainkeebs/trailmix/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu

# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= no # Commands for debug and configuration
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no
RGBLIGHT_ENABLE ?= no
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
SPLIT_KEYBOARD = yes
ENCODER_ENABLE = yes
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
16 changes: 16 additions & 0 deletions keyboards/rainkeebs/trailmix/trailmix.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* 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 "trailmix.h"
waffle87 marked this conversation as resolved.
Show resolved Hide resolved
ATron789 marked this conversation as resolved.
Show resolved Hide resolved
36 changes: 36 additions & 0 deletions keyboards/rainkeebs/trailmix/trailmix.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* 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/>.
*/
#pragma once

ATron789 marked this conversation as resolved.
Show resolved Hide resolved
#include "quantum.h"

#define LAYOUT( \
L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \
L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \
L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \
L30, L31, L32, L33, L34, R34, R33, R32, R31, R30 \
) \
{ \
{ L00, L01, L02, L03, L04, KC_NO}, \
{ L10, L11, L12, L13, L14, KC_NO}, \
{ L20, L21, L22, L23, L24, L25}, \
{ L30, L31, L32, L33, L34, KC_NO}, \
{ R00, R01, R02, R03, R04, KC_NO}, \
{ R10, R11, R12, R13, R14, KC_NO}, \
{ R20, R21, R22, R23, R24, R25}, \
{ R30, R31, R32, R33, R34, KC_NO} \
}
waffle87 marked this conversation as resolved.
Show resolved Hide resolved