qmk_sweep_skeletyl/keyboards/crkbd/keymaps/rmeli/keymap.c

129 lines
5.3 KiB
C
Raw Normal View History

Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
/*
Copyright 2019 @foostan
Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
Copyright 2021 Rocco Meli <@RMeli>
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
#include "rmeli.h"
// + -------------------- +
// + RGB MATRIX CALLBACKS |
// + -------------------- +
// LED numbers:
// https://github.com/foostan/crkbd/blob/main/corne-classic/doc/buildguide_en.md
// Change LED color to red when CAPS LOCK is active
void rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(26, 255, 0, 0);
// Only works with SPLIT_LED_STATE_ENABLE
rgb_matrix_set_color(53, 255, 0, 0);
}
}
// + ---- +
// + OLED |
// + ---- +
bool oled_task_user(void) {
if (is_keyboard_master()) {
oled_render_rocco();
} else {
oled_render_meli();
}
return false;
}
// + ------- +
// + KEY MAP |
// + ------- +
// Layer names
enum layer_names {
_QWERTY,
_COLEMAK_DH,
_DWN,
_UP,
_CONFIG,
};
// Layer names shortcuts
#define _QWY 0
#define _CMK 1
#define _CFG 4
#define ______THUMB_LEFT_x3______ KC_LGUI, MO(_DWN), KC_SPC
#define ______THUMB_RIGHT_x3_____ KC_ENT, MO(_UP), KC_RCTL
// LAYOUT
//
// |-----------------------------| |-----------------------------|
// | | | | | | | | | | | | | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | | | | | | | | | |
// |----+----+----+----+----+----| |----+----+----+----+----+----|
// | | | | | | | | | | | | | |
// |----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
// | | | | | | | |
// |--------------| |--------------|
// Define wrapper for standard CRKB layout
#define LAYOUT_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
// clang-format off
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_wrapper(
// clang-format off
___________________QWERTY_L1_x6_____________________, ___________________QWERTY_R1_x6_____________________,
___________________QWERTY_L2_x6_____________________, ___________________QWERTY_R2_x6_____________________,
___________________QWERTY_L3_x6_____________________, ___________________QWERTY_R3_x6_____________________,
______THUMB_LEFT_x3______, ______THUMB_RIGHT_x3_____
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
),
[_COLEMAK_DH] = LAYOUT_wrapper(
________________COLEMAK_MOD_DH_L1_x6________________, ________________COLEMAK_MOD_DH_R1_x6________________,
________________COLEMAK_MOD_DH_L2_x6________________, ________________COLEMAK_MOD_DH_R2_x6________________,
________________COLEMAK_MOD_DH_L3_x6________________, ________________COLEMAK_MOD_DH_R3_x6________________,
______THUMB_LEFT_x3______, ______THUMB_RIGHT_x3_____
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
),
[_DWN] = LAYOUT_wrapper(
_______, ______________NUMBER_LEFT_x5_______________, ______________NUMBER_RIGHT_x5______________, _______,
_______, ______________UNICODE_L2_x5________________, ________________NAV_R2_x5__________________, XXXXXXX,
_______, ______________UNICODE_L3_x5________________, ________________NAV_R3_x5__________________, _______,
KC_LGUI, _______, _______, _______,MO(_CFG), _______
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
),
[_UP] = LAYOUT_wrapper(
___________________SYMBOL_LEFT_x6___________________, ___________________SYMBOL_RIGHT_x6__________________,
_______, ____________NAV_VIM_x4____________, XXXXXXX, ____________________SYMBOL_R2_x6____________________,
_______, _________________NONE_5x___________________, ____________________SYMBOL_R3_x6____________________,
_______,MO(_CFG), _______, _______, _______, _______
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
),
[_CONFIG] = LAYOUT_wrapper(
QK_BOOT, _________________NONE_5x___________________, _______________CONFIG_R1_x5________________,DF(_QWY),
RGB_TOG, ________________RGB_L2_x5__________________, _______________CONFIG_R2_x5________________, XXXXXXX,
XXXXXXX, ________________RGB_L3_x5__________________, _______________CONFIG_R3_x5________________,DF(_CMK),
_______, _______, _______, _______, _______, _______
Personal user space and CRKBD R2G keymap (#15888) * r2g folder groundwork * Default mb keymap featuring mb logos * Migrate Oled to keyboard folder * Move rules configs to support config better * update readmes * Liscnece update * Update config and fix issues caused by redef errs * funciton name adjusts, define specific rgb modes * move default oled font to postconfig * update oled in line with develop merge * fix return value * Add some default rgb matrix defines * del ugfx * remove #include <stdio.h> * create personal keymap for r2g * reduce firmware size * change keymap to follow physical layout * remove RGBlight config lines to make both sides work (@Dasky on MechboardsUK Discord) * strip down configuration, similar to crkbd/r2g:mb_via * remove wrong oled code overwriting the r2g one * broken code with RGB matrix (briks right side) * remove high max brightness limit * caps lock tap dance and RGB indicator for active caps lock * fix caps lock led on right side * add test macro * remove latex macro which is too slow * move caps lock tap dance to RALT and add space cadet shift * switch CTL with ALT in first layer * add tap dance for ESC/DEL * space cadet tap dance with caps lock; shift works by needs a short pause * add space cadet tap dance with caps lock on the right; shift works by needs a short pause and does not hold * make more keys transparent * enable auto shift and use logo on both oleds * add user oled logo, slows down linking considerably * oled name * add arrow keys in usual configuration and add linear configuration to symbol layer * add unicoede support * add accents * update to latest version * add colemak dh layer * report auto shift timeout * define layer name shorcuts correctly * disable VIA to enable more layers * enable NKRO * move some rules and unicode to user space * move oled and tap dances to user space * move tap dances fully out of keymap * expand unicode map * fix unicode code * revert changes to r2g, make it equal to merged code * revert changes to r2g, make it equal to merged code * clang-format userspace * clang-format config file * Update keyboards/crkbd/keymaps/rmeli/keymap.c * replace define with enum * add licenses
2022-03-11 00:27:37 +01:00
)
};
// clang-format on