diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
commit | 98b9909429aea0869f7a6f2f44ab386a4a3ff094 (patch) | |
tree | e1080a61bb89a75edc70818489f8044adf597c48 /keyboards/crkbd | |
parent | b610965fd6d851484025166fb255078b1c809261 (diff) | |
parent | fa3dd373b4925734d9843ae6014349069ffec353 (diff) | |
download | qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.tar.gz qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/crkbd')
99 files changed, 4656 insertions, 486 deletions
diff --git a/keyboards/crkbd/config.h b/keyboards/crkbd/config.h index f354efbb47..02732819f9 100644 --- a/keyboards/crkbd/config.h +++ b/keyboards/crkbd/config.h @@ -68,9 +68,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -#define USE_SERIAL -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION +#define USE_SERIAL diff --git a/keyboards/crkbd/crkbd.h b/keyboards/crkbd/crkbd.h index 4ba9397043..3fae1a400c 100644 --- a/keyboards/crkbd/crkbd.h +++ b/keyboards/crkbd/crkbd.h @@ -20,5 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef KEYBOARD_crkbd_rev1 # include "rev1.h" #endif +#ifdef KEYBOARD_crkbd_r2g +# include "r2g.h" +#endif + #include "quantum.h" diff --git a/keyboards/crkbd/keymaps/antosha417/config.h b/keyboards/crkbd/keymaps/antosha417/config.h new file mode 100644 index 0000000000..4b6e86fd6b --- /dev/null +++ b/keyboards/crkbd/keymaps/antosha417/config.h @@ -0,0 +1,37 @@ +// Copyright 2021 Anton Kavalkou (@antosha417) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + + +#define TAPPING_FORCE_HOLD + +#ifdef RGBLIGHT_ENABLE + #undef RGBLED_NUM + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_TWINKLE + #define RGBLED_NUM 27 + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define COMBO_TERM 30 + diff --git a/keyboards/crkbd/keymaps/antosha417/keymap.c b/keyboards/crkbd/keymaps/antosha417/keymap.c new file mode 100644 index 0000000000..bdee148485 --- /dev/null +++ b/keyboards/crkbd/keymaps/antosha417/keymap.c @@ -0,0 +1,401 @@ +// Copyright 2021 Anton Kavalkou (@antosha417) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "sendstring_dvorak.h" + +typedef union { + uint32_t raw; + struct { + bool is_macos :1; + }; +} user_config; + +user_config config; + +enum layers { + _QWERTY, + _DVORAK, + _LOWER, + _RAISE, + _TOP, + _BOTTOM, +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + + RUS_LANG, + EN_LANG, + HEB_LANG, + + VIM_SAVE, + + CHNGE_OS, + DELETE_WORD, + +#define MOD_TAP_KEY(keycode, tap_action, mod_on_action, mod_off_action) \ + keycode, +#include "mod_tap_keys.h" +#undef MOD_TAP_KEY +}; + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define TOP MO(_TOP) +#define BOTTOM MO(_BOTTOM) +#define LANG TG(_DVORAK) +#define KC_CAD LALT(LCTL(KC_DEL)) +#define KC_CAH LALT(LCTL(KC_HOME)) + +#define E_SFT LSFT_T(KC_E) +#define D_SFT LSFT_T(KC_D) +#define A_ALT LALT_T(KC_A) +#define O_GUI LGUI_T(KC_O) +#define U_CTRL LCTL_T(KC_U) + +#define T_SFT RSFT_T(KC_T) +#define K_SFT RSFT_T(KC_K) +#define S_ALT RALT_T(KC_S) +#define N_GUI RGUI_T(KC_N) +#define H_CTRL RCTL_T(KC_H) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_split_3x6_3( +//,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_ESC, A_ALTQ, S_GUIQ, D_SFT, F_CTLQ, KC_G, KC_H, J_CTLQ, K_SFT, L_GUIQ, SCLN_Q, KC_QUOT, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, +//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + BOTTOM, KC_SPC, LOWER, RAISE, KC_SPC, TOP + //`--------------------------' `--------------------------' +), + +[_DVORAK] = LAYOUT_split_3x6_3( +//,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, A_ALT, O_GUI, E_SFT, U_CTRL, KC_I, KC_D, H_CTRL, T_SFT, N_GUI, S_ALT, KC_QUOT, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ESC, +//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //`--------------------------' `--------------------------' +), + +[_LOWER] = LAYOUT_split_3x6_3( +//,-----------------------------------------------------. ,-----------------------------------------------------. + KC_F11, KC_UNDS, KC_MINS, KC_TILD, KC_PERC, KC_QUOT, _______, KC_CIRC, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_DEL, KC_LBRC, KC_LCBR, KC_PLUS, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_EXLM, KC_RCBR, KC_RBRC, KC_BSPC, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_CAD, KC_CAH, _______, LANG, _______, _______,HEB_LANG, EN_LANG,RUS_LANG, _______, _______, +//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //`--------------------------' `--------------------------' + //^^^^^^^ +), + + +[_RAISE] = LAYOUT_split_3x6_3( +//,-----------------------------------------------------. ,-----------------------------------------------------. + KC_F11, _______, _______, KC_DLR, KC_AMPR, _______, KC_COLON, KC_QUES, KC_AT, KC_HASH, KC_SLSH, KC_F12, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_7, KC_5, KC_3, KC_1, KC_9, KC_0, KC_2, KC_4, KC_6, KC_8, KC_BSPC, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F10, KC_F2, KC_F4, KC_F6, KC_F8, _______, +//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //`--------------------------' `--------------------------' + //^^^^^^^ +), + +[_TOP] = LAYOUT_split_3x6_3( +//,-----------------------------------------------------. ,-----------------------------------------------------. + _______,CHNGE_OS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, +//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //`--------------------------' `--------------------------' + //^^^^^^^ +), + +[_BOTTOM] = LAYOUT_split_3x6_3( +//,-----------------------------------------------------. ,-----------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RGHT, _______, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, _______, _______, _______, +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, +//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //`--------------------------' `--------------------------' + //^^^^^^^ +) + +}; + +enum combo_events { + // combos for dvorak layer + RU_COMBO, + EN_COMBO, + HEB_COMBO, + ESC_COMBO, + TAB_COMBO, + ENT_COMBO, + DEL_COMBO, + SAVE_COMBO, + BSPC_COMBO, + BSPCW_COMBO, + + // combos for qwerty layer + RUQ_COMBO, + ENQ_COMBO, + HEBQ_COMBO, + ESCQ_COMBO, + TABQ_COMBO, + ENTQ_COMBO, + DELQ_COMBO, + SAVEQ_COMBO, + BSPCQ_COMBO, + BSPCWQ_COMBO, + + COMBO_LENGTH +}; +uint16_t COMBO_LEN = COMBO_LENGTH; + +const uint16_t PROGMEM ru_combo[] = {KC_R, U_CTRL, COMBO_END}; +const uint16_t PROGMEM en_combo[] = {U_CTRL, S_ALT, COMBO_END}; +const uint16_t PROGMEM heb_combo[] = {KC_I, KC_V, COMBO_END}; +const uint16_t PROGMEM esc_combo[] = {H_CTRL, U_CTRL, COMBO_END}; +const uint16_t PROGMEM tab_combo[] = {T_SFT, A_ALT, COMBO_END}; +const uint16_t PROGMEM ent_combo[]= {E_SFT, N_GUI, COMBO_END}; +const uint16_t PROGMEM del_combo[] = {KC_D, E_SFT, COMBO_END}; +const uint16_t PROGMEM bspc_combo[] = {KC_C, H_CTRL, COMBO_END}; +const uint16_t PROGMEM bspcw_combo[] = {N_GUI, U_CTRL, COMBO_END}; +const uint16_t PROGMEM save_combo[] = {O_GUI, H_CTRL, COMBO_END}; + +const uint16_t PROGMEM ruq_combo[] = {KC_O, F_CTLQ, COMBO_END}; +const uint16_t PROGMEM enq_combo[] = {F_CTLQ, SCLN_Q, COMBO_END}; +const uint16_t PROGMEM hebq_combo[] = {KC_G, KC_DOT, COMBO_END}; +const uint16_t PROGMEM escq_combo[] = {F_CTLQ, J_CTLQ, COMBO_END}; +const uint16_t PROGMEM tabq_combo[] = {K_SFT, A_ALTQ, COMBO_END}; +const uint16_t PROGMEM entq_combo[] = {D_SFT, L_GUIQ, COMBO_END}; +const uint16_t PROGMEM delq_combo[] = {KC_H, D_SFT, COMBO_END}; +const uint16_t PROGMEM bspcq_combo[] = {KC_I, J_CTLQ, COMBO_END}; +const uint16_t PROGMEM bspcwq_combo[] = {L_GUIQ, F_CTLQ, COMBO_END}; +const uint16_t PROGMEM saveq_combo[] = {S_GUIQ, J_CTLQ, COMBO_END}; + +combo_t key_combos[] = { + [RU_COMBO] = COMBO(ru_combo, RUS_LANG), + [EN_COMBO] = COMBO(en_combo, EN_LANG), + [HEB_COMBO] = COMBO(heb_combo, HEB_LANG), + [ESC_COMBO] = COMBO(esc_combo, KC_ESC), + [TAB_COMBO] = COMBO(tab_combo, KC_TAB), + [ENT_COMBO] = COMBO(ent_combo, KC_ENT), + [DEL_COMBO] = COMBO(del_combo, KC_DEL), + [BSPC_COMBO] = COMBO(bspc_combo, KC_BSPC), + [SAVE_COMBO] = COMBO(save_combo, VIM_SAVE), + [BSPCW_COMBO] = COMBO(bspcw_combo, DELETE_WORD), + + [RUQ_COMBO] = COMBO(ruq_combo, RUS_LANG), + [ENQ_COMBO] = COMBO(enq_combo, EN_LANG), + [HEBQ_COMBO] = COMBO(hebq_combo, HEB_LANG), + [ESCQ_COMBO] = COMBO(escq_combo, KC_ESC), + [TABQ_COMBO] = COMBO(tabq_combo, KC_TAB), + [ENTQ_COMBO] = COMBO(entq_combo, KC_ENT), + [DELQ_COMBO] = COMBO(delq_combo, KC_DEL), + [BSPCQ_COMBO] = COMBO(bspcq_combo, KC_BSPC), + [SAVEQ_COMBO] = COMBO(saveq_combo, VIM_SAVE), + [BSPCWQ_COMBO] = COMBO(bspcwq_combo, DELETE_WORD), +}; + + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + +void oled_render_layer_state(void) { + oled_write_P(PSTR("layer: "), false); + switch (get_highest_layer(layer_state|default_layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("qwerty"), false); + break + case _DVORAK: + oled_write_ln_P(PSTR("dvorak"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("lower"), false); + break; + case_RAISE: + oled_write_ln_P(PSTR("raise"), false); + break; + case _TOP: + oled_write_ln_P(PSTR("top"), false); + break; + case _BOTTOM: + oled_write_ln_P(PSTR("bottom"), false); + break; + default: + oled_write_ln_P(PSTR("unknown"), false); + break; + } +} + +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo(void) { + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +} + +bool oled_task_user(void) { + if (is_keyboard_master()) { + oled_write_ln_P(PSTR("nice cock"), false); + oled_render_layer_state(); + } else { + oled_render_logo(); + } + return false; +} + +#endif // OLED_ENABLE + +void keyboard_post_init_user(void) { + config.raw = eeconfig_read_user(); + layer_on(_DVORAK); +} + +void set_english_language(void) { + layer_on(_DVORAK); + tap_code16(LSFT(LCTL(LGUI(KC_1)))); +} + +void set_russian_language(void) { + layer_off(_DVORAK); + tap_code16(LSFT(LCTL(LGUI(KC_2)))); +} + +void set_hebrew_language(void) { + layer_off(_DVORAK); + tap_code16(LSFT(LCTL(LGUI(KC_3)))); +} + +void delete_word(void) { + if (config.is_macos) { + tap_code16(A(KC_BSPC)); + } else { + tap_code16(C(KC_BSPC)); + } +} + +#define CASE(keycode, key_pressed_action, key_released_action) \ + case (keycode): \ + if (record->event.pressed) { \ + key_pressed_action; \ + } else { \ + key_released_action; \ + } \ + return false; \ + break; + +#define CASE_PRESSED(keycode, key_pressed_action) CASE(keycode, key_pressed_action, {}); + +#define CASE_MOD_TAP_KEY(keycode, tap_action, mod_off_action) \ + CASE(keycode, { \ + keycode ## _TIMER = timer_read(); \ + IS_ ## keycode ## _ACTIVE = true; \ + }, { \ + if(IS_ ## keycode ## _MOD_ACTIVE) { \ + mod_off_action; \ + } else if (IS_ ## keycode ## _ACTIVE) { \ + tap_action; \ + } \ + IS_ ## keycode ## _MOD_ACTIVE = false; \ + IS_ ## keycode ## _ACTIVE = false; \ + }); + +#define MOD_TAP_KEY(keycode, tap_action, mod_on_action, mod_off_action) \ +uint16_t keycode ## _TIMER = 0; \ +bool IS_ ## keycode ## _ACTIVE = false; \ +bool IS_ ## keycode ## _MOD_ACTIVE = false; +#include "mod_tap_keys.h" +#undef MOD_TAP_KEY + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + #ifdef OLED_ENABLE + if (record->event.pressed) { + set_keylog(keycode, record); + } +#endif //OLED_ENABLE + + switch (keycode) { + CASE_PRESSED(EN_LANG, set_english_language()); + CASE_PRESSED(RUS_LANG, set_russian_language()); + CASE_PRESSED(HEB_LANG, set_hebrew_language()); + + CASE_PRESSED(VIM_SAVE, {set_english_language(); SEND_STRING(SS_TAP(X_ESC)SS_LSFT(SS_TAP(X_SCLN))SS_TAP(X_W)SS_TAP(X_ENT));}); + + CASE_PRESSED(CHNGE_OS, {config.is_macos ^= 1; eeconfig_update_user(config.raw);}); + CASE_PRESSED(DELETE_WORD, delete_word()); + + #define MOD_TAP_KEY(keycode, tap_action, mod_on_action, mod_off_action) \ + CASE_MOD_TAP_KEY(keycode, tap_action, mod_off_action); + #include "mod_tap_keys.h" + #undef MOD_TAP_KEY + } + + #define MOD_TAP_KEY(keycode, tap_action, mod_on_action, mod_off_action) \ + if (IS_ ## keycode ## _ACTIVE && !IS_ ## keycode ## _MOD_ACTIVE) { \ + if (timer_elapsed(keycode ## _TIMER) <= TAPPING_TERM) { \ + tap_action; \ + IS_ ## keycode ## _ACTIVE = false; \ + } \ + } + #include "mod_tap_keys.h" + #undef MOD_TAP_KEY + + return true; +} + +void matrix_scan_user(void) { + #define MOD_TAP_KEY(keycode, tap_action, mod_on_action, mod_off_action) \ + if (IS_ ## keycode ## _ACTIVE) { \ + if (timer_elapsed(keycode ## _TIMER) > TAPPING_TERM) { \ + mod_on_action; \ + IS_ ## keycode ## _MOD_ACTIVE = true; \ + } \ + } + #include "mod_tap_keys.h" + #undef MOD_TAP_KEY +} + diff --git a/keyboards/crkbd/keymaps/antosha417/mod_tap_keys.h b/keyboards/crkbd/keymaps/antosha417/mod_tap_keys.h new file mode 100644 index 0000000000..0d7a86b691 --- /dev/null +++ b/keyboards/crkbd/keymaps/antosha417/mod_tap_keys.h @@ -0,0 +1,15 @@ +// Copyright 2021 Anton Kavalkou (@antosha417) +// SPDX-License-Identifier: GPL-2.0-or-later + +// MOD_TAP_KEY(key, tap_action, mod_on_action, mod_off_action) + +MOD_TAP_KEY(S_GUIQ, tap_code(KC_S), {layer_on(_DVORAK); register_code(KC_LGUI);}, {layer_off(_DVORAK); unregister_code(KC_LGUI);}) +MOD_TAP_KEY(L_GUIQ, tap_code(KC_L), {layer_on(_DVORAK); register_code(KC_RGUI);}, {layer_off(_DVORAK); unregister_code(KC_RGUI);}) + +MOD_TAP_KEY(F_CTLQ, tap_code(KC_F), {layer_on(_DVORAK); register_code(KC_LCTL);}, {layer_off(_DVORAK); unregister_code(KC_LCTL);}) +MOD_TAP_KEY(J_CTLQ, tap_code(KC_J), {layer_on(_DVORAK); register_code(KC_RCTL);}, {layer_off(_DVORAK); unregister_code(KC_RCTL);}) + +MOD_TAP_KEY(A_ALTQ, tap_code(KC_A), {layer_on(_DVORAK); register_code(KC_LALT);}, {layer_off(_DVORAK); unregister_code(KC_LALT);}) +MOD_TAP_KEY(SCLN_Q, tap_code(KC_SCLN), {layer_on(_DVORAK); register_code(KC_RALT);},{layer_off(_DVORAK); unregister_code(KC_RALT);}) + + diff --git a/keyboards/crkbd/keymaps/antosha417/rules.mk b/keyboards/crkbd/keymaps/antosha417/rules.mk new file mode 100644 index 0000000000..63a3a16616 --- /dev/null +++ b/keyboards/crkbd/keymaps/antosha417/rules.mk @@ -0,0 +1,5 @@ +OLED_ENABLE = yes +COMBO_ENABLE = yes + +LTO_ENABLE = yes #enable link time optimization to reduce binary size + diff --git a/keyboards/crkbd/keymaps/antosha417/todo.md b/keyboards/crkbd/keymaps/antosha417/todo.md new file mode 100644 index 0000000000..4ee83af65d --- /dev/null +++ b/keyboards/crkbd/keymaps/antosha417/todo.md @@ -0,0 +1,13 @@ +# Notes: + * to flush firmware to keyboard use: + ``` + $ make crkbd/rev1:antosha417:avrdude-split-right + $ make crkbd/rev1:antosha417:avrdude-split-left + ``` + +# Todo: + [ ] do something with displayig symbols on oled screen + [ ] count wpm + [ ] load images + [X] figure out how to delete word on linux + [X] fix oled layer names diff --git a/keyboards/crkbd/keymaps/ardakilic/README.md b/keyboards/crkbd/keymaps/ardakilic/README.md new file mode 100644 index 0000000000..5e620f03f0 --- /dev/null +++ b/keyboards/crkbd/keymaps/ardakilic/README.md @@ -0,0 +1,7 @@ +# Ardakilic's Corne Layout + +This layout is optimised to use Turkish characters on Corne on macOS. + +Also, some size optimisations enabled in `rules.mk` and `config.h`. + +Bongo cat animation implemented from: https://github.com/nwii/oledbongocat diff --git a/keyboards/crkbd/keymaps/ardakilic/config.h b/keyboards/crkbd/keymaps/ardakilic/config.h new file mode 100644 index 0000000000..7a3bb76b38 --- /dev/null +++ b/keyboards/crkbd/keymaps/ardakilic/config.h @@ -0,0 +1,60 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +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 + + +/* Select hand configuration */ + +#define MASTER_LEFT + +#define SPLIT_WPM_ENABLE + +// #define MASTER_RIGHT +// #define EE_HANDS + + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define RETRO_TAPPING + + + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" + +// size optimisations +// #define NO_DEBUG +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* CONSOLE_ENABLE = no achieves this +// Size optimisations +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +#define NO_PRINT +#endif // !NO_PRINT + +#define NO_ACTION_ONESHOT +// Size optimisations END +*/ diff --git a/keyboards/crkbd/keymaps/ardakilic/keymap.c b/keyboards/crkbd/keymaps/ardakilic/keymap.c new file mode 100644 index 0000000000..a611c59223 --- /dev/null +++ b/keyboards/crkbd/keymaps/ardakilic/keymap.c @@ -0,0 +1,489 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2021 Arda Kilicdagi <GH: @ardakilic, TW: @ardadev> + +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 + +// Layers +enum { + _QWERTY, + _LOWER, + _RAISE, + _SPACE, + _NUMPAD, + _SODA, + _ADJUST +}; + +//KC_NONUS_BSLASH (\|) is equivalent to ["é] key in Turkish keyboards. +//KC_GRV (~ `) is equivalent to [<>|] key in Turkish keyboards. +// KC_SCLN is Turkish s [şŞ] key +// KC_QUOT is Turkish i [iİ] key +// KC_COMM is Turkish o [öÖ] key +// KC_DOT is Turkish c [çÇ] key + +// Custom shortcuts specific to Turkish layout +#define CURLY_OPEN RALT(KC_7) +#define CURLY_CLOSE RALT(KC_0) +#define SQUARE_OPEN RALT(KC_8) +#define SQUARE_CLOSE RALT(KC_9) +#define DOLLAR_SIGN RALT(KC_4) +#define BACKSLASH RALT(KC_MINS) +#define VERTICAL_PIPE RALT(KC_EQL) +#define BACKTICK RALT(KC_BSLS) +#define TILDE RALT(KC_RBRC) +#define NUMBER_SIGN RALT(KC_3) //hashtag sign +#define LOCKSCREEN LCTL(LSFT(KC_POWER)) // Screen Lock shortcut for OSX + +/* +// Unicode Turkish characters, in case it's needed +enum { + TR_C, // ç + TR_C_L, // Ç + TR_I, // ı + TR_I_L, // İ + TR_G, // ğ + TR_G_L, // Ğ + TR_S, // ş + TR_S_L, // Ş + TR_U, // ü + TR_U_L, // Ü + TR_O, // ö + TR_O_L, // Ö +}; + +// clang-format off +const uint32_t PROGMEM unicode_map[] = { + [TR_C] = 0x00c7, + [TR_C_L] = 0x00e7, + [TR_I] = 0x0130, + [TR_I_L] = 0x0131, + [TR_G] = 0x011e, + [TR_G_L] = 0x011f, + [TR_S] = 0x015e, + [TR_S_L] = 0x015f, + [TR_U] = 0x00dc, + [TR_U_L] = 0x00fc, + [TR_O] = 0x00d6, + [TR_O_L] = 0x00f6, +}; +// clang-format on +*/ + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * BASE LAYER + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | NpdESC | A | S | D | F | G | | H | J | K | L | Ş | İ | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | SftCaps| Z | X | C | V | B | | N | M | Ö | Ç | . | CtlEnt| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | OS|. | Lwr|, | Space*| |Sda|Ent|Raise|"| LAlt|.| + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_QWERTY] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_NUMPAD, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LCTL_T(KC_ENT), /*KC_ENT*/ + LGUI_T(KC_SLSH), LT(_LOWER, KC_BSLS),LT(_SPACE, KC_SPC), LT(_SODA, KC_ENT), LT(_RAISE, KC_NONUS_BSLASH), LALT_T(KC_SLSH) + + ), + +/* + * LOWER LAYER + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | > | ! | ' | ^ | + | % | | & | / | ( | ) | = | Bksp | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | F1 | F2 | F3 | F4 | F5 | F6 | | "$" | ? | _ | Ğ | Ü | - | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | F7 | F8 | F9 | F10 | F11 | F12 | | "[" | "]" | "{" | "}" | < | ">" | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | | | | | | ADJUST| | + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_LOWER] = LAYOUT_split_3x6_3( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DOLLAR_SIGN, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_EQL, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, SQUARE_OPEN, SQUARE_CLOSE, CURLY_OPEN, CURLY_CLOSE, KC_GRV, LSFT(KC_GRV), + _______, _______, _______, _______, MO(_ADJUST), _______ + ), + +/* + * RAISE LAYER + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | Tab | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | F1 | F2 | F3 | F4 | F5 | F6 | | | * | - | "\" | "|" | , | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | F7 | F8 | F9 | F10 | F11 | F12 | | ' | # | " | "~" | "`" | <>| | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | | | | | | | | + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_RAISE] = LAYOUT_split_3x6_3( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_MINS, KC_EQL, BACKSLASH, VERTICAL_PIPE, KC_BSLS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_AT, NUMBER_SIGN, KC_NUBS, TILDE, BACKTICK, KC_GRV, + _______, _______, _______, _______, _______, _______ + ), + +/* + * SPACE LAYER + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | | CMD+1 | CMD+2 | CMD+3 | CMD+4 | CMD+5 | | CMD+6 | CMD+7 | CMD+8 | CMD+9 | CMD+0 | LCKOSX| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | | Brght▼ | Brght▲ | | | | | Left | Down | Up | Right | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | | | | | | | | | Prev | Next | Vol- | Vol+ | Play | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | | | | | | | | + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_SPACE] = LAYOUT_split_3x6_3( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LOCKSCREEN, + _______, KC_BRMD, KC_BRMU, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______ + ), + +/* + * NUMPAD LAYER + * KC_PDOT is comma on the Turkish layout ¯\_(ツ)_/¯ + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | | | | | | | | = | Num7 | Num8 | Num9 | - | Bksp | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | | | | | | | | . | Num4 | Num5 | Num6 | + | * | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | | | | | | | | , | Num1 | Num2 | Num3 | . | / | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | | | | | Ent | Num0 | Num0 | + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_NUMPAD] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, KC_PEQL, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PAST, + _______, _______, _______, _______, _______, _______, KC_PDOT, KC_P1, KC_P2, KC_P3, KC_SLSH, KC_PSLS, + _______, _______, _______, KC_PENT, KC_P0, KC_P0 + ), + + + /* + * SODA LAYER + * KC_PDOT is comma on the Turkish layout ¯\_(ツ)_/¯ + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | | | Up | | | | | | | | | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | | Left | Down | Right | | | | | | | | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | | | | | | | | | | | | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | | | | | | | | + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_SODA] = LAYOUT_split_3x6_3( + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + + +/* + * ADJUST LAYER + [_TPL] = LAYOUT_wrapper( \ + //,-----------------------------------------------------. ,----------------------------------------------------. + | RESET | EEPRST | | | | | | | | | | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | RGBTog | HUE▲ | SAT▲ | BRGHT▲ | | | | | | | | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + | RGBMOD | HUE▼ | SAt▼ | BRGHT▼ | | | | | | | | | | + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+-------| + ,-----------------------, ,-----------------------. + | OS | | Space | | Ent | | ALT | + /|-------+-------+-------' +-------+-------+-------|\ + ), +*/ + [_ADJUST] = LAYOUT_split_3x6_3( + RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT + ) +}; + + +#ifdef OLED_ENABLE +// #include <stdio.h> + +// bongo cat +// Taken from +// https://github.com/nwii/oledbongocat +// char wpm_str[10]; // sprintf changed with more optimized code + + +// WPM-responsive animation stuff here +# define IDLE_FRAMES 5 +# define IDLE_SPEED 20 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +# define TAP_FRAMES 2 +# define TAP_SPEED 40 // above this wpm value typing animation to trigger + +# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +# define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Code containing pixel art, contains: +// 5 idle frames, 1 prep frame, and 2 tap frames + +// To make your own pixel art: +// save a png/jpeg of an 128x32 image (resource: https://www.pixilart.com/draw ) +// follow this guide up to and including "CONVERT YOUR IMAGE" https://docs.splitkb.com/hc/en-us/articles/360013811280-How-do-I-convert-an-image-for-use-on-an-OLED-display- +// replace numbers in brackets with your own +// if you start getting errors when compiling make sure you didn't accedentally delete a bracket +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x82, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x60, 0x60, 0x00, 0x01, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x86, 0x86, 0x40, 0x40, 0x40, 0x40, 0x21, 0x22, 0x22, 0x20, 0x11, 0x11, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x34, 0xc4, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x18, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x31, 0xc1, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + static const char PROGMEM prep[][ANIM_SIZE] = {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x64, 0x18, 0x04, 0x12, 0xc2, 0xca, 0x24, 0x88, 0xf0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x41, 0x42, 0x24, 0x98, 0xc0, 0x88, 0x88, 0x8c, 0x9c, 0x1c, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc1, 0x01, 0x01, 0x02, 0x02, 0x04, 0x84, 0x44, 0x44, 0x42, 0x82, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x02, 0x18, 0x19, 0x00, 0x05, 0xfe, 0x80, 0x83, 0x83, 0x40, 0x40, 0x40, 0x40, 0x20, 0x21, 0x21, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x30, 0x40, 0x80, 0x80, 0x00, 0x00, 0x01, 0x86, 0x98, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x0f, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f, 0x0f, 0x07, 0x03, 0x03, 0x61, 0xf0, 0xf8, 0xfc, 0x60, 0x01, 0x01, 0x01, 0x3c, 0x78, 0xf8, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + }; + + // assumes 1 frame prep stage + void animation_phase(void) { + if (get_current_wpm() <= IDLE_SPEED) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + } + if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) { + // oled_write_raw_P(prep[abs((PREP_FRAMES-1)-current_prep_frame)], ANIM_SIZE); // uncomment if IDLE_FRAMES >1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if (get_current_wpm() >= TAP_SPEED) { + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + } + } + if (get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} + +// bongop cat + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + + +void oled_render_layer_state(void) { + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Default"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case _SPACE: + oled_write_ln_P(PSTR("Space"), false); + break; + case _NUMPAD: + oled_write_ln_P(PSTR("Numpad"), false); + break; + case _SODA: + oled_write_ln_P(PSTR("Soda"), false); + break; + case _ADJUST: + // case _ADJUST|_LOWER: + // case _ADJUST|_RAISE: + // case _ADJUST|_LOWER|_RAISE: + // case _ADJUST|_LOWER|_RAISE|_SPACE: + // case _ADJUST|_LOWER|_RAISE|_SPACE|_NUMPAD|_SODA: + oled_write_ln_P(PSTR("Adjust"), false); + break; + default: + oled_write_ln_P(PSTR("?????"), false); + } +} + + +char keylog_str[24] = {}; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); +} + +void oled_render_keylog(void) { + oled_write(keylog_str, false); +} + +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +// void oled_render_logo(void) { +// static const char PROGMEM crkbd_logo[] = { +// 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, +// 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, +// 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, +// 0}; +// oled_write_P(crkbd_logo, false); +// } + +bool oled_task_user(void) { + if (is_keyboard_master()) { + oled_render_layer_state(); + oled_render_keylog(); + } else { + // bongo cat + render_anim(); // renders pixelart + + oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (5 rows on 128x32 screen, anything more will overflow back to the top) + // sprintf(wpm_str, "WPM:%03d", get_current_wpm()); // edit the string to change wwhat shows up, edit %03d to change how many digits show up + // oled_write(wpm_str, false); // writes wpm on top left corner of string + + // This way it's more size efficient than calling sprintf + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), ' '), false); + // This way it's more size efficient than calling sprintf + + led_t led_state = host_keyboard_led_state(); // caps lock stuff, prints CAPS on new line if caps led is on + + oled_set_cursor(0, 1); + oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + // bongo cat + + //oled_render_logo(); + } + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + return true; +} +#endif // OLED_DRIVER_ENABLE diff --git a/keyboards/crkbd/keymaps/ardakilic/rules.mk b/keyboards/crkbd/keymaps/ardakilic/rules.mk new file mode 100644 index 0000000000..0453ca573a --- /dev/null +++ b/keyboards/crkbd/keymaps/ardakilic/rules.mk @@ -0,0 +1,15 @@ +OLED_ENABLE = yes +EXTRAKEY_ENABLE = yes # for media keys + +# bongo cat +WPM_ENABLE = yes +# bongo cat + +# Size optimisations +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no +GRAVE_ESCAPE_ENABLE = no +MOUSEKEY_ENABLE = no +# Size optimisations END diff --git a/keyboards/crkbd/keymaps/armand1m/keymap.c b/keyboards/crkbd/keymaps/armand1m/keymap.c index a37862fad3..3caee1c827 100644 --- a/keyboards/crkbd/keymaps/armand1m/keymap.c +++ b/keyboards/crkbd/keymaps/armand1m/keymap.c @@ -130,7 +130,8 @@ void oled_render_amsterdam_flag(void) { oled_write_raw_P(amsterdam_flag, sizeof(amsterdam_flag)); } -void oled_task_user(void) { +bool oled_task_user(void) { oled_render_amsterdam_flag(); + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/blipson/keymap.c b/keyboards/crkbd/keymaps/blipson/keymap.c index 23491e11a6..ad7664c295 100644 --- a/keyboards/crkbd/keymaps/blipson/keymap.c +++ b/keyboards/crkbd/keymaps/blipson/keymap.c @@ -128,12 +128,13 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); } else { oled_render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/colemad/config.h b/keyboards/crkbd/keymaps/colemad/config.h new file mode 100644 index 0000000000..6d2050e148 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/config.h @@ -0,0 +1,30 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_KEYPRESSES + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + #define RGB_DISABLE_WHEN_USB_SUSPENDED + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + #define RGB_MATRIX_LED_FLUSH_LIMIT 16 + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 8 + #define RGB_MATRIX_VAL_STEP 5 + #define RGB_MATRIX_SPD_STEP 10 + + // Effects + #define ENABLE_RGB_MATRIX_BREATHING +#endif + +#ifdef OLED_ENABLE + #define SPLIT_LAYER_STATE_ENABLE + #define SPLIT_LED_STATE_ENABLE + #define SPLIT_MODS_ENABLE + #define SPLIT_OLED_ENABLE + #define OLED_TIMEOUT 60000 + #define OLED_FONT_H "keyboards/crkbd/keymaps/colemad/glcdfont.c" +#endif diff --git a/keyboards/crkbd/keymaps/colemad/glcdfont.c b/keyboards/crkbd/keymaps/colemad/glcdfont.c new file mode 100644 index 0000000000..3bf950e162 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/glcdfont.c @@ -0,0 +1,234 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "progmem.h" + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ +// See also: https://github.com/soundmonster/glcdfont_converter + +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, + 0xF8, 0x18, 0x00, 0xC0, 0xF0, 0xFC, + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00, + 0xF8, 0xFC, 0x06, 0x03, 0x83, 0x43, + 0x23, 0x13, 0x23, 0x43, 0x83, 0x03, + 0x06, 0xFC, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xFC, 0x06, 0x03, 0xE3, 0x23, + 0x23, 0x03, 0x23, 0xE3, 0x23, 0x03, + 0xE3, 0xA3, 0x63, 0x03, 0xE3, 0x03, + 0x03, 0x03, 0x06, 0xFC, 0x00, 0x00, + 0xF8, 0xFC, 0x06, 0x03, 0xC3, 0x23, + 0x23, 0xC3, 0x03, 0x43, 0xA3, 0x23, + 0x43, 0x03, 0x06, 0xFC, 0x00, 0x00, + 0xF8, 0xFC, 0x06, 0x03, 0xE3, 0xA3, + 0xE3, 0x03, 0xE3, 0x03, 0x83, 0xE3, + 0x83, 0x03, 0x06, 0xFC, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, + 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, + 0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0, + 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, + 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, + 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0, + 0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0, + 0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80, + 0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xE0, + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x1F, 0x3F, 0x60, 0x41, 0x41, 0x4F, + 0x48, 0x48, 0x48, 0x4F, 0x41, 0x41, + 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x1F, 0x3F, 0x60, 0x40, 0x47, 0x44, + 0x44, 0x40, 0x40, 0x47, 0x40, 0x40, + 0x47, 0x40, 0x47, 0x40, 0x47, 0x44, + 0x44, 0x40, 0x20, 0x1F, 0x00, 0x00, + 0x1F, 0x3F, 0x60, 0x40, 0x43, 0x44, + 0x44, 0x43, 0x40, 0x42, 0x44, 0x45, + 0x42, 0x40, 0x20, 0x1F, 0x00, 0x00, + 0x1F, 0x3F, 0x60, 0x40, 0x47, 0x40, + 0x47, 0x40, 0x47, 0x44, 0x40, 0x47, + 0x44, 0x40, 0x20, 0x1F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E, + 0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C, + 0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88, + 0x88, 0x88, 0x55, 0x55, 0x23, 0x23, + 0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47, + 0x23, 0x23, 0x55, 0x55, 0x88, 0x88, + 0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2, + 0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4, + 0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88, + 0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6, + 0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6, + 0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88, + 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x1F, 0x1F, 0x3F, 0x3F, + 0x7F, 0x7F, 0x7F, 0x3F, 0x3F, 0x1F, + 0x3F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7C, + 0x78, 0x78, 0x38, 0x1C, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, + 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, + 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, + 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, + 0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07, + 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, + 0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06, + 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, +}; diff --git a/keyboards/crkbd/keymaps/colemad/keycodes.h b/keyboards/crkbd/keymaps/colemad/keycodes.h new file mode 100644 index 0000000000..6497f1662b --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/keycodes.h @@ -0,0 +1,24 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include QMK_KEYBOARD_H +#include "layers.h" + +/* Tap-Hold keycodes */ +#define KC_LOWER LT(_LOWER, KC_ENT) /* Tap for Enter, Hold for LOWER layer */ +#define KC_RAISE LT(_RAISE, KC_SPC) /* Tap for Space, Hold for RAISE layer */ + +/* Tap Dance keycodes */ +#if defined(TAP_DANCE_ENABLE) + #include "tap_dances.h" + #define KC_T_SFT T_SFT /* Single tap for Shift, Double tap for CAPS Lock */ +#else + #define KC_T_SFT KC_LSFT +#endif + +/* Macros */ +enum custom_keycodes { + VSCTERM = SAFE_RANGE, + CHNLANG +}; diff --git a/keyboards/crkbd/keymaps/colemad/keymap.c b/keyboards/crkbd/keymaps/colemad/keymap.c new file mode 100644 index 0000000000..fb951370f2 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/keymap.c @@ -0,0 +1,66 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +#include "layers.h" +#include "keycodes.h" +#include "process_records.h" + +#ifdef OLED_ENABLE + #include "oled.h" +#endif + +/* Layer keymaps */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_COLEMAK] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + T_SFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LALT, KC_LCTL,KC_RAISE, KC_LOWER, T_SFT, KC_LGUI + // `-------------------------' `--------------------------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_0, KC_1, KC_2, KC_3, KC_MINS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_ESC, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_SLSH, KC_4, KC_5, KC_6, KC_PLUS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_ASTR, KC_7, KC_8, KC_9, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + // `-------------------------' `--------------------------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_F11, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + // `-------------------------' `--------------------------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, VSCTERM, KC_PSCR, CHNLANG, XXXXXXX, XXXXXXX,RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX + // `-------------------------' `--------------------------' + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/crkbd/keymaps/colemad/layers.h b/keyboards/crkbd/keymaps/colemad/layers.h new file mode 100644 index 0000000000..f569ad156e --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/layers.h @@ -0,0 +1,10 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +enum custom_layers { + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST, +}; diff --git a/keyboards/crkbd/keymaps/colemad/oled.c b/keyboards/crkbd/keymaps/colemad/oled.c new file mode 100644 index 0000000000..8c5591184e --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/oled.c @@ -0,0 +1,128 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H +#include "layers.h" +#include "oled.h" + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +void render_layer_symbol(void) { + static const char PROGMEM default_layer[] = { + 0x20, 0x94, 0x95, 0x96, 0x20, + 0x20, 0xb4, 0xb5, 0xb6, 0x20, + 0x20, 0xd4, 0xd5, 0xd6, 0x20, 0}; + static const char PROGMEM raise_layer[] = { + 0x20, 0x97, 0x98, 0x99, 0x20, + 0x20, 0xb7, 0xb8, 0xb9, 0x20, + 0x20, 0xd7, 0xd8, 0xd9, 0x20, 0}; + static const char PROGMEM lower_layer[] = { + 0x20, 0x9a, 0x9b, 0x9c, 0x20, + 0x20, 0xba, 0xbb, 0xbc, 0x20, + 0x20, 0xda, 0xdb, 0xdc, 0x20, 0}; + static const char PROGMEM adjust_layer[] = { + 0x20, 0x9d, 0x9e, 0x9f, 0x20, + 0x20, 0xbd, 0xbe, 0xbf, 0x20, + 0x20, 0xdd, 0xde, 0xdf, 0x20, 0}; + if(layer_state_is(_ADJUST)) { + oled_write_P(adjust_layer, false); + } else if(layer_state_is(_LOWER)) { + oled_write_P(lower_layer, false); + } else if(layer_state_is(_RAISE)) { + oled_write_P(raise_layer, false); + } else { + oled_write_P(default_layer, false); + } +} + +void render_layer_name(void) { + bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); + bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); + bool adjust = layer_state_is(_ADJUST); + + if(lower){ + oled_write_P(PSTR("LOWER"), false); + } else if(raise){ + oled_write_P(PSTR("RAISE"), false); + } else if(adjust){ + oled_write_P(PSTR(" ADJ "), false); + } else { + oled_write_P(PSTR(" "), false); + } +} + +void render_mod_state(uint8_t modifiers) { + static const char PROGMEM shift_line_1[] = { + 0x85, 0x86, 0x87, 0}; + static const char PROGMEM shift_line_2[] = { + 0xa5, 0xa6, 0xa7, 0}; + + static const char PROGMEM ctrl_line_1[] = { + 0x88, 0x89, 0x8a, 0x8b, 0}; + static const char PROGMEM ctrl_line_2[] = { + 0xa8, 0xa9, 0xaa, 0xab, 0}; + + static const char PROGMEM os_line_1[] = { + 0x8c, 0x8d, 0x8e, 0}; + static const char PROGMEM os_line_2[] = { + 0xac, 0xad, 0xae, 0}; + + static const char PROGMEM alt_line_1[] = { + 0x8f, 0x90, 0x91, 0}; + static const char PROGMEM alt_line_2[] = { + 0xaf, 0xb0, 0xb1, 0}; + + if (modifiers & MOD_MASK_GUI) { + oled_write(" ", false); + oled_write_ln_P(os_line_1, false); + oled_write(" ", false); + oled_write_ln_P(os_line_2, false); + } else { + oled_write_ln("", false); + oled_write_ln("", false); + } + + if (modifiers & MOD_MASK_SHIFT) { + oled_write(" ", false); + oled_write_ln_P(shift_line_1, false); + oled_write(" ", false); + oled_write_ln_P(shift_line_2, false); + } else { + oled_write_ln("", false); + oled_write_ln("", false); + } + + if (modifiers & MOD_MASK_ALT) { + oled_write(" ", false); + oled_write_ln_P(alt_line_1, false); + oled_write(" ", false); + oled_write_ln_P(alt_line_2, false); + } else { + oled_write_ln("", false); + oled_write_ln("", false); + } + + if (modifiers & MOD_MASK_CTRL) { + oled_write_ln_P(ctrl_line_1, false); + oled_write_ln_P(ctrl_line_2, false); + } else { + oled_write_ln("", false); + oled_write_ln("", false); + } +} + +void render_status(void){ + render_layer_name(); + + render_layer_symbol(); + + oled_write_P(PSTR("\n\n\n"), false); + + render_mod_state(get_mods()|get_oneshot_mods()); +} + +bool oled_task_user(void) { + render_status(); + return false; +} diff --git a/keyboards/crkbd/keymaps/colemad/oled.h b/keyboards/crkbd/keymaps/colemad/oled.h new file mode 100644 index 0000000000..c096466e71 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/oled.h @@ -0,0 +1,13 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#ifdef OLED_ENABLE + bool process_record_oled(uint16_t keycode, keyrecord_t *record); + oled_rotation_t oled_init_user(oled_rotation_t rotation); + void render_layer_symbol(void); + void render_layer_name(void); + void render_mod_state(uint8_t modifiers); + void render_status(void); + bool oled_task_user(void); +#endif
\ No newline at end of file diff --git a/keyboards/crkbd/keymaps/colemad/process_records.c b/keyboards/crkbd/keymaps/colemad/process_records.c new file mode 100644 index 0000000000..549dec2464 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/process_records.c @@ -0,0 +1,21 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "layers.h" +#include "keycodes.h" + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* Macros */ + switch (keycode) { + case VSCTERM: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("`")); // Ctrl + ` (to toggle vscode terminal) + } + return false; + case CHNLANG: + if (record->event.pressed) { + SEND_STRING(SS_LCTL(SS_LSFT("n"))); // Ctrl + Shift + N (to change keyboard layout) + } + return false; + } + return true; +} diff --git a/keyboards/crkbd/keymaps/colemad/process_records.h b/keyboards/crkbd/keymaps/colemad/process_records.h new file mode 100644 index 0000000000..7cedcfbe68 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/process_records.h @@ -0,0 +1,5 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/crkbd/keymaps/colemad/readme.md b/keyboards/crkbd/keymaps/colemad/readme.md new file mode 100644 index 0000000000..404fa9e798 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/readme.md @@ -0,0 +1,106 @@ +# **COLEMAD** + +## Corne Keyboard (CRKBD) **Colemak** layout by [ACortesDev](https://github.com/ACortesDev) + +1. **Fast navigation**. +2. **Fast symbols**. +3. **Fast numbers**. + Using the Telephone/ATM numpad layout. Easier to memorize/visualize as numbers follow *left-to-right, top-to-bottom* order. +4. **Fast capital letters**. + Added a *CAPS Lock* key because... [There is no *CAPS Lock* key in the Colemak Layout](https://colemak.com/FAQ#Where_is_the_Caps_Lock_key.3F). + +--- + +### **Flashing** + +For *Pro Micro* execute: `sudo make crkbd:colemad:avrdude` + +For *Elite-C* execute: `sudo make crkbd:colemad:dfu` + +--- + +### **Layers** + +#### 0. **COLEMAK** + +Notes: + +- Double tap Shift to (de)activate CAPS Lock. +- Hold down the Enter thumb key to switch to the LOWER layer +- Hold down the Space thumb key to switch to the RAISE layer +- Characters **"** **:** **|** **<** **>** **?** as you would expect them using *Shift*. + +```text + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | BackSP | A | R | S | T | D | | H | N | E | I | O | ' | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Shift | Z | X | C | V | B | | K | M | , | . | / | ESC | + `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------' + ,--------. ,--------. + ,-----------------| | | |-----------------. + | Alt | Ctrl | Space | | Enter | Shift | GUI | + | | | (RAISE)| |(LOWER) | | | + `--------+--------+--------' `--------+--------+--------' +``` + +#### 1. **LOWER** + +##### Numpad + Navigation + +```text + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Tab | 0 | 1 | 2 | 3 | - | | PgUP | HOME | ↑ | END | ESC | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | BackSP | / | 4 | 5 | 6 | + | | PgDN | ← | ↓ | → | DEL | | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Shift | * | 7 | 8 | 9 | = | | | | | | | ESC | + `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------' + ,--------. ,--------. + ,-----------------| | | |-----------------. + | Alt | Ctrl | Space | | | Shift | GUI | + | | | (RAISE)| |(LOWER) | | | + `--------+--------+--------' `--------+--------+--------' +``` + +#### 2. **RAISE** + +##### Symbols + Function Keys + +```text + ,-----------------------------------------------------. ,-----------------------------------------------------. + | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | F11 | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | BackSP | F1 | F2 | F3 | F4 | F5 | | ` | - | = | [ | ] | F12 | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | Shift | F6 | F7 | F8 | F9 | F10 | | ~ | _ | + | { | } | ESC | + `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------' + ,--------. ,--------. + ,-----------------| | | |-----------------. + | Alt | Ctrl | | | Enter | Shift | GUI | + | | | (RAISE)| |(LOWER) | | | + `--------+--------+--------' `--------+--------+--------' +``` + +#### 3. **ADJUST** + +##### Macros + Settings + +```text + ,-----------------------------------------------------. ,-----------------------------------------------------. + | | | | | | | |RGB_TOG |RGB_MOD |RGB_VAI |RGB_HUI |RGB_SAI |RGB_SPI | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | |VSCTERM | PSCR |CHNLANG | | | |RGB_RMOD|RGB_VAD |RGB_HUD |RGB_SAD |RGB_SPD | + |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | + `--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------' + ,--------. ,--------. + ,-----------------| | | |-----------------. + | | | | | | | | + | | | (RAISE)| |(LOWER) | | | + `--------+--------+--------' `--------+--------+--------' +``` + +- Macro **VSCTERM**: Toggles the vscode terminal (Ctrl + `) +- Macro **CHNLANG**: Changes the OS keyboard layout (Ctrl + Shift + N) diff --git a/keyboards/crkbd/keymaps/colemad/rules.mk b/keyboards/crkbd/keymaps/colemad/rules.mk new file mode 100644 index 0000000000..6f9d31a755 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/rules.mk @@ -0,0 +1,21 @@ +RGB_MATRIX_ENABLE = yes +RGBLIGHT_ENABLE = no +SPLIT_KEYBOARD = yes +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = no +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 + + +# Link Time Optimization (Reduces compiled size) +LTO_ENABLE = yes + +SRC += ./process_records.c + +ifeq ($(TAP_DANCE_ENABLE),yes) + SRC += ./tap_dances.c +endif + +ifeq ($(OLED_ENABLE),yes) + SRC += ./oled.c +endif diff --git a/keyboards/crkbd/keymaps/colemad/tap_dances.c b/keyboards/crkbd/keymaps/colemad/tap_dances.c new file mode 100644 index 0000000000..fc47cfd8d1 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/tap_dances.c @@ -0,0 +1,7 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "tap_dances.h" + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) +}; diff --git a/keyboards/crkbd/keymaps/colemad/tap_dances.h b/keyboards/crkbd/keymaps/colemad/tap_dances.h new file mode 100644 index 0000000000..1d7cf1e7f4 --- /dev/null +++ b/keyboards/crkbd/keymaps/colemad/tap_dances.h @@ -0,0 +1,11 @@ +// Copyright 2022 Álvaro Cortés (@ACortesDev) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include QMK_KEYBOARD_H + +enum custom_tapdances{ + TD_LSFT_CAPS = 0, +}; + +#define T_SFT TD(TD_LSFT_CAPS) /* Tap for Shift, double tap for CAPSLOCK */ diff --git a/keyboards/crkbd/keymaps/curry/config.h b/keyboards/crkbd/keymaps/curry/config.h index a7c4ed7403..ba9c69ed26 100644 --- a/keyboards/crkbd/keymaps/curry/config.h +++ b/keyboards/crkbd/keymaps/curry/config.h @@ -13,3 +13,9 @@ # define RGB_MATRIX_VAL_STEP 5 # define RGB_MATRIX_SPD_STEP 10 #endif + +// comment out unnecessary layouts +#define ENABLE_QWERTY +#define ENABLE_COLEMAK +#define ENABLE_DVORAK +#define ENABLE_WORKMAN diff --git a/keyboards/crkbd/keymaps/curry/keymap.c b/keyboards/crkbd/keymaps/curry/keymap.c index e56f77ebeb..43a3147619 100644 --- a/keyboards/crkbd/keymaps/curry/keymap.c +++ b/keyboards/crkbd/keymaps/curry/keymap.c @@ -14,29 +14,37 @@ #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#if defined(ENABLE_QWERTY) [_QWERTY] = LAYOUT_crkbd_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), +#endif +#if defined(ENABLE_COLEMAK) [_COLEMAK] = LAYOUT_crkbd_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), +#endif +#if defined(ENABLE_DVORAK) [_DVORAK] = LAYOUT_crkbd_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), +#endif +#if defined(ENABLE_WORKMAN) [_WORKMAN] = LAYOUT_crkbd_base_wrapper( _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), +#endif [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, diff --git a/keyboards/crkbd/keymaps/davidrambo/config.h b/keyboards/crkbd/keymaps/davidrambo/config.h index 82057151d3..bf96f265f4 100644 --- a/keyboards/crkbd/keymaps/davidrambo/config.h +++ b/keyboards/crkbd/keymaps/davidrambo/config.h @@ -51,34 +51,52 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_VAL_STEP 8 #define RGB_MATRIX_SPD_STEP 10 - /* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - #define DISABLE_RGB_MATRIX_ALPHAS_MODS - #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_CYCLE_ALL - #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP - #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// # define ENABLE_RGB_MATRIX_CYCLE_ALL +// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// # define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define ENABLE_RGB_MATRIX_RAINDROPS +// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// # define ENABLE_RGB_MATRIX_PIXEL_FLOW +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h index 937d67e25f..8f4d73ca22 100644 --- a/keyboards/crkbd/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/default/config.h @@ -28,19 +28,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 +//#define TAPPING_FORCE_HOLD +//#define TAPPING_TERM 100 #ifdef RGBLIGHT_ENABLE - #undef RGBLED_NUM - #define RGBLIGHT_ANIMATIONS - #define RGBLED_NUM 27 + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 #endif -#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
\ No newline at end of file +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 88d40ee407..23e706e64b 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -157,13 +157,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk index d34d066ded..c14c202fae 100644 --- a/keyboards/crkbd/keymaps/default/rules.mk +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -1,2 +1,5 @@ -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 +MOUSEKEY_ENABLE = yes # Mouse keys +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/devdev/config.h b/keyboards/crkbd/keymaps/devdev/config.h index c858f8f2d0..4848af2245 100644 --- a/keyboards/crkbd/keymaps/devdev/config.h +++ b/keyboards/crkbd/keymaps/devdev/config.h @@ -84,34 +84,52 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_VAL_STEP 8 # define RGB_MATRIX_SPD_STEP 10 -/* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/devdev/keymap.c b/keyboards/crkbd/keymaps/devdev/keymap.c index aa4d39a253..a506295749 100644 --- a/keyboards/crkbd/keymaps/devdev/keymap.c +++ b/keyboards/crkbd/keymaps/devdev/keymap.c @@ -392,13 +392,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h index f10c474057..bece69ba67 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/config.h +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -33,38 +33,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT -//disable effects -#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Static gradient left to right speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_EFFECT_MAX +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #define ENABLE_RGB_MATRIX_DUAL_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// // #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +// #define ENABLE_RGB_MATRIX_PIXEL_FLOW +// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c index 11690b0294..6ef428a11f 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -83,7 +83,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { } const char *read_logo(void); -void oled_task_user(void){ +bool oled_task_user(void){ switch (biton32(layer_state)){ case _DVORAK: oled_write_ln_P(PSTR("DVRK"), false); @@ -102,5 +102,6 @@ void oled_task_user(void){ } //now print logo oled_write(read_logo(), false); + return false; } #endif diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index 3a3748c691..e5ff029565 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -43,7 +43,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_mode_icon(!get_enable_kc_lang()); render_layer_state(); @@ -51,5 +51,6 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/ericgebhart/config.h b/keyboards/crkbd/keymaps/ericgebhart/config.h new file mode 100755 index 0000000000..d1844f6807 --- /dev/null +++ b/keyboards/crkbd/keymaps/ericgebhart/config.h @@ -0,0 +1,24 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +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 + +// otherwise the other promicro v3 isn't found +#define SPLIT_USB_DETECT diff --git a/keyboards/crkbd/keymaps/ericgebhart/keymap.c b/keyboards/crkbd/keymaps/ericgebhart/keymap.c new file mode 100755 index 0000000000..e893ec596b --- /dev/null +++ b/keyboards/crkbd/keymaps/ericgebhart/keymap.c @@ -0,0 +1,60 @@ +/* + Copyright 2018 Eric Gebhart <e.a.gebhart@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 "ericgebhart.h" + +#define Crkbd_base(...) Base_3x6_3(__VA_ARGS__) +#define Crkbd_bepo(...) Base_bepo_3x6_3(__VA_ARGS__) +#define Crkbd_bepo6(...) Base_bepo6_3x6_3(__VA_ARGS__) +#define Crkbd_transient(...) Transient6_3x6_3(__VA_ARGS__) + +/* + * The `Crkbd_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Qwerty based Base layers + [_DVORAK] = Crkbd_base(___DVORAK___), + [_BEAKL] = Crkbd_base(___BEAKL15___), + [_COLEMAK] = Crkbd_base(___COLEMAK_DH___), + [_QWERTY] = Crkbd_base(___QWERTY___), + + // Bepo base layers + [_BEAKL_BP] = Crkbd_bepo(___BEAKL15_FR___), + [_DVORAK_BP] = Crkbd_bepo(___DVORAK_FR___), + [_BEPO] = Crkbd_bepo6(___BEPO6___), + + // Transient layers. + [_SYMB] = Crkbd_transient(___SYMB_BEAKLB_3x12___), + [_SYMB_BP] = Crkbd_transient(___SYMB_BEAKLB_BP_3x12___), + + [_KEYPAD] = Crkbd_transient(___KP_C_3x12___), + [_KEYPAD_BP] = Crkbd_transient(___KP_C_BP_3x12___), + + [_TOPROWS] = Crkbd_transient(___TOPROWS_3x12___), + [_TOPROWS_BP] = Crkbd_transient(___TOPROWS_BP_3x12___), + + [_NAV] = Crkbd_transient(___NAV_3x12___), + + [_LAYERS] = Crkbd_transient(___LAYERS_3x12___), + //[_RGB] = Crkbd_transient(___RGB_3x12___), + [_ADJUST] = Crkbd_transient(___ADJUST_3x12___), + ///HPT_TOG, KC_NUKE, ___, ___, TG_MODS, HPT_FBK +}; diff --git a/keyboards/crkbd/keymaps/gotham/README.md b/keyboards/crkbd/keymaps/gotham/README.md index 23c1d4fdd8..88120ae888 100644 --- a/keyboards/crkbd/keymaps/gotham/README.md +++ b/keyboards/crkbd/keymaps/gotham/README.md @@ -10,7 +10,6 @@ My take on the 40% layout with programming in mind. Do read about the layers, it ## Custom OLED This keymap includes custom OLED font and code. The font contains some logos and status indidcators for some of the features I use (RGB and Audio). Enable OLED in rukes.mk to check it out. Feel free to reuse the font or parts of it. -__KNOWN BUG:__ When the computer sleeps, one of the OLEDs is always on (they don't turn off on their own, and the timeout doesn't work). I haven't been able to figure out what's going on there and am open to suggestions/PRs. ## Flashing Flash using `make crkbd:gotham:avrdude` for Pro Micro and `make crkbd:gotham:dfu` for Elite-C. diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index 05b04e0aa3..45fe8c37a8 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -20,7 +20,16 @@ # define AUDIO_CLICKY #endif -#define OLED_FONT_H "keyboards/crkbd/keymaps/gotham/glcdfont.c" +#ifdef OLED_ENABLE +# define OLED_FONT_H "keyboards/crkbd/keymaps/gotham/glcdfont.c" +# define SPLIT_LAYER_STATE_ENABLE +# define SPLIT_LED_STATE_ENABLE +# define SPLIT_MODS_ENABLE +# define SPLIT_OLED_ENABLE +# undef OLED_TIMEOUT + // due to timer_read() for render_prompt(), we have own implementation of oled time out +# define OLED_KEY_TIMEOUT 30000 +#endif #define RGBLIGHT_SLEEP @@ -49,40 +58,40 @@ /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/gotham/keymap.c b/keyboards/crkbd/keymaps/gotham/keymap.c index 7cf4b7fd50..a258794049 100644 --- a/keyboards/crkbd/keymaps/gotham/keymap.c +++ b/keyboards/crkbd/keymaps/gotham/keymap.c @@ -81,6 +81,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef OLED_ENABLE if (record->event.pressed) { oled_timer = timer_read(); + is_key_processed = true; add_keylog(keycode); } #endif diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c index 4d2c10b60a..6bf1233659 100644 --- a/keyboards/crkbd/keymaps/gotham/oled.c +++ b/keyboards/crkbd/keymaps/gotham/oled.c @@ -144,6 +144,7 @@ void render_feature_status(void) { // Keylogger #define KEYLOGGER_LENGTH 5 static uint16_t oled_timer = 0; +static bool is_key_processed = true; static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; // clang-format off static const char PROGMEM code_to_name[0xFF] = { @@ -246,20 +247,16 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { - if (timer_elapsed(oled_timer) > 10000) { - oled_off(); - return; - } - #ifndef SPLIT_KEYBOARD - else { - oled_on(); - } - #endif - +bool oled_task_user(void) { if (is_keyboard_master()) { - render_status_main(); + if (is_key_processed && (timer_elapsed(oled_timer) < OLED_KEY_TIMEOUT)) { + render_status_main(); + } else { + is_key_processed = false; + oled_off(); + } } else { render_status_secondary(); } + return false; } diff --git a/keyboards/crkbd/keymaps/jpe230/config.h b/keyboards/crkbd/keymaps/jpe230/config.h new file mode 100644 index 0000000000..d8185d4253 --- /dev/null +++ b/keyboards/crkbd/keymaps/jpe230/config.h @@ -0,0 +1,40 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert +Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@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/>. +*/ + +#pragma once + +#ifndef RGB_MATRIX_ENABLE +# define SPLIT_WPM_ENABLE +#endif + +#ifdef RGB_MATRIX_ENABLE +# define RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 +# define RGB_MATRIX_STARTUP_HUE 215 +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#endif diff --git a/keyboards/crkbd/keymaps/jpe230/keymap.c b/keyboards/crkbd/keymaps/jpe230/keymap.c new file mode 100644 index 0000000000..c5ec473fed --- /dev/null +++ b/keyboards/crkbd/keymaps/jpe230/keymap.c @@ -0,0 +1,432 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@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 QMK_KEYBOARD_H + +#ifdef VIA_ENABLE + #define USER_START USER00 +#else + #define USER_START SAFE_RANGE +#endif + +// Keycode to toggle Sarcasm Mode +enum custom_keycodes { + KC_SCASM = USER_START +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(1), KC_ENT, KC_SPC, MO(2), KC_RALT + //`--------------------------' `--------------------------' + + ), + + [1] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_UP, _______, RGB_MOD, RGB_HUI, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, RGB_TOG, RGB_SAI, RGB_SPI, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, _______, _______, MO(3), KC_RALT + //`--------------------------' `--------------------------' + ), + + [2] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_CAPS, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(3), _______, TG(3), _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [3] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_MUTE, KC_WBAK, KC_WFWD, KC_F7, KC_F8, KC_F9, _______, KC_7, KC_8, KC_9, _______, RESET, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_VOLU, _______, KC_MNXT, KC_F6, KC_F5, KC_F6, _______, KC_6, KC_5, KC_4, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_VOLD, KC_MPRV, KC_MNXT, KC_F1, KC_F2, KC_F3, _______, KC_1, KC_2, KC_3, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______,KC_SCASM, TG(3), _______, KC_RALT + //`--------------------------' `--------------------------' + ) +}; + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { +#ifdef RGB_MATRIX_ENABLE + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } +#endif + return rotation; +} + +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +void oled_render_layer_state(void) { + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_ln_P(PSTR("Default"), false); + break; + case L_LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case L_RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case L_ADJUST: + case L_ADJUST|L_LOWER: + case L_ADJUST|L_RAISE: + case L_ADJUST|L_LOWER|L_RAISE: + oled_write_ln_P(PSTR("Adjust"), false); + break; + } +} + + +static char logged_char = ' '; +static uint8_t logged_row = 0, logged_col = 0; +static uint16_t logged_keycode = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if (keycode < 60) { + logged_char = code_to_name[keycode]; + } + + // update keylog + logged_row = record->event.key.row; + logged_col = record->event.key.col; + logged_keycode = keycode; +} + +void oled_render_keylog(void) { + oled_write(get_u8_str(logged_row, '0'), false); + oled_write_P(PSTR(":"), false); + oled_write(get_u8_str(logged_col, '0'), false); + oled_write_P(PSTR(", "), false); + oled_write(get_u16_str(logged_keycode, ' '), false); + oled_write_P(PSTR(" : "), false); + oled_write((const char *)&logged_char, false); +} + +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +#ifndef RGB_MATRIX_ENABLE +// frame 0, 128x32px +const char PROGMEM cat_frame_0 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0xc0, + 0x60, 0x60, 0x60, 0x60, 0x40, 0x40, 0xc0, 0xc0, 0xc0, 0x70, 0x38, 0x18, 0xec, 0x3c, 0x02, 0x02, + 0x7a, 0x7a, 0xf2, 0xf2, 0x06, 0x04, 0x04, 0x0c, 0x0e, 0x0a, 0x1f, 0xfd, 0xf9, 0x39, 0x0f, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0xff, 0xff, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfc, 0xff, 0x01, 0x08, 0x3c, 0x00, + 0x00, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x7e, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xf0, 0xff, 0xff, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x87, 0x83, 0xc0, 0x80, 0x88, + 0x1e, 0x1e, 0x0f, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0xc0, 0xe0, 0xfe, 0x87, 0xbe, 0xf0, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, + 0x12, 0x34, 0x34, 0x34, 0x34, 0x1e, 0x0e, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +// frame 1, 128x32px +const char PROGMEM cat_frame_1 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x60, 0x60, 0xe0, 0xf0, 0x90, + 0x18, 0x08, 0x08, 0x88, 0x88, 0x98, 0x10, 0x10, 0x30, 0x30, 0x70, 0xf8, 0x08, 0x88, 0xf8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0xff, 0xff, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0x04, 0x06, 0x07, 0x03, 0x01, + 0xc0, 0x00, 0x00, 0x87, 0x87, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0xf0, 0x00, + 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xff, 0xff, 0xc0, 0x80, + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x10, 0x30, 0xf0, 0xe0, 0x00, + 0x01, 0x00, 0x60, 0xf0, 0xf0, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0xc7, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x06, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x02, 0x02, 0x07, 0x07, 0x07, 0x04, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +// frame 2, 128x32px +const char PROGMEM cat_frame_2 [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0x60, 0x30, + 0x38, 0x18, 0x18, 0x18, 0x18, 0x30, 0x30, 0x30, 0x78, 0x48, 0x78, 0xc0, 0x80, 0xc0, 0x40, 0x40, + 0x40, 0x40, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0xf0, 0x80, 0x80, 0x60, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x3c, + 0x7c, 0x38, 0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x06, 0x3c, 0xff, 0xc3, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xff, 0xff, 0xf0, 0x80, 0x00, + 0x00, 0x80, 0x80, 0x80, 0x00, 0x01, 0x00, 0x1e, 0x7f, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, + 0x8c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x01, 0x00, 0x01, 0x01, 0x0f, 0x18, 0x10, 0x18, 0x0f, 0x0e, 0x18, 0x10, 0x30, 0x27, 0x2f, + 0x2f, 0x27, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x3c, 0x2d, 0x27, 0x3c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +const char* cat_frames[3] = { + cat_frame_0, + cat_frame_1, + cat_frame_2 +}; + +#define FRAME_SIZE 528 + +static int current_frame = 0; +static uint32_t frame_timer = 0; +static uint32_t anim_sleep = 0; +static uint8_t anim_speed = 120; + +#endif + +void oled_render_logo(void) { +#ifdef RGB_MATRIX_ENABLE + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +#endif +#ifndef RGB_MATRIX_ENABLE + if(get_current_wpm() != 000) { + oled_on(); + int8_t wpm_speed = (int8_t)(get_current_wpm() / 2); + if(wpm_speed < 100) + { + anim_speed = 120 - wpm_speed; + } + if(timer_elapsed32(frame_timer) > anim_speed) { + frame_timer = timer_read32(); // resets timer + current_frame = (current_frame + 1) % 3; + } + oled_write_raw_P(cat_frames[current_frame], FRAME_SIZE); + anim_sleep = timer_read32(); + } else { + anim_speed = 150; + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(frame_timer) > anim_speed) { + frame_timer = timer_read32(); // resets timer + current_frame = (current_frame + 1) % 3; + } + oled_write_raw_P(cat_frames[current_frame], FRAME_SIZE); + } + } +#endif +} + +bool oled_task_user(void) { + if (is_keyboard_master()) { + oled_render_layer_state(); + oled_render_keylog(); + } else { + oled_render_logo(); + } + return false; +} + +#endif // OLED_ENABLE + +// saRcASm MOde +bool tog_sarcasm = false; +bool uppercase = false; +uint8_t prev_upper = 0; +uint8_t prev_lower = 0; +uint8_t prev_mode = 0; +HSV prev_hsv; + + +bool process_record_sarcasm(uint16_t keycode, keyrecord_t *record) { + if (keycode == KC_ENTER && record->event.pressed) { + uppercase = false; + return true; + } + + if (uppercase == false && record->event.pressed) { // Dont start with an uppercase letter on new line + uppercase = true; + return true; + } + + if((KC_A <= keycode) && (keycode <= KC_Z)) { + if ( record->event.pressed ) { + bool press = rand() % 2; + + if (prev_upper > 2) { // if more than 3 lower's in a row print upper + prev_upper = 0; + press = false; + } else if (prev_lower > 2) { // if more than 3 upper's in a row print lower + prev_lower = 0; + press = true; + } + if (press) { + prev_upper++; + tap_code16(S(keycode)); + clear_mods(); + } else { + prev_lower++; + tap_code16(keycode); + } + } + return false; + } + + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + +#ifdef OLED_ENABLE + if (record->event.pressed) { + set_keylog(keycode, record); + } +#endif + + switch (keycode) { + case KC_SCASM: + if (record->event.pressed) { + tog_sarcasm = !tog_sarcasm; + + if (tog_sarcasm) { + dprint("Enabling saRCaSm ModE\n"); + + #ifdef RGB_MATRIX_ENABLE + prev_hsv = rgb_matrix_get_hsv(); + prev_mode = rgb_matrix_get_mode(); + rgb_matrix_mode_noeeprom(RGB_MATRIX_ALPHAS_MODS); + rgb_matrix_sethsv_noeeprom(HSV_YELLOW); + #endif + } + else { + dprint("Disabling saRCaSm ModE\n"); + #ifdef RGB_MATRIX_ENABLE + rgb_matrix_mode_noeeprom(prev_mode); + rgb_matrix_sethsv_noeeprom(prev_hsv.h, prev_hsv.s, prev_hsv.v); + #endif + } + + uppercase = false; + prev_upper = 0; + prev_lower = 0; + } + return false; + } + + if (tog_sarcasm) { + return process_record_sarcasm(keycode, record); + } + + return true; +} diff --git a/keyboards/crkbd/keymaps/jpe230/readme.md b/keyboards/crkbd/keymaps/jpe230/readme.md new file mode 100644 index 0000000000..31bbc4ebd1 --- /dev/null +++ b/keyboards/crkbd/keymaps/jpe230/readme.md @@ -0,0 +1,15 @@ +# Jpe230's CRKBD Layout + +## Layers +The four layers: +- BASE Layer: QWERTY +- LOWER Layer: Numbers + Arrows +- RAISE Layer: Symbols +- ADJUST Layer: Numpad + Media Keys + Fn keys + +## OLED +-Master: Renders layer state + keylog +-Slave : Renders an animation of a cat that varies its animation speed based on the current WPM + +## Flashing +Flash using `qmk compile -kb crkbd -km jpe230` for Pro Micro diff --git a/keyboards/crkbd/keymaps/jpe230/rules.mk b/keyboards/crkbd/keymaps/jpe230/rules.mk new file mode 100644 index 0000000000..82d5eb321d --- /dev/null +++ b/keyboards/crkbd/keymaps/jpe230/rules.mk @@ -0,0 +1,12 @@ +# Shared rules for both of my Corne +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +LTO_ENABLE = yes +VIA_ENABLE = yes + +# Rules for my Corne without RGB +# WPM_ENABLE = yes +# MOUSEKEY_ENABLE = yes + +# Rules for my Corne with RGB +RGB_MATRIX_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index 752ea862e0..e44ae520f4 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -68,48 +68,48 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - #define DISABLE_RGB_MATRIX_ALPHAS_MODS - #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL - #define DISABLE_RGB_MATRIX_BAND_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL - #define DISABLE_RGB_MATRIX_BAND_VAL - #define DISABLE_RGB_MATRIX_CYCLE_ALL - #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH #endif // Custom Font path #define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 7cb08f40d5..219db22433 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -172,7 +172,7 @@ void render_slave_oled(void) { } // {OLED Task} -----------------------------------------------// -void oled_task_user(void) { +bool oled_task_user(void) { // First time out switches to logo as first indication of iddle. if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) { // Render logo on both halves before full timeout @@ -209,5 +209,6 @@ void oled_task_user(void) { } } } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/mb_via/config.h b/keyboards/crkbd/keymaps/mb_via/config.h new file mode 100644 index 0000000000..cdc04f6908 --- /dev/null +++ b/keyboards/crkbd/keymaps/mb_via/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2021 Elliot Powell <@e11i0t23> + +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 + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/crkbd/keymaps/mb_via/keymap.c b/keyboards/crkbd/keymaps/mb_via/keymap.c new file mode 100644 index 0000000000..b7fbc1c290 --- /dev/null +++ b/keyboards/crkbd/keymaps/mb_via/keymap.c @@ -0,0 +1,71 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2021 Elliot Powell <@e11i0t23> + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, FN_MO13, KC_SPC, KC_ENT, FN_MO23, KC_RALT + //`--------------------------' `--------------------------' + + ), + + [1] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [2] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [3] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ) +}; diff --git a/keyboards/crkbd/keymaps/mb_via/readme.md b/keyboards/crkbd/keymaps/mb_via/readme.md new file mode 100644 index 0000000000..048927073b --- /dev/null +++ b/keyboards/crkbd/keymaps/mb_via/readme.md @@ -0,0 +1,12 @@ +# Default Via keyboard for the Corne R2G by Mechboards UK + +![r2g](https://cdn.shopify.com/s/files/1/0582/0242/3501/products/HelidoxCorneR2GPCB_1800x1800.png) + +Corne R2G is an eddition of the classic CRKBD by footsan remade to feature a full smd assembly + +In this fold can be found the default via enabled keymap that can be in conjunction + +Flash example for this Keymap: +```sh +qmk flash -kb crkbd/r2g -km mb_via +``` diff --git a/keyboards/crkbd/keymaps/mb_via/rules.mk b/keyboards/crkbd/keymaps/mb_via/rules.mk new file mode 100644 index 0000000000..cda04c7ce7 --- /dev/null +++ b/keyboards/crkbd/keymaps/mb_via/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no # Mouse keys +VIA_ENABLE = yes # Enable VIA + diff --git a/keyboards/crkbd/keymaps/mcrown/config.h b/keyboards/crkbd/keymaps/mcrown/config.h index e40bd639f3..15a1f20954 100644 --- a/keyboards/crkbd/keymaps/mcrown/config.h +++ b/keyboards/crkbd/keymaps/mcrown/config.h @@ -36,50 +36,50 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS /* BEGIN: Disable RGB Effects */ -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -// #define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -// #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +// #undef ENABLE_RGB_MATRIX_BAND_SAT +// #undef ENABLE_RGB_MATRIX_BAND_VAL +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - /* BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - /* END: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ +/* BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +/* END: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ - /* BEGIN: RGB_MATRIX_KEYPRESSES */ -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - /* END: RGB_MATRIX_KEYPRESSES */ - /* END: Disable RGB Effects */ +/* BEGIN: RGB_MATRIX_KEYPRESSES */ +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +// #undef ENABLE_RGB_MATRIX_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +/* END: RGB_MATRIX_KEYPRESSES */ +/* END: Disable RGB Effects */ #endif /* To tell the compiler to use custom font */ diff --git a/keyboards/crkbd/keymaps/mcrown/oled.c b/keyboards/crkbd/keymaps/mcrown/oled.c index b728a5806e..9623b921a7 100644 --- a/keyboards/crkbd/keymaps/mcrown/oled.c +++ b/keyboards/crkbd/keymaps/mcrown/oled.c @@ -308,7 +308,7 @@ static void render_logo(void){ * @param void. * @return void. */ -void oled_task_user(void){ +bool oled_task_user(void){ if (timer_elapsed32(standby_oled_timer) > 15000){ oled_off(); }else{ @@ -321,6 +321,7 @@ void oled_task_user(void){ oled_scroll_left(); } } + return false; } /** @brief process the current key and add it to the keylog string. diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h index d5b9a86985..0c0819130f 100644 --- a/keyboards/crkbd/keymaps/ninjonas/config.h +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -37,51 +37,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS - // BEGIN: Disable RGB Effects - //#define DISABLE_RGB_MATRIX_SOLID_COLOR - //#define DISABLE_RGB_MATRIX_ALPHAS_MODS - //#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_BAND_SAT - #define DISABLE_RGB_MATRIX_BAND_VAL - // #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL - #define DISABLE_RGB_MATRIX_CYCLE_ALL - #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// BEGIN: Disable RGB Effects +//#undef ENABLE_RGB_MATRIX_SOLID_COLOR +//#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +//#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - // BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS - #define DISABLE_RGB_MATRIX_TYPING_HEATMAP - // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - // END: RGB_MATRIX_FRAMEBUFFER_EFFECTS +// BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +// END: RGB_MATRIX_FRAMEBUFFER_EFFECTS - // BEGIN: RGB_MATRIX_KEYPRESSES - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - // END: RGB_MATRIX_KEYPRESSES - // END: Disable RGB Effects +// BEGIN: RGB_MATRIX_KEYPRESSES +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +// END: RGB_MATRIX_KEYPRESSES +// END: Disable RGB Effects #endif #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c index 14b4535855..9daae9607d 100644 --- a/keyboards/crkbd/keymaps/oled_sample/keymap.c +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -190,13 +190,14 @@ void render_status_main(void) { render_keylogger_status(); } -void oled_task_user(void) { +bool oled_task_user(void) { update_log(); if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_crkbd_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/oo/keymap.c b/keyboards/crkbd/keymaps/oo/keymap.c index c0416d9726..bcc296c8b6 100644 --- a/keyboards/crkbd/keymaps/oo/keymap.c +++ b/keyboards/crkbd/keymaps/oo/keymap.c @@ -148,13 +148,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/pdl/config.h b/keyboards/crkbd/keymaps/pdl/config.h new file mode 100644 index 0000000000..b25d48de02 --- /dev/null +++ b/keyboards/crkbd/keymaps/pdl/config.h @@ -0,0 +1,30 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert +Copyright 2021 Daniel Perrett + +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 TAPPING_TOGGLE 2 +#define TAPPING_TERM 200 + +#define COMBO_PDL +#define COMBO_COUNT 28 +#define COMBO_TERM 100 diff --git a/keyboards/crkbd/keymaps/pdl/keymap.c b/keyboards/crkbd/keymaps/pdl/keymap.c new file mode 100644 index 0000000000..1060a92650 --- /dev/null +++ b/keyboards/crkbd/keymaps/pdl/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2022 Daniel Perrett + * + * 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 "pdl.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_wrapper( + MY_FESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, + KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, MY_SQUO, + MY_SBSL, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, MY_CENT, + KC_LCTL, NAVIGN, KC_SPC, MY_SSPC, NUMBRS, NAVIGN + ), + [_PROXIM] = LAYOUT_wrapper( + MY_FESC, _________________PROXIM_L1_________________, _________________PROXIM_R1_________________, KC_BSPC, + KC_TAB, _________________PROXIM_L2_________________, _________________PROXIM_R2_________________, MY_ASCL, + MY_SBSL, _________________PROXIM_L3_________________, _________________PROXIM_R3_________________, MY_CENT, + KC_LCTL, NAVIGN, KC_SPC, MY_SSPC, NUMBRS, NAVIGN + ), + [_NAVIGN] = LAYOUT_wrapper( + _______, _________________NAVIGN_L1_________________, _______, _______, _______, _______, _______, _______, + _______, _________________NAVIGN_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _________________NAVIGN_L3_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_PUNCTN] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, _______, _________________PUNCTN_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________PUNCTN_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _________________PUNCTN_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + [_NUMBRS] = LAYOUT_wrapper( + _______, _________________NUMBRS_L1_________________, _______, _______, _______, _______, _______, _______, + _______, _________________NUMBRS_L2_________________, _______, _______, _______, _______, _______, _______, + _______, _________________NUMBRS_L3_________________, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_CODING] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, _______, _________________CODING_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________CODING_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _________________CODING_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FUNCTN] = LAYOUT_wrapper( + _______, _________________FUNCTN_L1_________________, _________________FUNCTN_R1_________________, MY_CAD, + _______, _________________FUNCTN_L2_________________, _________________FUNCTN_R2_________________, KC_PSCR, + _______, _________________FUNCTN_L3_________________, _________________FUNCTN_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/crkbd/keymaps/rarick/keymap.c b/keyboards/crkbd/keymaps/rarick/keymap.c index b11bac1e72..adf9555421 100644 --- a/keyboards/crkbd/keymaps/rarick/keymap.c +++ b/keyboards/crkbd/keymaps/rarick/keymap.c @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c index 7ca234a0ee..a753b2b872 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c +++ b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c @@ -204,13 +204,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rmeli/config.h b/keyboards/crkbd/keymaps/rmeli/config.h new file mode 100644 index 0000000000..36fb755d00 --- /dev/null +++ b/keyboards/crkbd/keymaps/rmeli/config.h @@ -0,0 +1,80 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert +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/>. +*/ + +#pragma once + +#define MASTER_LEFT // Left side is the master +#define SPLIT_LED_STATE_ENABLE + +#define TAPPING_TERM 200 + +#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX + +#define AUTO_SHIFT_REPEAT + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_LIMIT_VAL 120 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +#endif + +#ifdef RGB_MATRIX_ENABLE +// RGB matrix options +# define RGB_MATRIX_KEYPRESSES // enable keypress effects +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 +# define RGB_DISABLE_WHEN_USB_SUSPENDED +// Disable unwanted R2G effects (from r2g/config.h) +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_HUE_BREATHING +# undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +//# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// Enable effects +# define ENABLE_RGB_MATRIX_SOLID_COLOR +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// Default effect +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +# define RGB_MATRIX_STARTUP_HUE 10 +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +// https://github.com/qmk/qmk_firmware/blob/develop/docs/squeezing_avr.md +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE +#define NO_MUSIC_MODE +#define LAYER_STATE_8BIT // Limit to 8 layers diff --git a/keyboards/crkbd/keymaps/rmeli/keymap.c b/keyboards/crkbd/keymaps/rmeli/keymap.c new file mode 100644 index 0000000000..f7901d1cfd --- /dev/null +++ b/keyboards/crkbd/keymaps/rmeli/keymap.c @@ -0,0 +1,131 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_split_3x6_3( + //|-----------------------------------------------------| |-----------------------------------------------------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + TD_ED, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + TD_LSPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD_RSPC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI,MO(_DWN), KC_SPC, KC_ENT,MO(_UP), KC_RCTL + //|--------------------------| |--------------------------| + ), + + [_COLEMAK_DH] = LAYOUT_split_3x6_3( + //|-----------------------------------------------------| |-----------------------------------------------------| + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_SCLN, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + TD_ED, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + TD_LSPC, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, TD_RSPC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI,MO(_DWN), KC_SPC, KC_ENT,MO(_UP), KC_RCTL + //|--------------------------| |--------------------------| + ), + + [_DWN] = LAYOUT_split_3x6_3( + //|-----------------------------------------------------| |-----------------------------------------------------| + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, A_GRV, E_GRV, I_GRV, O_GRV, U_GRV, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, A_UML, E_ACT, I_CIR, O_UML, U_UML, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, KC_PGDN, _______, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, _______, _______,MO(_CFG), _______ + //|--------------------------| |--------------------------| + ), + + [_UP] = LAYOUT_split_3x6_3( + //|-----------------------------------------------------| |-----------------------------------------------------| + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______,MO(_CFG), _______, _______, _______, _______ + //|--------------------------| |--------------------------| + ), + + [_CONFIG] = LAYOUT_split_3x6_3( + //|-----------------------------------------------------| |-----------------------------------------------------| + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, UC_MOD, KC_ASUP, NK_ON, XXXXXXX, XXXXXXX,DF(_QWY), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, XXXXXXX, KC_ASTG, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX,RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, UC_RMOD, KC_ASDN, NK_OFF, XXXXXXX, XXXXXXX,DF(_CMK), + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //|--------------------------| |--------------------------| + ) +};
\ No newline at end of file diff --git a/keyboards/crkbd/keymaps/rmeli/rules.mk b/keyboards/crkbd/keymaps/rmeli/rules.mk new file mode 100644 index 0000000000..8e9dbbf8cf --- /dev/null +++ b/keyboards/crkbd/keymaps/rmeli/rules.mk @@ -0,0 +1,12 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 + +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes + +UNICODEMAP_ENABLE = yes + +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = yes + +NKRO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 3c5222eda8..3300684d63 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -50,50 +50,50 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_VAL_STEP 10 # define RGB_MATRIX_SPD_STEP 10 -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL - -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// # undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN # define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_ANIMATION_SPEED_DEFAULT UINT8_MAX / 2 # define RGB_MATRIX_ANIMATION_SPEED_SLOW RGB_MATRIX_ANIMATION_SPEED_DEFAULT / 4 diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c index d632e255d5..a098c73d2c 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/keymap.c +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -290,7 +290,7 @@ void render_status(void) { # endif } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > OLED_TIMEOUT) { oled_off(); return; @@ -310,6 +310,7 @@ void oled_task_user(void) { } #endif } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/rpbaptist/readme.md b/keyboards/crkbd/keymaps/rpbaptist/readme.md index b9e749b5c6..9525cf7cfe 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/readme.md +++ b/keyboards/crkbd/keymaps/rpbaptist/readme.md @@ -51,7 +51,7 @@ This is the gaming extended layer where movement keys remain the same. This mean I took a big inspiration from Drashna's RGB configuration and tweaked it. - `RGB_UND`: Toggles underglow indicators on and off. Each layer has its own color. -- `RGB_IDL`: This will enable/disable idle mode. By default, when typing, the `DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` will be used. When the idle timeout has exceeded the secondary animation will be activated, which is `RGB_MATRIX_CYCLE_ALL` by default. When switching to `GAMING` layer the timeout will be reduced and the idle animation changed to `RGB_MATRIX_RAINBOW_PINWHEELS`. +- `RGB_IDL`: This will enable/disable idle mode. By default, when typing, the `ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` will be used. When the idle timeout has exceeded the secondary animation will be activated, which is `RGB_MATRIX_CYCLE_ALL` by default. When switching to `GAMING` layer the timeout will be reduced and the idle animation changed to `RGB_MATRIX_RAINBOW_PINWHEELS`. When idle mode is enabled, `RGB_MATRIX_TYPING_HEATMAP` and `RGB_MATRIX_MULTISPLASH` will be used for active animation. All others for idle animation. When disabling idle mode, the current idle animation will be activated. Additionally, on idling, the underglow layer indication will be deactivated. - There are no RGB mode cycle keys, but instead several keys to use a specific RGB directly. Each has their own default speed, although this can be changed. diff --git a/keyboards/crkbd/keymaps/snowe/config.h b/keyboards/crkbd/keymaps/snowe/config.h index b624b589bc..575e39892d 100644 --- a/keyboards/crkbd/keymaps/snowe/config.h +++ b/keyboards/crkbd/keymaps/snowe/config.h @@ -52,4 +52,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define IGNORE_MOD_TAP_INTERRUPT //#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY -#define LAYER_STATE_8BIT
\ No newline at end of file +#define LAYER_STATE_8BIT +#define SPLIT_WPM_ENABLE diff --git a/keyboards/crkbd/keymaps/snowe/keymap.c b/keyboards/crkbd/keymaps/snowe/keymap.c index 4dfd6ecbeb..f5972d62db 100644 --- a/keyboards/crkbd/keymaps/snowe/keymap.c +++ b/keyboards/crkbd/keymaps/snowe/keymap.c @@ -57,6 +57,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ) // clang-format on #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) +// clang-format off +#define LAYOUT_crkbd_no_hold_shortcuts( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + GUI_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + KC_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_BSLS, \ + KC_LCTL, LOWER, KC_BSPC, KC_ENTER, SP_RAIS, KC_LALT \ + ) +// clang-format on +#define LAYOUT_crkbd_no_hold_shortcuts_wrapper(...) LAYOUT_crkbd_no_hold_shortcuts(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format off @@ -77,6 +91,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), + [_GAMING] = LAYOUT_crkbd_no_hold_shortcuts_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), /* Lower * ,-----------------------------------------------. .-----------------------------------------------. diff --git a/keyboards/crkbd/keymaps/snowe/rules.mk b/keyboards/crkbd/keymaps/snowe/rules.mk index ce3b5928fa..96ae4bbf95 100644 --- a/keyboards/crkbd/keymaps/snowe/rules.mk +++ b/keyboards/crkbd/keymaps/snowe/rules.mk @@ -21,6 +21,6 @@ OCEAN_DREAM_ENABLE = yes LUNA_ENABLE = no # disabled so travis build succeeds # if firmware size over limit, try this option -CFLAGS += -flto +LTO_ENABLE = yes WPM_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 8235b48697..3a31f8613f 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -51,9 +51,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_VAL_STEP 17 #endif -#define OLED_FONT_H "keyboards/crkbd/keymaps/soundmonster/glcdfont.c" -// #define OLED_FONT_WIDTH 5 -// #define OLED_FONT_HEIGHT 7 + +#ifdef OLED_ENABLE +# define SPLIT_LAYER_STATE_ENABLE +# define SPLIT_LED_STATE_ENABLE +# define SPLIT_MODS_ENABLE +# define SPLIT_OLED_ENABLE +# define OLED_FONT_H "keyboards/crkbd/keymaps/soundmonster/glcdfont.c" +# define OLED_TIMEOUT 30000 +#endif #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses @@ -71,40 +77,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c index 67cfa78f92..70fe50e967 100644 --- a/keyboards/crkbd/keymaps/soundmonster/keymap.c +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2022 Soundmonster (@soundmonster) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -7,10 +10,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -#ifdef OLED_ENABLE -static uint32_t oled_timer = 0; -#endif - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -278,52 +277,19 @@ void render_layer_state(void) { } } -void render_status_main(void) { - render_logo(); - render_space(); - render_layer_state(); - render_space(); - render_mod_status_gui_alt(get_mods()|get_oneshot_mods()); - render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); -} - -void render_status_secondary(void) { +bool oled_task_user(void) { + // Renders the current keyboard state (layers and mods) render_logo(); render_space(); render_layer_state(); render_space(); render_mod_status_gui_alt(get_mods()|get_oneshot_mods()); render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); -} - -void suspend_power_down_user() { - oled_off(); -} - -void oled_task_user(void) { - if (timer_elapsed32(oled_timer) > 30000) { - oled_off(); - return; - } -#ifndef SPLIT_KEYBOARD - else { oled_on(); } -#endif - - if (is_keyboard_master()) { - render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_status_secondary(); - } + return false; } #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { -#ifdef OLED_ENABLE - oled_timer = timer_read32(); -#endif - // set_timelog(); - } static uint16_t my_colon_timer; switch (keycode) { diff --git a/keyboards/crkbd/keymaps/soundmonster/rules.mk b/keyboards/crkbd/keymaps/soundmonster/rules.mk index 62971258e9..d3a964424f 100644 --- a/keyboards/crkbd/keymaps/soundmonster/rules.mk +++ b/keyboards/crkbd/keymaps/soundmonster/rules.mk @@ -2,6 +2,7 @@ RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no NKRO_ENABLE = yes -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/sulrich/keymap.c b/keyboards/crkbd/keymaps/sulrich/keymap.c index f1cd60c526..84668b53c8 100644 --- a/keyboards/crkbd/keymaps/sulrich/keymap.c +++ b/keyboards/crkbd/keymaps/sulrich/keymap.c @@ -137,13 +137,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -153,4 +154,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } #endif // OLED_ENABLE - diff --git a/keyboards/crkbd/keymaps/toinux/config.h b/keyboards/crkbd/keymaps/toinux/config.h new file mode 100644 index 0000000000..e7a18800d8 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/config.h @@ -0,0 +1,122 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +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 USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +//#define TAPPING_FORCE_HOLD +//#define TAPPING_TERM 100 + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_EFFECT_BREATHING + // #define RGBLIGHT_EFFECT_RAINBOW_MOOD + // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_TWINKLE + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Enable the animations you want/need. You may need to enable only a small number of these because * + * they take up a lot of space. Enable and confirm that you can still successfully compile your firmware. */ +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +// # define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// # define ENABLE_RGB_MATRIX_CYCLE_ALL +// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// # define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define ENABLE_RGB_MATRIX_RAINDROPS +// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// # define ENABLE_RGB_MATRIX_PIXEL_FLOW +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif + +#define OLED_FONT_H "keyboards/crkbd/keymaps/toinux/glcdfont.c" + +#define SPLIT_LAYER_STATE_ENABLE +// #define SPLIT_LED_STATE_ENABLE + +#define LAYER_STATE_16BIT diff --git a/keyboards/crkbd/keymaps/toinux/glcdfont.c b/keyboards/crkbd/keymaps/toinux/glcdfont.c new file mode 100644 index 0000000000..74cce5a952 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/glcdfont.c @@ -0,0 +1,232 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#include "progmem.h" + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x24, 0x7E, 0x24, 0x24, 0x7E, 0x24, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0xD4, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x28, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x50, 0x50, 0x50, 0x3C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x83, 0xC3, 0xC3, 0xC3, 0x9B, 0x03, + 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x32, 0x32, 0x32, 0x32, 0x32, + 0x32, 0xE6, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0xFE, + 0xFF, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, + 0x80, 0x80, 0x80, 0x80, 0x9E, 0x81, + 0x80, 0x9E, 0x80, 0x80, 0x80, 0x80, + 0xFF, 0xEF, 0xD7, 0x0F, 0xDF, 0xDF, + 0xDF, 0xDF, 0x0F, 0xD7, 0xEF, 0xFF, + 0x01, 0x11, 0x29, 0xF1, 0x21, 0x21, + 0x21, 0x21, 0xF1, 0x29, 0x11, 0x01, + 0x00, 0x00, 0x00, 0xFC, 0xFE, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xEF, + 0xDF, 0xBF, 0x7F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFC, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFC, 0x02, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x09, 0x11, + 0x21, 0x41, 0x81, 0x01, 0x01, 0x01, + 0x01, 0x02, 0xFC, 0x00, 0x00, 0x00, + 0x3E, 0xFF, 0xF8, 0xF8, 0xFF, 0x3E, + 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, + 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x63, + 0x07, 0x7F, 0x7F, 0x07, 0x7F, 0x7F, + 0x08, 0x08, 0x7F, 0x3E, 0x1C, 0x08, + 0x08, 0x1C, 0x3E, 0x7F, 0x08, 0x08, + 0x63, 0x7F, 0x7F, 0x63, 0x7F, 0x3E, + 0x1F, 0x3F, 0x63, 0x63, 0x3F, 0x1F, + 0x73, 0x3B, 0x1F, 0x1F, 0x3B, 0x73, + 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x8F, 0x8C, 0x0C, 0x0C, 0x0F, 0x0C, + 0x8C, 0xAC, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x83, 0x82, 0x82, 0x9E, 0x88, + 0x84, 0x82, 0x81, 0x80, 0x80, 0x80, + 0xFF, 0xEF, 0xD7, 0xE0, 0xF7, 0xF7, + 0xF7, 0xF7, 0xE0, 0xD7, 0xEF, 0xFF, + 0x00, 0x10, 0x28, 0x1F, 0x08, 0x08, + 0x08, 0x08, 0x1F, 0x28, 0x10, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xEF, + 0xF7, 0xFB, 0xFD, 0xFE, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, + 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0xFF, 0xFF, 0xBD, 0x81, 0x81, 0x00, + 0x63, 0x7F, 0x7F, 0x63, 0x7F, 0x3E, + 0x3E, 0x7F, 0x77, 0x77, 0x77, 0x77, + 0x08, 0x08, 0x7F, 0x3E, 0x1C, 0x08, + 0x08, 0x1C, 0x3E, 0x7F, 0x08, 0x08, + 0x7F, 0x7F, 0x03, 0x03, 0x7F, 0x7F, + 0x1C, 0x1C, 0x1C, 0x1C, 0x7F, 0x7F, + 0x03, 0x7F, 0x7F, 0x63, 0x7F, 0x1F, + 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xD9, 0x99, 0x9B, 0x9E, 0x9E, 0x9B, + 0x99, 0xD9, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFC, 0xFD, 0xFD, 0xE1, 0xF7, + 0xFB, 0xFD, 0xFE, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x7F, 0xBF, 0xDF, 0xE1, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x40, 0x3C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3F, 0x7F, 0xFF, + 0xFF, 0x1F, 0xDF, 0xDF, 0xC3, 0xF7, + 0xEF, 0xDF, 0xBF, 0x7F, 0xFF, 0xFF, + 0xFF, 0x7F, 0x3F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3F, 0x40, 0x80, + 0x00, 0xE0, 0x20, 0x20, 0x3C, 0x08, + 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, + 0x80, 0x40, 0x3F, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0xE3, 0xE3, 0x7F, 0x00, + 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x07, + 0x1C, 0x3E, 0x77, 0x63, 0x63, 0x63, + 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x63, + 0x08, 0x08, 0x7F, 0x3E, 0x1C, 0x08, + 0x08, 0x1C, 0x3E, 0x7F, 0x08, 0x08, + 0x7F, 0x7F, 0x03, 0x03, 0x7F, 0x7F, + 0x7F, 0x7F, 0x03, 0x03, 0x7F, 0x7F, + 0x3E, 0x7F, 0x63, 0x63, 0x63, 0x63, + 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/crkbd/keymaps/toinux/keycodes.h b/keyboards/crkbd/keymaps/toinux/keycodes.h new file mode 100644 index 0000000000..7d812f5c74 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/keycodes.h @@ -0,0 +1,49 @@ +/* Copyright 2022 toinux + * + * 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 + +enum crkbd_layers { + _BASE, + _GAMING, + _GAMING2, + _ACCENTS, + _LOWER, + _RAISE, + _FUN, + _NAV, + _MOUSE, + _ADJUST +}; + +#define CTRLSC LCTL_T(KC_ESC) +#define QUORCTL RCTL_T(KC_QUOT) +#define MOSCLN LT(_MOUSE,KC_SCLN) +#define ACCENTS LT(_ACCENTS,KC_RALT) +#define FUN LT(_FUN,KC_SPC) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPCNAV LT(_NAV,KC_SPC) +#define SFTENT MT(MOD_RSFT,KC_ENT) +#define TABLGUI LGUI_T(KC_TAB) +#define BASE DF(_BASE) +#define GAMING DF(_GAMING) +#define GAMING2 MO(_GAMING2) + +#define SC_F1 LSFT(LCTL(KC_F1)) +#define SC_F2 LSFT(LCTL(KC_F2)) +#define SC_F3 LSFT(LCTL(KC_F3)) +#define SC_F4 LSFT(LCTL(KC_F4)) diff --git a/keyboards/crkbd/keymaps/toinux/keymap.c b/keyboards/crkbd/keymaps/toinux/keymap.c new file mode 100644 index 0000000000..ae3de00b79 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/keymap.c @@ -0,0 +1,250 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2022 @toinux + +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 "users/toinux/keymap_qwerty_fr.h" +#include "keycodes.h" + +#ifdef OLED_ENABLE +#include "oled.h" +#endif + +// TEMPLATE +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | | | | | | | | | | | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | | | | | | | | | | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | | | | | | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Base +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// |Tab/LGui| Q | W | E | R | T | | Y | U | I | O | P | Bksp | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | CtrlSc | A | S | D | F | G | | H | J | K | L | ;/Mous | '/Rctl | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | Shift | Z | X | C | V | B | | N | M | , | . | / | SftEnT | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | LALT | LOWER |Spc/FUN | | Spc/NAV| RAISE |ACCENTS | +// `--------------------------' `--------------------------' + [_BASE] = LAYOUT_split_3x6_3( + TABLGUI, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTRLSC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MOSCLN, QUORCTL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFTENT, + KC_LALT, LOWER, FUN, SPCNAV, RAISE, ACCENTS + + ), + +// Gaming +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | Esc | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | Ctrl | A | S | D | F | G | | H | J | K | L | ;/Mous | ' | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | Shift | Z | X | C | V | B | | N | M | , | . | / | SftEnT | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | LALT |GAMING2 | Space | | Spc/NAV| RAISE |ACCENTS | +// `--------------------------' `--------------------------' + [_GAMING] = LAYOUT_split_3x6_3( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MOSCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFTENT, + KC_LALT, GAMING2, KC_SPC, SPCNAV, RAISE, ACCENTS + + ), + +// Gaming 2 +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | Tab | 1 | 2 | 3 | 4 | 5 | | | | | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | Ctrl | 6 | 7 | 8 | 9 | 0 | | | | | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | LGui | Base | | Vol- | Vol+ | Mute | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_GAMING2] = LAYOUT_split_3x6_3( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LGUI, BASE, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______ + + ), + +// Accents, see http://marin.jb.free.fr/qwerty-fr/ +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | | â | é | è | ê | € | | û | ù | î | ô | œ | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | à | æ | ë | | « | | » | ü | ï | ö | ° | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | à | | ç | | | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_ACCENTS] = LAYOUT_split_3x6_3( + _______, QF_ACIR, QF_EACU, QF_EGRV, QF_ECIR, QF_EURO, QF_UCIR, QF_UGRV, QF_ICIR, QF_OCIR, QF_OE, _______, + _______, QF_AGRV, QF_AE, QF_EDIA, _______, QF_LDAQ, QF_RDAQ, QF_UDIA, QF_IDIA, QF_ODIA, QF_DEG, _______, + _______, QF_AGRV, _______, QF_CCED, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + + ), + +// Lower +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | SC_F1 | SC_F2 | SC_F3 | SC_F4 | | | | _ | + | { | } | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | Gaming | | Vol- | Vol+ | Mute | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_LOWER] = LAYOUT_split_3x6_3( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, SC_F1, SC_F2, SC_F3, SC_F4, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, GAMING, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + + ), + +// Raise +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | | | | | | | | - | = | [ | ] | \ | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | | | | | | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_RAISE] = LAYOUT_split_3x6_3( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + + ), + +// Functions and keypad +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | | F1 | F2 | F2 | F4 | | | | 7 | 8 | 9 | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | F5 | F6 | F7 | F8 | | | | 4 | 5 | 6 | - | / | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | F9 | F10 | F11 | F12 | | | | 1 | 2 | 3 | + | * | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | = | 0 | . | +// `--------------------------' `--------------------------' + [_FUN] = LAYOUT_split_3x6_3( + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, + _______, _______, _______, KC_PENT, KC_P0, KC_PDOT + + ), + +// Navigation and function keys +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | | F1 | F2 | F2 | F4 | | | | Pg Up | Up | Pg Dn | Ins | Del | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | F5 | F6 | F7 | F8 | | | Home | Left | Down | Right | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | F9 | F10 | F11 | F12 | | | Space | End | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_NAV] = LAYOUT_split_3x6_3( + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_DEL, + _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_SPC, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + + ), + +// Mouse +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | | | Wh up | Ms up | Wh dn | | | | | | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | | Ms lft | Ms dn | Ms rgt | | | | btn1 | btn3 | btn2 | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | | | Wh lft | | Wh rgt | | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_MOUSE] = LAYOUT_split_3x6_3( + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, + _______, _______, KC_WH_L, _______, KC_WH_R, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + + ), + +// Adjust +// ,-----------------------------------------------------. ,-----------------------------------------------------. +// | Reset | | | | | Print | | Num | Caps | Scroll | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | On/Off | Hue ↑ | Sat ↑ | Brght ↑| | | | | | | | | | +// |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| +// | Cycle | Hue ↓ | Sat ↓ | Brght ↓| | | | | | | | | | +// `--------+--------+--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------+--------+--------' +// | | | | | | | | +// `--------------------------' `--------------------------' + [_ADJUST] = LAYOUT_split_3x6_3( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_NLCK, KC_CAPS, KC_SCRL, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + +#ifdef OLED_ENABLE + if (record->event.pressed) { + set_keylog(keycode, record); + } +#endif // OLED_ENABLE + + switch (keycode) { + case FUN: + if (!host_keyboard_led_state().num_lock) { + tap_code(KC_NUMLOCK); + } + return true; + break; + } + return true; +} + +void keyboard_post_init_user(void) { +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); + rgb_matrix_sethsv_noeeprom(HSV_OFF); +#endif +} diff --git a/keyboards/crkbd/keymaps/toinux/oled.c b/keyboards/crkbd/keymaps/toinux/oled.c new file mode 100644 index 0000000000..df2a693d8d --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/oled.c @@ -0,0 +1,112 @@ +/* Copyright 2022 @toinux + * + * 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 "keycodes.h" +#include "oled.h" + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + + +void oled_render_mod_status(void) { + + const uint8_t modifiers = get_mods() | get_oneshot_mods(); + + for (uint8_t i = 0; i < 2; i++) { + oled_set_cursor(9,i); + oled_write_P(gui_icon[(modifiers & MOD_MASK_GUI) ? 1 : 0][i], false); + oled_write_P(ctrl_icon[(modifiers & MOD_MASK_CTRL) ? 1 : 0][i], false); + oled_set_cursor(9,i+2); + oled_write_P(alt_icon[(modifiers & MOD_MASK_ALT) ? 1 : 0][i], false); + oled_write_P(shift_icon[(modifiers & MOD_MASK_SHIFT) ? 1 : 0][i], false); + } + +} + +void oled_render_layer_state(void) { + + char c = 0x9F - get_highest_layer(layer_state|default_layer_state); + + oled_set_cursor(20,0); + oled_write_char(0X00, false); + + oled_set_cursor(20,1); + oled_write_char(c, false); + c += 32; + oled_set_cursor(20,2); + oled_write_char(c, false); + c += 32; + oled_set_cursor(20,3); + oled_write_char(c, false); + +} + +void oled_render_led_state(void) { + // oled_advance_page(false) instead of oled_write_ln_P to not break OLED_TIMEOUT + oled_write_P(PSTR("NUM"), host_keyboard_led_state().num_lock); + oled_advance_page(false); + oled_write_P(PSTR("CAP"), host_keyboard_led_state().caps_lock); + oled_advance_page(false); + oled_write_P(PSTR("SCL"), host_keyboard_led_state().scroll_lock); + oled_advance_page(false); +} + +uint8_t last_row = 0; +uint8_t last_col = 0; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + last_row = record->event.key.row; + last_col = record->event.key.col; +} + +void oled_render_keylog(void) { + oled_write_char(last_row + '0', false); + oled_write_char('x', false); + oled_write_char(last_col + '0', false); +} + +void oled_render_logo(void) { + static const char PROGMEM kpu_logo[][3] = { + {0x82, 0x83, 0}, + {0x80, 0x81, 0}, + {0xa0, 0xa1, 0}, + {0xc0, 0xc1, 0} + }; + for (uint8_t i = 0; i < 4; i++) { + oled_write_ln_P(kpu_logo[i], false); + } + +} + +bool oled_task_user(void) { + if (is_keyboard_master ()) { + oled_render_led_state(); + oled_render_keylog(); + oled_render_mod_status(); + oled_render_layer_state(); + } else { + oled_render_logo(); + oled_scroll_right(); + oled_scroll_set_speed(4); + } + return false; +} diff --git a/keyboards/crkbd/keymaps/toinux/oled.h b/keyboards/crkbd/keymaps/toinux/oled.h new file mode 100644 index 0000000000..30be16e602 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/oled.h @@ -0,0 +1,71 @@ +/* Copyright 2022 @toinux + * + * 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 + +static const char PROGMEM ctrl_icon[2][2][4] = { + { + // off + {0x93, 0x94, 0x95, 0}, + {0xB3, 0xB4, 0xB5, 0}, + }, + { + // on + {0x8F ,0x90, 0x91, 0}, + {0xAF ,0xB0, 0xB1, 0}, + } +}; + +static const char PROGMEM shift_icon[2][2][4] = { + { + // off + {0xD3, 0xD4, 0xB5, 0}, + {0xA8, 0xA9, 0xD5, 0}, + }, + { + // on + {0xCF ,0xD0, 0xB1, 0}, + {0xC8 ,0xC9, 0xD1, 0}, + } +}; + +static const char PROGMEM gui_icon[2][2][4] = { + { + // off + {0x92, 0x8C, 0x8D, 0}, + {0xB2, 0xAC, 0xAD, 0}, + }, + { + // on + {0x8E ,0x8A, 0x8B, 0}, + {0xAE ,0xAA, 0xAB, 0}, + } +}; + +static const char PROGMEM alt_icon[2][2][4] = { + { + // off + {0xB2, 0xCC, 0xCD, 0}, + {0xD2, 0x88, 0x89, 0}, + }, + { + // on + {0xAE ,0xCA, 0xCB, 0}, + {0xCE ,0x86, 0x87, 0}, + } +}; + +void set_keylog(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/crkbd/keymaps/toinux/rgb.c b/keyboards/crkbd/keymaps/toinux/rgb.c new file mode 100644 index 0000000000..2c5de3b0a7 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/rgb.c @@ -0,0 +1,68 @@ +/* Copyright 2022 @toinux + * + * 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 "keycodes.h" + +static const char gaming_leds[] = {18, 22, 19, 16}; +static const char gaming2_leds[] = {23, 18, 17, 10, 9, 22, 19, 16, 11, 8}; +static const char nav_leds[] = {38, 43, 44, 46}; +static const char fun_leds[] = {45, 44, 37, 46, 43, 38, 47, 42, 39, 40}; +static const char mouse_leds[] = {11, 16, 17, 19}; + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(26, RGB_RED); + } + switch(get_highest_layer(layer_state|default_layer_state)) { + case _GAMING: + if (is_keyboard_master()) { + for (uint8_t i = 0; i < 4; i++) { + rgb_matrix_set_color(gaming_leds[i], RGB_RED); + } + } + break; + case _GAMING2: + if (is_keyboard_master()) { + for (uint8_t i = 0; i < 10; i++) { + rgb_matrix_set_color(gaming2_leds[i], RGB_GREEN); + } + } + break; + case _NAV: + for (uint8_t i = 0; i < 4; i++) { + rgb_matrix_set_color(nav_leds[i], RGB_BLUE); + } + break; + case _FUN: + for (uint8_t i = 0; i < 10; i++) { + rgb_matrix_set_color(fun_leds[i], RGB_GREEN); + } + break; + case _ADJUST: + rgb_matrix_set_color(6, RGB_RED); + break; + case _MOUSE: + if (is_keyboard_master()) { + for (uint8_t i = 0; i < 4; i++) { + rgb_matrix_set_color(mouse_leds[i], RGB_PURPLE); + } + } + break; + + } +} diff --git a/keyboards/crkbd/keymaps/toinux/rules.mk b/keyboards/crkbd/keymaps/toinux/rules.mk new file mode 100644 index 0000000000..07c98a08f8 --- /dev/null +++ b/keyboards/crkbd/keymaps/toinux/rules.mk @@ -0,0 +1,9 @@ +MOUSEKEY_ENABLE = yes # Mouse keys +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +LTO_ENABLE = yes +BOOTLOADER = atmel-dfu + +SRC += ./oled.c ./rgb.c diff --git a/keyboards/crkbd/keymaps/vayashiko/keymap.c b/keyboards/crkbd/keymaps/vayashiko/keymap.c index a1a8f7e9f5..f3cf5cb2f6 100644 --- a/keyboards/crkbd/keymaps/vayashiko/keymap.c +++ b/keyboards/crkbd/keymaps/vayashiko/keymap.c @@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H -#include "keymap_jp.h" +#include "keymap_japanese.h" enum custom_layers { _QWERTY, @@ -164,13 +164,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/vayashiko/rules.mk b/keyboards/crkbd/keymaps/vayashiko/rules.mk index 16deaf45d1..b8ba838422 100644 --- a/keyboards/crkbd/keymaps/vayashiko/rules.mk +++ b/keyboards/crkbd/keymaps/vayashiko/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/crkbd/keymaps/via/config.h b/keyboards/crkbd/keymaps/via/config.h index fc8e7c4781..806b77d013 100644 --- a/keyboards/crkbd/keymaps/via/config.h +++ b/keyboards/crkbd/keymaps/via/config.h @@ -25,16 +25,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define EE_HANDS #ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLIGHT_ANIMATIONS -# define RGBLED_NUM 54 -# undef RGBLED_SPLIT -# define RGBLED_SPLIT \ - { 27, 27 } -# define RGBLIGHT_LIMIT_VAL 120 -# define RGBLIGHT_HUE_STEP 10 -# define RGBLIGHT_SAT_STEP 17 -# define RGBLIGHT_VAL_STEP 17 + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #define RGBLIGHT_EFFECT_TWINKLE + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 #endif #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/via/keymap.c b/keyboards/crkbd/keymaps/via/keymap.c index cbaeb93f6d..33ca8026f8 100644 --- a/keyboards/crkbd/keymaps/via/keymap.c +++ b/keyboards/crkbd/keymaps/via/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/via/rules.mk b/keyboards/crkbd/keymaps/via/rules.mk index 69841c2358..ee593dcbb7 100644 --- a/keyboards/crkbd/keymaps/via/rules.mk +++ b/keyboards/crkbd/keymaps/via/rules.mk @@ -1,6 +1,6 @@ -MOUSEKEY_ENABLE = no # Mouse keys -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -VIA_ENABLE = yes # Enable VIA -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -LTO_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +VIA_ENABLE = yes # Enable VIA +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk b/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk index bd53c19211..92ded45e93 100644 --- a/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk @@ -1,5 +1,6 @@ # Build Options POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. +POINTING_DEVICE_DRIVER = custom MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/crkbd/keymaps/xyverz/keymap.c b/keyboards/crkbd/keymaps/xyverz/keymap.c index d99d9d6baf..0b7fc0a0ac 100644 --- a/keyboards/crkbd/keymaps/xyverz/keymap.c +++ b/keyboards/crkbd/keymaps/xyverz/keymap.c @@ -187,13 +187,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/post_config.h b/keyboards/crkbd/post_config.h index 00034a163c..133014b02a 100644 --- a/keyboards/crkbd/post_config.h +++ b/keyboards/crkbd/post_config.h @@ -41,3 +41,9 @@ # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 # endif #endif + +#ifdef OLED_ENABLE + #ifndef OLED_FONT_H + #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" + #endif +#endif diff --git a/keyboards/crkbd/r2g/config.h b/keyboards/crkbd/r2g/config.h new file mode 100644 index 0000000000..e451612484 --- /dev/null +++ b/keyboards/crkbd/r2g/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2021 Elliot Powell @e11i0t23 + +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 USE_SERIAL +#define SOFT_SERIAL_PIN D2 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE + +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +# define RGBLIGHT_EFFECT_TWINKLE + +# define RGBLED_NUM 54 +# define RGBLED_SPLIT \ + { 27, 27 } +#endif + +#ifdef RGB_MATRIX_ENABLE +# define RGBLED_NUM 54 // Number of LEDs +# define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_SPLIT \ + { 27, 27 } +# define SPLIT_TRANSPORT_MIRROR + +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +#endif + +#define DIODE_DIRECTION COL2ROW + +#define SPLIT_USB_DETECT + diff --git a/keyboards/crkbd/r2g/r2g.c b/keyboards/crkbd/r2g/r2g.c new file mode 100644 index 0000000000..7fb95c043c --- /dev/null +++ b/keyboards/crkbd/r2g/r2g.c @@ -0,0 +1,240 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> +Copyright 2021 Elliot Powell @e11i0t23 + +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 "r2g.h" + +#ifdef RGB_MATRIX_ENABLE + + // Logical Layout + // Columns + // Left + // 0 1 2 3 4 5 + // ROWS + // 25 24 19 18 11 10 0 + // 03 02 01 + // 26 23 20 17 12 09 1 + // 04 05 06 + // 27 22 21 16 13 08 2 + // + // 15 14 07 3 + // + // Right + // 0 1 2 3 4 5 + // ROWS + // 25 24 19 18 11 10 4 + // 03 02 01 + // 26 23 20 17 12 09 5 + // 04 05 06 + // 27 22 21 16 13 08 6 + // + // 15 14 07 7 + // + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + // ROWS + // 25 24 19 18 11 10 10 11 18 19 24 25 0 + // 03 02 01 01 02 03 + // 26 23 20 17 12 09 09 12 17 20 23 26 1 + // 04 04 + // 27 22 21 16 13 08 08 13 16 21 22 27 2 + // 05 06 06 05 + // 15 14 07 07 14 15 3 + +led_config_t g_led_config = { { + { 24, 23, 18, 17, 10, 9 }, + { 25, 22, 19, 16, 11, 8 }, + { 26, 21, 20, 15, 12, 7 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, + { 51, 50, 45, 44, 37, 36 }, + { 52, 49, 46, 43, 38, 35 }, + { 53, 48, 47, 42, 39, 34 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 } +}, { + { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, + { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, + { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, + { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 }, + { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 }, + { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 }, + { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 }, + { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 } +}, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 +} }; + +#endif + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + +enum Layers{ + L_BASE, L_LOWER, L_RAISE, L_ADJUST +}; + +void oled_render_layer_state_r2g(void) { + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case L_BASE: + oled_write_ln_P(PSTR("Default"), false); + break; + case L_LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case L_RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case L_ADJUST: + oled_write_ln_P(PSTR("Adjust"), false); + break; + } +} + +//char keylog_str_r2g[24] = {}; + +const char code_to_name_r2g[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +char key_name_r2g = ' '; +uint16_t last_keycode_r2g; +uint8_t last_row_r2g; +uint8_t last_col_r2g; + +void set_keylog_r2g(uint16_t keycode, keyrecord_t *record) { + key_name_r2g = ' '; + last_keycode_r2g = keycode; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { last_keycode_r2g = keycode & 0xFF; } + if (keycode < 60) { + key_name_r2g = code_to_name_r2g[keycode]; + } + last_row_r2g = record->event.key.row; + last_col_r2g = record->event.key.col; +} + +const char *depad_str(const char *depad_str, char depad_char) { + while (*depad_str == depad_char) ++depad_str; + return depad_str; +} + +void oled_render_keylog_r2g(void) { + //oled_write(keylog_str_r2g, false); + const char *last_row_r2g_str = get_u8_str(last_row_r2g, ' '); + oled_write(depad_str(last_row_r2g_str, ' '), false); + oled_write_P(PSTR("x"), false); + const char *last_col_r2g_str = get_u8_str(last_col_r2g, ' '); + oled_write(depad_str(last_col_r2g_str, ' '), false); + oled_write_P(PSTR(", k"), false); + const char *last_keycode_r2g_str = get_u16_str(last_keycode_r2g, ' '); + oled_write(depad_str(last_keycode_r2g_str, ' '), false); + oled_write_P(PSTR(":"), false); + oled_write_char(key_name_r2g, false); +} + +void render_bootmagic_status_r2g(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo_r2g(void) { + static const char PROGMEM mb_logo[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, 0x0f, +0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, +0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, +0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0xff, 0xff, 0x82, 0x82, 0x82, 0x82, +0x82, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, 0x83, 0x83, 0x83, 0x83, 0x83, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfc, 0xfc, 0xfc, +0x9c, 0x9c, 0xfc, 0xfc, 0xf8, 0xf8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x7c, 0x3c, +0x9c, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0x3c, 0x3c, +0x9c, 0xbc, 0xfc, 0xb8, 0xb8, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, +0x41, 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, 0xff, 0x41, 0x41, 0x41, 0x41, 0x41, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, +0x03, 0x07, 0x0f, 0x3f, 0x3f, 0x3e, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x3e, 0x3f, +0x3f, 0x3f, 0x3b, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x1f, 0x3f, 0x3c, 0x38, +0x3b, 0x3b, 0x3f, 0x1f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, +0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, 0xff, +0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + oled_write_raw_P(mb_logo, sizeof(mb_logo)); + //oled_set_cursor(oled_max_chars()/2,oled_max_lines()/2); + //oled_write_P(PSTR("R2G"), false); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } + if (is_keyboard_master()) { + oled_render_layer_state_r2g(); + oled_render_keylog_r2g(); + } else { + oled_render_logo_r2g(); + } + return false; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog_r2g(keycode, record); + } + return process_record_user(keycode, record); +} +#endif // OLED_ENABLE + diff --git a/keyboards/crkbd/r2g/r2g.h b/keyboards/crkbd/r2g/r2g.h new file mode 100644 index 0000000000..126c4b8998 --- /dev/null +++ b/keyboards/crkbd/r2g/r2g.h @@ -0,0 +1,60 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 + +#include "crkbd.h" +#include "quantum.h" + +// clang-format off +#define LAYOUT_split_3x6_3( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, R30, R31, R32 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, KC_NO, L30, L31, L32 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \ + } + +#define LAYOUT_split_3x5_3( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, R30, R31, R32 \ + ) \ + { \ + { KC_NO, L00, L01, L02, L03, L04 }, \ + { KC_NO, L10, L11, L12, L13, L14 }, \ + { KC_NO, L20, L21, L22, L23, L24 }, \ + { KC_NO, KC_NO, KC_NO, L30, L31, L32 }, \ + { KC_NO, R04, R03, R02, R01, R00 }, \ + { KC_NO, R14, R13, R12, R11, R10 }, \ + { KC_NO, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \ + } + + +#define LAYOUT LAYOUT_split_3x6_3 diff --git a/keyboards/crkbd/r2g/readme.md b/keyboards/crkbd/r2g/readme.md new file mode 100644 index 0000000000..7a9db3845d --- /dev/null +++ b/keyboards/crkbd/r2g/readme.md @@ -0,0 +1,28 @@ +# Corne R2G + +![r2g](https://cdn.shopify.com/s/files/1/0582/0242/3501/products/HelidoxCorneR2GPCB_1800x1800.png) + +An Eddition of the popular CRKBD featuring a full smd assembly + +Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23/), [Mechboards UK](https://mechboards.co.uk) +Hardware Supported: CRKBD R2G PCB +Hardware Availability: [Mechboards UK](https://mechboards.co.uk/products/helidox-corne-kit?variant=40391708213453) + +Make example for this keyboard (after setting up your build environment): + +```sh +make crkbd/r2g:mb_via +``` + +Flash example for this keyboard: +```sh +qmk flash -kb crkbd/r2g -km mb_via +``` + +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 + +These PCBs have a reset on the underside of the PCB next to the TRRS jack to enter in to the bootloader. + +Additionally, if you hold down the "Q" or "P" buttons when plugging in that half of the keyboard (per the default QWERTY layout), this will jump to the bootloader and reset the EEPROM (persistent storage). diff --git a/keyboards/crkbd/r2g/rules.mk b/keyboards/crkbd/r2g/rules.mk new file mode 100644 index 0000000000..a3ee1b46b3 --- /dev/null +++ b/keyboards/crkbd/r2g/rules.mk @@ -0,0 +1,9 @@ +BOOTLOADER = atmel-dfu +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +LTO_ENABLE = yes +RGBLIGHT_ENABLE = yes + + +SPLIT_KEYBOARD = yes + diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md index f3bf152d20..6c0e859663 100644 --- a/keyboards/crkbd/readme.md +++ b/keyboards/crkbd/readme.md @@ -27,7 +27,7 @@ The Corne PCBs have a reset button next to the TRRS jack to enter in to the boot Additionally, if you hold down the "Q" or "P" buttons when plugging in that half of the keyboard (per the default QWERTY layout), this will jump to the bootloader and reset the EEPROM (persistent storage). This would normally be the very top corner-most position, but due to the breakaway column, it's left at Q and P for compatibility. ## RGB Matrix -The Corne Keyboard also supports using the RGB Matrix feature, in place of RGB Light. This provids a better experience when using the keyboard, as it supports a number of per key effects properly. If you're not using the in switch LEDs, then you may want to pass on doing this. +The Corne Keyboard also supports using the RGB Matrix feature, in place of RGB Light. This provides a better experience when using the keyboard, as it supports a number of per key effects properly. If you're not using the in switch LEDs, then you may want to pass on doing this. In your keymap's `rules.mk` file, add the following: @@ -54,36 +54,56 @@ And in your `config.h` file, add the following: # define RGB_MATRIX_VAL_STEP 8 # define RGB_MATRIX_SPD_STEP 10 -/* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +/* Enable the animations you want/need. You may need to enable only a small number of these because * + * they take up a lot of space. Enable and confirm that you can still successfully compile your firmware. */ +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif ``` diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 337859d05c..9f196a7166 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -25,9 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN D3 #ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 12 // Number of LEDs +# define RGBLED_NUM 54 // Number of LEDs # define RGBLED_SPLIT \ - { 6, 6 } + { 27, 27 } # define RGBLIGHT_SPLIT #endif diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 75a54ada0d..4f373d53da 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -7,15 +7,12 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = yes # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output |