Merge remote-tracking branch 'origin/master' into develop

master
QMK Bot 2023-04-30 01:59:55 +00:00
commit 4e4d79aecf
4 changed files with 275 additions and 86 deletions

View File

@ -0,0 +1,74 @@
/* Copyright 2020 lmlask
*
* 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
#define MOUSEKEY_DELAY 50
#define MIDI_ADVANCED
#define TAPPING_TERM 175 //For fast typing
#define QUICK_TAP_TERM 0 //No autorepeat in tap-hold keys
#define HOLD_ON_OTHER_KEY_PRESS //For fast typing
// Min 0, max 32
#define JOYSTICK_BUTTON_COUNT 32
// Min 0, max 6: X, Y, Z, Rx, Ry, Rz
#define JOYSTICK_AXIS_COUNT 0
// Min 8, max 16
#define JOYSTICK_AXIS_RESOLUTION 8
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
//#undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Enables RGB_MATRIX_ALPHAS_MODS
#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Enables RGB_MATRIX_GRADIENT_UP_DOWN
#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Enables RGB_MATRIX_GRADIENT_LEFT_RIGHT
//#undef ENABLE_RGB_MATRIX_BREATHING // Enables RGB_MATRIX_BREATHING
//#undef ENABLE_RGB_MATRIX_BAND_SAT // Enables RGB_MATRIX_BAND_SAT
//#undef ENABLE_RGB_MATRIX_BAND_VAL //Enables RGB_MATRIX_BAND_VAL
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Enables RGB_MATRIX_BAND_PINWHEEL_SAT
#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Enables RGB_MATRIX_BAND_PINWHEEL_VAL
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Enables RGB_MATRIX_BAND_SPIRAL_SAT
#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Enables RGB_MATRIX_BAND_SPIRAL_VAL
#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Enables RGB_MATRIX_CYCLE_ALL
#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Enables RGB_MATRIX_CYCLE_LEFT_RIGHT
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Enables RGB_MATRIX_CYCLE_UP_DOWN
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Enables RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN //Enables RGB_MATRIX_CYCLE_OUT_IN
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Enables RGB_MATRIX_CYCLE_OUT_IN_DUAL
#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Enables RGB_MATRIX_CYCLE_PINWHEEL
#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Enables RGB_MATRIX_CYCLE_SPIRAL
#undef ENABLE_RGB_MATRIX_DUAL_BEACON //Enables RGB_MATRIX_DUAL_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON// Enables RGB_MATRIX_RAINBOW_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enables RGB_MATRIX_RAINBOW_PINWHEELS
#undef ENABLE_RGB_MATRIX_RAINDROPS //Enables RGB_MATRIX_RAINDROPS
#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS// Enables RGB_MATRIX_JELLYBEAN_RAINDROPS
//#undef ENABLE_RGB_MATRIX_HUE_BREATHING // Enables RGB_MATRIX_HUE_BREATHING
#undef ENABLE_RGB_MATRIX_HUE_PENDULUM //Enables RGB_MATRIX_HUE_PENDULUM
#undef ENABLE_RGB_MATRIX_HUE_WAVE //Enables RGB_MATRIX_HUE_WAVE
#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL //Enables RGB_MATRIX_PIXEL_FRACTAL
#undef ENABLE_RGB_MATRIX_PIXEL_FLOW //Enables RGB_MATRIX_PIXEL_FLOW
#undef ENABLE_RGB_MATRIX_PIXEL_RAIN //Enables RGB_MATRIX_PIXEL_RAIN
//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Enables RGB_MATRIX_SOLID_REACTIVE_SIMPLE
//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Enables RGB_MATRIX_SOLID_REACTIVE
//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE //Enables RGB_MATRIX_SOLID_REACTIVE_WIDE
//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Enables RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Enables RGB_MATRIX_SOLID_REACTIVE_CROSS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Enables RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS //Enables RGB_MATRIX_SOLID_REACTIVE_NEXUS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS //Enables RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
//#undef ENABLE_RGB_MATRIX_SPLASH //Enables RGB_MATRIX_SPLASH
#undef ENABLE_RGB_MATRIX_MULTISPLASH // Enables RGB_MATRIX_MULTISPLASH
//#undef ENABLE_RGB_MATRIX_SOLID_SPLASH //Enables RGB_MATRIX_SOLID_SPLASH
#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Enables RGB_MATRIX_SOLID_MULTISPLASH

View File

@ -1,4 +1,4 @@
/* Copyright 2021 lmlmask
/* Copyright 2020 lmlask
*
* 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
@ -15,119 +15,149 @@
*/
#include QMK_KEYBOARD_H
#include "keymap_brazilian_abnt2.h"
#include <keymap_brazilian_abnt2.h>
enum layers {
_WORKMAN,
_QWERTY,
_DVORAK,
_COLEMAK,
_MIDI,
_GAME,
_SYM,
_FUNCTION,
_MIDI,
_NAV,
_NUM,
_ADJUST
_ADJUST,
_MOUSE,
_CPY,
_SWP
};
enum planck_keycodes {
WORKMAN = SAFE_RANGE,
WORKMAN = QK_USER,
QWERTY,
DVORAK,
COLEMAK,
MIDI
MIDI,
GAME,
TOG_CPY,
TOG_SWP,
};
#define SYM MO(_SYM)
#define FUN LT(_FUNCTION, KC_ENT)
#define MYTAB LT(_NAV, KC_TAB)
#define MYNAV LT(_NAV, KC_DEL)
#define MYNUM LT(_NUM, KC_BSPC)
#define NAVTAB LT(_NAV, KC_TAB)
#define SYM LT(_SYM, KC_BSPC)
#define NUM LT(_NUM, KC_DEL)
#define FUN MO(_FUNCTION)
#define CTL_ENT RCTL_T(KC_ENT)
//Hand swap config, similar to Planck
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0} },
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1} },
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2} },
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}, {8, 3}, {9, 3}, {10, 3}},
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//qwerty base layer ok
//BASE LAYERS
[_QWERTY] = LAYOUT_planck_mit(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_TILD,
MYTAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_ACUT,
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT,
NAVTAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD,
SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SLSH, SC_RSPC,
KC_LCTL, KC_LALT, KC_LGUI, SYM, MYNAV, KC_SPC, MYNUM, FUN, KC_RGUI, KC_LALT, RCTL_T(KC_ENT)
KC_LCTL, KC_LGUI, KC_LALT, KC_MEH, NUM, KC_SPC, SYM, FUN, KC_RALT, KC_HYPR, CTL_ENT
),
//workman base layer ok
[_WORKMAN] = LAYOUT_planck_mit(
KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, BR_CCED, BR_TILD,
MYTAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, BR_ACUT,
KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, BR_CCED, BR_ACUT,
NAVTAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, BR_TILD,
SC_LSPO, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, BR_SLSH, SC_RSPC,
KC_LCTL, KC_LALT, KC_LGUI, SYM, MYNAV, KC_SPC, MYNUM, FUN, KC_RGUI, KC_LALT, RCTL_T(KC_ENT)
KC_LCTL, KC_LGUI, KC_LALT, KC_MEH, NUM, KC_SPC, SYM, FUN, KC_RALT, KC_HYPR, CTL_ENT
),
//dvorak base layer ok
[_DVORAK] = LAYOUT_planck_mit(
KC_ESC, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, BR_SLSH, BR_TILD,
MYTAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, BR_ACUT,
KC_ESC, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, BR_SLSH, BR_ACUT,
NAVTAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, BR_TILD,
SC_LSPO, BR_CCED, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SC_RSPC,
KC_LCTL, KC_LALT, KC_LGUI, SYM, MYNAV, KC_SPC, MYNUM, FUN, KC_RGUI, KC_LALT, RCTL_T(KC_ENT)
KC_LCTL, KC_LGUI, KC_LALT, KC_MEH, NUM, KC_SPC, SYM, FUN, KC_RALT, KC_HYPR, CTL_ENT
),
//colemak base layer ok
[_COLEMAK] = LAYOUT_planck_mit(
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, BR_CCED, BR_TILD,
MYTAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, BR_ACUT,
KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, BR_CCED, BR_ACUT,
NAVTAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, BR_TILD,
SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, BR_SLSH, SC_RSPC,
KC_LCTL, KC_LALT, KC_LGUI, SYM, MYNAV, KC_SPC, MYNUM, FUN, KC_RGUI, KC_LALT, RCTL_T(KC_ENT)
KC_LCTL, KC_LGUI, KC_LALT, KC_MEH, NUM, KC_SPC, SYM, FUN, KC_RALT, KC_HYPR, CTL_ENT
),
//navigation and utility layer ok
//UTILITY LAYERS - SHORTCUT (CPY), SWAP HANDS (SWP)
[_CPY] = LAYOUT_planck_mit(
_______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______,
_______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
_______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_SWP] = LAYOUT_planck_mit(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, NUM, SH_T(KC_BSPC),_______, _______, _______, _______, _______, _______
),
//AUX LAYERS (NAV, SYM, NUM, FN)
[_NAV] = LAYOUT_planck_mit(
KC_TRNS, _______, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU,
_______, _______, _______, _______, BR_QUOT, _______, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD,
KC_TRNS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, _______, _______, KC_BSPC, KC_DEL, _______, _______, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______, MYNUM, _______, KC_MPRV, KC_MPLY, KC_MNXT
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, C(KC_V), C(KC_Z),
_______, KC_LALT, KC_LGUI, KC_LSFT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, C(KC_C), C(KC_X),
_______, _______, _______, _______, _______, _______, KC_ENT, KC_BSPC, KC_DEL, KC_VOLD, KC_VOLU, _______,
_______, _______, _______, _______, _______, KC_ENT, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
),
//symbols layer ok
[_SYM] = LAYOUT_planck_mit(
BR_DQUO, BR_EXLM, BR_AT, BR_HASH, BR_DLR, BR_PERC, BR_DIAE, BR_AMPR, BR_ASTR, BR_LPRN, BR_RPRN, BR_COLN,
BR_QUOT, BR_PIPE, _______, _______, _______, _______, _______, BR_PLUS, BR_UNDS, BR_LBRC, BR_RBRC, BR_SCLN,
KC_TRNS, BR_BSLS, _______, _______, _______, _______, _______, BR_EQL, BR_MINS, BR_LCBR, BR_RCBR, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______, _______, _______, KC_TRNS, KC_TRNS, KC_TRNS
BR_DQUO, BR_EXLM, BR_AT, BR_HASH, BR_DLR, BR_PERC, BR_DIAE, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
BR_QUOT, BR_BSLS, BR_SCLN, KC_MINS, BR_QUOT, _______, _______, KC_PLUS, _______, BR_LBRC, BR_RBRC, _______,
_______, BR_PIPE, BR_COLN, KC_UNDS, BR_DQUO, _______, _______, KC_EQL, _______, BR_LCBR, BR_RCBR, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
//numbers layer ok
[_NUM] = LAYOUT_planck_mit(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, BR_MINS,
_______, BR_ASTR, BR_SLSH, BR_MINS, BR_PLUS, _______, _______, KC_4, KC_5, KC_6, BR_COMM, BR_PLUS,
KC_TRNS, BR_PERC, BR_EQL, BR_DOT, BR_COMM, _______, _______, KC_1, KC_2, KC_3, BR_DOT, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, _______, MYNAV, _______, _______, KC_0, KC_0, KC_COMM, KC_ENT
_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, BR_SLSH, BR_MINS,
_______, BR_SLSH, KC_ASTR, KC_MINS, KC_PLUS, _______, _______, KC_4, KC_5, KC_6, BR_ASTR, BR_PLUS,
_______, BR_PERC, KC_EQL, KC_DOT, KC_COMM, _______, _______, KC_1, KC_2, KC_3, BR_COLN, BR_DOT,
_______, _______, _______, _______, _______, _______, KC_0, KC_BSPC, BR_COMM, BR_EQL, KC_ENT
),
//FN layer
[_FUNCTION] = LAYOUT_planck_mit(
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_INS,
KC_PSCR, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_F17, KC_F18, KC_F19, KC_F20, KC_PAUS,
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_F21, KC_F22, KC_F23, KC_F24, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______, _______, _______, KC_TRNS, KC_TRNS, KC_TRNS
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_SCRL, _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_INS,
_______, KC_F5, KC_F6, KC_F7, KC_F8, KC_NUM, _______, KC_F17, KC_F18, KC_F19, KC_F20, KC_PAUS,
_______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, KC_F21, KC_F22, KC_F23, KC_F24, KC_APP,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
),
// adjust layer ok
//ADJUST LAYER FOR KEYBOARD CONTROL
[_ADJUST] = LAYOUT_planck_mit(
QK_BOOT, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______,
KC_CAPS, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, QWERTY, DVORAK, COLEMAK, WORKMAN, MIDI,
_______, MI_ON, MI_OFF, MI_TOGG, MU_ON, MU_OFF, MU_TOGG, MU_NEXT, AU_ON, AU_OFF, _______, _______,
QK_BOOT, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, MIDI, GAME, _______, _______, _______,
KC_CAPS, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, QWERTY, DVORAK, COLEMAK, WORKMAN, _______,
QK_RBT, _______, _______, _______, _______, _______, _______, TOG_CPY, TOG_SWP, _______, _______, _______,
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
// midi layer
//MOUSE LAYER
[_MOUSE] = LAYOUT_planck_mit(
KC_ESC, KC_BTN6, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN6, KC_NO,
_______, KC_BTN4, KC_BTN2, KC_BTN3, KC_BTN1, KC_NO, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_NO,
_______, KC_BTN5, KC_ACL2, KC_ACL1, KC_ACL0, KC_NO, KC_BTN7, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN5, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
//MIDI
[_MIDI] = LAYOUT_planck_mit(
MI_Cs, MI_Ds, _______, MI_Fs, MI_Gs, MI_As, _______, MI_Cs, MI_Ds, _______, MI_Fs, MI_Gs,
MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C, MI_D, MI_E, MI_F, MI_G,
MI_BNDU, MI_OCTU, MI_TRSU, MI_VELU, _______, _______, _______, _______, _______, MI_ON, MI_CHNU, MI_TOGG,
MI_BNDD, MI_OCTD, MI_TRSD, MI_VELD, MYNAV, MI_SUST, MYNUM, _______, MI_OFF, MI_CHND, MI_AOFF
)
MI_Cs, MI_Ds, MI_F, MI_Fs, MI_Gs, MI_As, MI_C, MI_Cs1, MI_Ds1, MI_F1, MI_Fs1, MI_Gs1,
MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C1, MI_D1, MI_E, MI_F1, MI_G1,
MI_BNDU, MI_OCTU, MI_TRSU, MI_VELU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MI_MODU,MI_CHNU, MI_TOGG,
MI_BNDD, MI_OCTD, MI_TRSD, MI_VELD, MI_SOFT, MI_SUST, SYM, FUN, MI_MODD,MI_CHND, MI_AOFF
),
//GAME
[_GAME] = LAYOUT_planck_mit(
KC_ESC, JS_0, JS_1, JS_2, JS_3, JS_4, JS_5, JS_6, JS_7, JS_8, JS_9, KC_P,
KC_TAB, JS_10, JS_11, JS_12, JS_13, JS_14, JS_15, JS_16, JS_17, JS_18, JS_19, KC_O,
KC_LSFT, JS_20, JS_21, JS_22, JS_23, JS_24, JS_25, JS_26, JS_27, JS_28, JS_29, KC_L,
KC_LCTL, KC_LGUI, KC_LALT, KC_MEH, NUM, KC_SPC, SYM, FUN, KC_RALT, KC_HYPR, CTL_ENT
),
};
//Custom keycodes code for layer switching
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
@ -155,10 +185,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
set_single_persistent_default_layer(_MIDI);
}
return false;
case GAME:
if (record->event.pressed) {
set_single_persistent_default_layer(_GAME);
}
return false;
case TOG_CPY:
if (record->event.pressed) {
layer_invert(_CPY);
}
return false;
case TOG_SWP:
if (record->event.pressed) {
layer_invert(_SWP);
}
return false;
}
return true;
}
//ADJUST and MOUSE layers activation code
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _NAV, _NUM, _ADJUST);
state = update_tri_layer_state(state, _FUNCTION, _SYM, _ADJUST);
state = update_tri_layer_state(state, _NAV, _NUM, _MOUSE);
return state;
}

View File

@ -1,35 +1,79 @@
# Brazilian keymap for the BM40RGB keyboard
![qwerty](https://user-images.githubusercontent.com/62627597/133505514-466192cf-c58f-4b6f-9b7c-53ec36078401.png)
![photo](https://user-images.githubusercontent.com/62627597/228396721-b38ea064-6e80-4aff-90ec-01164d0515ae.jpg)
This keymap deviates somewhat from the generally used conventions of Planck style keyboards.
It's built on the following principles:
1. Availability of different base layers. QWERTY, Dvorak, Colemak and Workman are available. They can be chosen with the four right hand home row keys on the ADJUST layer (NAV + NUM keys). The base layout you choose gets stored on the keyboard EEPROM, so it will still be set if you unplug or reset the keyboard. I use Workman, so it's the default, but you can change to QWERTY easily with NAV + NUM + J (the J in QWERTY).
2. Frequent use of navigation keys such as the arrow keys, home, end, and hotkeys using those keycodes. For that reason, it keeps the navigation keys on a dedicated nav layer, on the home row, under the right hand. The nav layer gets the highly accessible layer toggle button usually used for the LOWER layer on most Planck style keymaps. I find this much better than using dedicated arrow keys on the bottom right of the keyboard, as the very reason I swapped to a 40% is to move my hands less.
1. Availability of different base layouts. QWERTY, Dvorak, Colemak and Workman are available. They can be chosen with the four right hand home row keys on the ADJUST layer (NAV + NUM keys). The base layout you choose gets stored on the keyboard EEPROM, so it will still be set if you unplug or reset the keyboard.
2. Frequent use of navigation keys such as the arrow keys, home, end, and hotkeys using those keycodes. For that reason, it keeps the navigation keys on a dedicated nav layer, on the home row, under the right hand. The nav layer is activated by the first button of the home row (the usual caps lock position). I find this much better than using dedicated arrow keys on the bottom right of the keyboard, as the very reason I swapped to a 40% is to move my hands less.
3. Accessibility of the ´ ` ^ ~ ç symbols. There are several blank spaces left on the symbols layer, if you need access to other symbols or diacritics.
4. Proper touch typing, and hotkey access, with the Ctrl, Shift, Win/Super and Alt modifiers on both sides. I found my hands very much expect Ctrl to be on the edge of the keyboard, and as such I've kept both bottom corner keys as Ctrl. Using those keys as layer modifiers, albeit common in many keymaps, is something I found to be somewhat awkward, as it makes it basically impossible to use the hand used to press them.
4. Proper touch typing, and hotkey access, with the Shift key on both sides. I found my hands very much expect Ctrl to be on the edge of the keyboard, and as such I've kept both bottom corner keys as Ctrl. The right Ctrl will act as an Enter key if tapped.
5. Numbers and navigation keys should be slightly more accessible than symbols and function keys. If you use symbols more often, consider swapping the NUM and SYM layer toggle keys.
6. It's easier to remember layers when they make sense conceptually. Hence, there are dedicated layers for navigation/utility (NAV), numbers (NUM), symbols (SYM) and function keys (FN). There's a dedicated MIDI layer. Don't forget to add #define MIDI_ADVANCED to your config.h if you plan on using it.
7. Tap hold is a good tool and you should use it if you can. Backspace and Delete are set as tap functions on the two more accessible layer toggle keys.
6. It's easier to remember layers when they make sense conceptually, so no "lower" and "raise" layers. Instead, there are dedicated layers for navigation/utility (NAV), numbers (NUM), symbols (SYM) and function keys (FN). There's also dedicated MIDI layers, a layer for one-hand typing, a mouse-emulating layer, and a layer for one-hand navigation and copy-pasting.
7. Tap hold is a good tool and you should use it if you can. Backspace and Delete are set as tap functions on the two more accessible layer toggle keys. The bottom right Ctrl behaves as Enter when tapped. The Nav layer button is Tab when tapped.
8. Easy-to-access shortcut modifiers. This layout includes a Master key (Shift+Ctrl+Alt) and a Hyper key (Shift+Ctrl+Alt+Super) for configuring system shortcuts.
It will only work as intended if your system keyboard layout is set to Brazilian ABNT2. It may work with other international layouts, but some keys, including brackets and the ´ ` ~ ^ keys, will get broken.
It will only work as intended if your system keyboard layout is set to Brazilian ABNT2. It may work with other international layouts, but some keys, including brackets and the ´ ` ~ ^ keys, will get broken. If your system layout is another one, it should be relatively easy to change keymap.c (search and replace each key with the equivalent one from the international keymaps file).
# Layers and functions
# Base Layers
In each key:
Top left: Symbols;
Top right: Functions;
Bottom left: Navigation;
Bottom right: Numbers;
Bottom: secondary function (tap/hold)
These are selected as the base by a button in the Adjust layer.
# BASE (Qwerty, Dvorak, Colemak, Workman)
![qwerty](https://user-images.githubusercontent.com/62627597/133505788-e8410162-8491-4f52-bc94-62dacb752171.png)
## Normal
# Adjust (NAV+NUM)
![adjust](https://user-images.githubusercontent.com/62627597/133182475-1994e733-71a2-42ee-88fe-9a15e711b938.png)
![bm40rgb-wolff-base](https://user-images.githubusercontent.com/62627597/228848191-cb403c12-c090-4aeb-b207-506e5c80c547.png)
# MIDI
![midi](https://user-images.githubusercontent.com/62627597/133505599-8ae3ea32-5f8f-451f-b191-f74c514d22c0.png)
QWERTY, Dvorak, Colemak and Workman are built-in.
## MIDI
![bm40rgb-wolff-midi](https://user-images.githubusercontent.com/62627597/228708182-5ba2b9f4-e1f4-4e10-be6e-58ff373f274a.png)
One and a half octaves piano on the top rows, control signals in the bottom rows. SYM and FUN remain accessible so the ADJ layer can be accessed.
## Joystick
![bm40rgb-wolff-game](https://user-images.githubusercontent.com/62627597/228849208-9fb10cf3-0a11-4799-877a-48eafe811078.png)
Emulates a 32-button joystick for using as a button-box or dedicated game controller.
# Modifier layers
These are activated by holding down modifier keys.
## Navigation Layer (NAV)
![bm40rgb-wolff-nav](https://user-images.githubusercontent.com/62627597/228853095-6c254027-adfb-4afb-9536-4f00e11ab3cb.png)
The layer you'll access most often. Navigation keys right on the right-hand homerow, plus a few common utilities.
## Functions Layer (FUN)
![bm40rgb-wolff-fun](https://user-images.githubusercontent.com/62627597/228852255-3c12d3c8-733a-4680-888c-35a4162cd3a3.png)
## Mouse Layer
![bm40rgb-wolff-mouse](https://user-images.githubusercontent.com/62627597/228853517-08934862-ca70-444d-a6bc-9dec584c6bb5.png)
Emulates mouse actions so you can perform simple tasks without reaching for the mouse.
## Adjust Layer (SYM + FUN)
![bm40rgb-wolff-adj](https://user-images.githubusercontent.com/62627597/228851675-ec61ad2b-95a9-402b-933a-009e9f52fbd3.png)
# Additional/utility layers
These are utility overlays toggled by a key in the Adjust layer.
## Handswap Layer
![bm40rgb-swap-hands](https://user-images.githubusercontent.com/62627597/228849174-e3bca496-9f5a-49d6-a41e-9b65adbc6c34.png)
For one-hand typing. The three top rows are mirrorred when SWAP is held down.
## CPY Layer (One-hand navigation layer)
![bm40rgb-copy](https://user-images.githubusercontent.com/62627597/228847641-4caa777e-c368-4921-a0a4-10c47afa2537.png)
For general navigation and quick copy-paste one-handed stuff. I don't like using it, but my job demands it sometimes.

View File

@ -0,0 +1,19 @@
LTO_ENABLE = yes
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
TERMINAL_ENABLE = no
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = no
KEY_LOCK_ENABLE = no
RGB_MATRIX_ENABLE = yes
LAYOUTS = planck_mit
MIDI_ENABLE = yes
JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = digital
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
SWAP_HANDS_ENABLE = yes
STENO_ENABLE = no # Enabling steno requires disabling all options in the previous block.