From 5bc282eefe36dd45393bcba3f861fa168013f7ce Mon Sep 17 00:00:00 2001 From: miketronic Date: Sun, 9 Jul 2023 07:10:24 -0400 Subject: Userspace and keymap addition (#20522) Co-authored-by: Drashna Jaelre --- .../pi40/mit_v1_0/keymaps/miketronic/config.h | 13 + .../pi40/mit_v1_0/keymaps/miketronic/keymap.c | 290 +++++++++++++++++++++ .../pi40/mit_v1_0/keymaps/miketronic/rules.mk | 25 ++ .../hazel/bad_wings/keymaps/miketronic/config.h | 16 ++ .../hazel/bad_wings/keymaps/miketronic/keymap.c | 258 ++++++++++++++++++ .../hazel/bad_wings/keymaps/miketronic/rules.mk | 31 +++ .../mechwild/bde/rev2/keymaps/miketronic/config.h | 10 + .../mechwild/bde/rev2/keymaps/miketronic/keymap.c | 221 ++++++++++++++++ .../mechwild/bde/rev2/keymaps/miketronic/rules.mk | 13 + 9 files changed, 877 insertions(+) create mode 100644 keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h create mode 100644 keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c create mode 100644 keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk create mode 100644 keyboards/hazel/bad_wings/keymaps/miketronic/config.h create mode 100644 keyboards/hazel/bad_wings/keymaps/miketronic/keymap.c create mode 100644 keyboards/hazel/bad_wings/keymaps/miketronic/rules.mk create mode 100644 keyboards/mechwild/bde/rev2/keymaps/miketronic/config.h create mode 100644 keyboards/mechwild/bde/rev2/keymaps/miketronic/keymap.c create mode 100644 keyboards/mechwild/bde/rev2/keymaps/miketronic/rules.mk (limited to 'keyboards') diff --git a/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h b/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h new file mode 100644 index 0000000000..834b7ee0ab --- /dev/null +++ b/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/config.h @@ -0,0 +1,13 @@ +// Copyright 2023 @miketronic -- Mike B +// SPDX-License-Identifier: GPL-2.0+ + +#pragma once + +# define TAPPING_TERM 160 +# define TAPPING_TERM_PER_KEY +# define HOLD_ON_OTHER_KEY_PRESS +# define QUICK_TAP_TERM TAPPING_TERM / 2 +# define QUICK_TAP_TERM_PER_KEY + + + diff --git a/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c b/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c new file mode 100644 index 0000000000..636aad675b --- /dev/null +++ b/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/keymap.c @@ -0,0 +1,290 @@ +// Copyright 2023 @miketronic -- Mike B +// SPDX-License-Identifier: GPL-2.0+ + +#include "miketronic.h" + + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Workman + * ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ + * │ TAB │ Q │ D │ R │ W │ B │ │ J │ F │ U │ P │ BSPC│ BSPC│ + * │ ESC │ ESC │ │ │ │ SYM │ │ SYM │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │ TAB │ A │ S │ H ┃ T ┃ G │ │ Y ┃ N ┃ E │ O │ I │ │ + * │SHIFT│ │ │ ┃ EX ┃ │ │ ┃ ┃ │ │ENTER│ENTER│ + * ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │SHIFT| Z │ X │ M │ C │ V │ │ K │ L │ SPC │ SPC │ / │ UP | + * │ │ │ │ │ │ │ │ │ │ , │ . │ │RIGHT| + * ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ + * │ FN │CTRL │ OS │ ALT │LOWER│ │ │ │RAISE│ SS │CLIP │COPY │ DN │ + * │ │ │ │ │ │ │ │ │ │ │ │PASTE│LEFT │ + * └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + [_WM] = LAYOUT_ortho_4x12_wrapper ( + RGB_TOG, + _____________WORKMAN_412_001_L_____________, _____________WORKMAN_412_001_R_____________, + _____________WORKMAN_412_002_L_____________, _____________WORKMAN_412_002_R_____________, + _____________WORKMAN_412_003_L_____________, _____________WORKMAN_412_003_R_____________, + _____________WORKMAN_412_004_L_____________, _____________WORKMAN_412_004_R_____________ + ), + + [_QW] = LAYOUT_ortho_4x12_wrapper ( + RGB_TOG, + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, + KC_ESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, + KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, + _____________WORKMAN_412_004_L_____________, _____________WORKMAN_412_004_R_____________ + ), + + + + + /* Lower + * ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ () │ [] │ /\ │ │ │ │ │ 7 │ 8 │ 9 │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │ │ @ # │ & % │ ┃ ┃ │ │ ┃ 4 ┃ 5 │ 6 │ │ │ + * │ │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ │ + * ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ 0 │ 1 │ 2 │ 3 │ │ UP │ + * │ │ │ │ │ │ │ │ │ │ 0 │ │ │RIGHT│ + * ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │LOWER│ │ │ │BPSC │ SPC │ . │ │ DN │ + * │ │ │ │ │ │ │ │ │ │ │ ENT │ │LEFT │ + * └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [_LOWER] = LAYOUT_ortho_4x12_wrapper ( + KC_MUTE, + _______________LOWER_412_L1________________, _______________LOWER_412_R1________________, + _______________LOWER_412_L2________________, _______________LOWER_412_R2________________, + _______________LOWER_412_L3________________, _______________LOWER_412_R3________________, + _______________LOWER_412_L4________________, _______________LOWER_412_R4________________ + ), + + + /* RAISE + * ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ + * │BOOT │DEBUG│ │ │ │MAKE │ │ │ │ F7 │ F8 │ F9 │ F10 │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │ │ RGB | RGB | RGB ┃ RGB ┃ WM │ │ ┃ / \ ┃ F4 │ F5 │ F6 │ F11 │ + * │ │ TOG │ MOD │ HUI ┃ HUD ┃ │ │ ┃ ┃ │ │ │ │ + * ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │ │ RGB │ RGB │ RGB │ RGB │ QW │ │ │ _ │ F1 | F2 | F3 │ F12 │ + * │ │ SAI │ SAD │ VAI │ VAD │ │ │ │ - │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │RAISE│ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [_RAISE] = LAYOUT_ortho_4x12_wrapper ( + KC_MUTE, + _______________RAISE_412_L1________________, _______________RAISE_412_R1________________, + _______________RAISE_412_L2________________, _______________RAISE_412_R2________________, + _______________RAISE_412_L3________________, _______________RAISE_412_R3________________, + _________________BLANK_6___________________, _________________BLANK_6___________________ + ), + + + /* EXTRAS + * ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ ! │ │ │ │ │ │ │ /\ | [ | ] | ; │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │SHIFT│ | |EXTRA┃ ┃ │ │ ┃ @ # ┃ & % | | ' | │ + * │ │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ │ + * ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ , | . | ? │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [_EX] = LAYOUT_ortho_4x12_wrapper ( + KC_MUTE, + ______________EXTRAS_412_L1________________, ______________EXTRAS_412_R1________________, + ______________EXTRAS_412_L2________________, ______________EXTRAS_412_R2________________, + ______________EXTRAS_412_L3________________, ______________EXTRAS_412_R3________________, + ______________EXTRAS_412_L4________________, ______________EXTRAS_412_R4________________ + ), + + + + /* FUNCTION + * ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ + * │COPY │CLIP │ SS │ │ │ │ │ │ /\ │ UP │ │ │ DEL │ + * │PASTE│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │TAB │ M05 | M06 | M07 ┃ M08 ┃ │ │ ┃LEFT ┃DOWN │RIGHT│ │UP │ + * │SHIFT│ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │RIGHT│ + * ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │ │ M01 │ M02 │ M03 │ M04 │ │ │ │ │ , | . | ? │DOWN │ + * │ │ │ │ │ │ │ │ │ │ │ │ │LEFT │ + * ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │RGB1 │RGB2 │RGB3 │RGB4 │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [_FN] = LAYOUT_ortho_4x12_wrapper ( + KC_MUTE, + _____________FUNCTION_412_L1_______________, _____________FUNCTION_412_R1_______________, + _____________FUNCTION_412_L2_______________, _____________FUNCTION_412_R2_______________, + _____________FUNCTION_412_L3_______________, _____________FUNCTION_412_R3_______________, + _____________FUNCTION_412_L4_______________, _____________FUNCTION_412_R4_______________ + ), + + + /* SYMBOLS + * ┌─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┐ + * │ | $ | ^ | < | > │ SYMB│ │ SYMB│ | | [ | ] | - | | + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │ | % | : | ; ┃ + ┃ = │ │ ┃ ┃ ( | ) | _ | | + * │ │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ │ + * ├─────┼─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * | | & | ' | " | * | # │ │ ! | ? | / | \ | @ | | + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + [_SYMB] = LAYOUT_ortho_4x12_wrapper ( + KC_MUTE, + _______, _____________SYMBOLS_310_L1________________, _____________SYMBOLS_310_R1________________, _______, + _______, _____________SYMBOLS_310_L2________________, _____________SYMBOLS_310_R2________________, _______, + _______, _____________SYMBOLS_310_L3________________, _____________SYMBOLS_310_R3________________, _______, + _________________BLANK_6___________________, _________________BLANK_6___________________ + ) + +}; + +#ifndef NUM_DIRECTIONS +# define NUM_DIRECTIONS 2 +#endif + +#if defined(ENCODER_MAP_ENABLE) && defined(KEYBOARD_1upkeyboards_pi40_mit_v1_0) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_WM] = { ENCODER_CCW_CW(LCTL(KC_V), LCTL(KC_C)) }, + [_QW] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(____, ____) }, + [_RAISE] = { ENCODER_CCW_CW(____, ____) }, + [_EX] = { ENCODER_CCW_CW(____, ____) }, + [_FN] = { ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) }, + [_SYMB] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + + +#ifdef OLED_ENABLE +bool oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _LOWER: + oled_write_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_P(PSTR("RAISE"), false); + break; + case _EX: + oled_write_P(PSTR("EXTRA"), false); + break; + case _FN: + oled_write_P(PSTR("FUNCTION"), false); + break; + case _WM: + oled_write_P(PSTR("WORKMAN"), false); + break; + case _SYMB: + oled_write_P(PSTR("SYMBOLS"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("HOME"), false); + } + +// Host Keyboard LED Status + // led_t led_state = host_keyboard_led_state(); + // oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + // oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + // oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; +} +#endif + + +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_A): + // Do not force the mod-tap key press to be handled as a modifier + // if any other key was pressed while the mod-tap key is held down. + return false; + case TEX: + return false; + case CTRLX: + return false; + case FNZ: + return false; + case MGUI: + return false; + case VLOWER: + return false; + case KRAISE: + return false; + default: + // Force the dual-role key press to be handled as a modifier if any + // other key was pressed while the mod-tap key is held down. + return true; + } +} + +#ifdef AUDIO_ENABLE +float leader_start_song[][2] = SONG(ONE_UP_SOUND); +float leader_succeed_song[][2] = SONG(ALL_STAR); +float leader_fail_song[][2] = SONG(RICK_ROLL); +#endif + +void matrix_scan_user(void); + +void leader_start_user(void) { +#ifdef AUDIO_ENABLE + PLAY_SONG(leader_start_song); +#endif +} + +bool did_leader_succeed; + +void leader_end_user(void) { + did_leader_succeed = false; + + if (leader_sequence_one_key(KC_E)) { + SEND_STRING(SS_LCTL(SS_LSFT("t"))); + did_leader_succeed = true; + } else if (leader_sequence_two_keys(KC_E, KC_D)) { + SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c")); + did_leader_succeed = true; + } else if (leader_sequence_two_keys(KC_A, KC_T)) { + SEND_STRING("@guidehouse.com"); + did_leader_succeed = true; + } + + +#ifdef AUDIO_ENABLE + if (did_leader_succeed) { + PLAY_SONG(leader_succeed_song); + } else { + PLAY_SONG(leader_fail_song); + } +#endif +} \ No newline at end of file diff --git a/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk b/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk new file mode 100644 index 0000000000..96f930ffa1 --- /dev/null +++ b/keyboards/1upkeyboards/pi40/mit_v1_0/keymaps/miketronic/rules.mk @@ -0,0 +1,25 @@ +# Common feature for all keyboards +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes # Tap Dance keys +NKRO_ENABLE = yes # Enable N-Key Rollover +MACROS_ENABLED = yes + + +# Keyboard specific +AUTO_SHIFT_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +MOUSEKEY_ENABLE = no # Mouse keys + +LEADER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +WS2812_DRIVER = vendor +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 \ No newline at end of file diff --git a/keyboards/hazel/bad_wings/keymaps/miketronic/config.h b/keyboards/hazel/bad_wings/keymaps/miketronic/config.h new file mode 100644 index 0000000000..1f5c059c00 --- /dev/null +++ b/keyboards/hazel/bad_wings/keymaps/miketronic/config.h @@ -0,0 +1,16 @@ +// Copyright 2023 @miketronic -- Mike B +// SPDX-License-Identifier: GPL-2.0+ + +#pragma once + +# define TAPPING_TERM 160 +# define TAPPING_TERM_PER_KEY +# define HOLD_ON_OTHER_KEY_PRESS +# define QUICK_TAP_TERM TAPPING_TERM / 2 +# define QUICK_TAP_TERM_PER_KEY + +# define CIRQUE_PINNACLE_TAP_ENABLE +# define CIRQUE_PINNACLE_SECONDARY_TAP_ENABLE +# define CIRQUE_PINNACLE_ATTENUATION_4X +# define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_RELATIVE_MODE +//# define CIRQUE_DEVICE_GESTURES_SCROLL_ENABLE diff --git a/keyboards/hazel/bad_wings/keymaps/miketronic/keymap.c b/keyboards/hazel/bad_wings/keymaps/miketronic/keymap.c new file mode 100644 index 0000000000..3ebcc79fde --- /dev/null +++ b/keyboards/hazel/bad_wings/keymaps/miketronic/keymap.c @@ -0,0 +1,258 @@ +// Copyright 2023 @miketronic -- Mike B +// SPDX-License-Identifier: GPL-2.0+ + +#include "miketronic.h" + + +/* +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, 1, 2, 3); +} + + + [0] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, \ + KC_Z, LGUI_T(KC_X), LALT_T(KC_C), KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_LCTL, OSL(1), OSM(MOD_LSFT), KC_SPC, LT(2, KC_BSPC), KC_ENT + ), + [1] = LAYOUT_split_3x5_3( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RBRC, KC_RCBR, KC_RPRN, KC_RABK, KC_NO, \ + KC_GRV, KC_TILD, KC_UNDS, KC_EQL, KC_NO, KC_LBRC, KC_LCBR, KC_LPRN, KC_LABK, KC_BACKSLASH, \ + KC_NO, KC_NO, KC_PLUS, KC_MINS, KC_NO, KC_NO, KC_NO, KC_COLN, KC_DOT, KC_SCLN, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_PIPE, KC_NO, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DOT, KC_NO, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_split_3x5_3( + KC_ESC, KC_F1, KC_F4, KC_F7, KC_F10, KC_NO, KC_HOME, KC_UP, KC_END, KC_BSPC, \ + KC_TAB, KC_F2, KC_F5, KC_F8, KC_F11, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT, \ + KC_NO, KC_F3, KC_F6, KC_F9, KC_F12, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +*/ + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* WORKMAN + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ Q │ D │ R │ W │ B │ │ J │ F │ U │ P │ BSPC│ + * │ ESC │ │ │ │ SYM │ │ SYM │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ A │ S │ H ┃ T ┃ G │ │ Y ┃ N ┃ E │ O │ I │ + * │SHIFT│ │ ┃ EX ┃ │ │ ┃ ┃ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ Z │ X │ M │ C │ V │ │ K │ L │ SPC │ SPC │ENTER│ + * │ FN │ CTRL│ OS │ ALT │LOWER│ │RAISE│ │ , │ . │ │ + * └─────┴─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┘ + * │OSM │SPACE│LOWER│ │RAISE│ENTER│COPY │ + * │SHIFT│ │ │ │ │ │PASTE│ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ +*/ + [_WM] = LAYOUT_split_3x5_3_wrapper ( + _____________WORKMAN_310_001_L_____________, _____________WORKMAN_310_001_R_____________, + _____________WORKMAN_310_002_L_____________, _____________WORKMAN_310_002_R_____________, + _____________WORKMAN_310_003_L_____________, _____________WORKMAN_310_003_R_____________, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + + [_QW] = LAYOUT_split_3x5_3_wrapper ( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + + + + /* LOWER + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ () │ [] │ /\ │ │ │ │ │ 7 │ 8 │ 9 │ │ + * │ │ <> │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ @ # │ & % │ ┃ ┃ │ │ . ┃ 4 ┃ 5 │ 6 │ UP │ + * │ │ │ ┃ ┃ │ │ENTER┃ ┃ │ │RIGHT│ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ │ │ │ │ │ │ 0 │ 1 │ 2 │ 3 │ DOWN│ + * │ │ │ │ │LOWER│ │ │ │ 0 │ │ LEFT│ + * └─────┴─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┘ + * │OSM │SPACE│LOWER│ │RAISE│ENTER│COPY │ + * │SHIFT│ │ │ │ │ │PASTE│ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ +*/ + [_LOWER] = LAYOUT_split_3x5_3_wrapper ( + _______________LOWER_310_L1________________, _______________LOWER_310_R1________________, + _______________LOWER_310_L2________________, _______________LOWER_310_R2________________, + _______________LOWER_310_L3________________, _______________LOWER_310_R3________________, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + + + + /* RAISE + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ BOOT│DEBUG│ │ │ MAKE│ │ │ F7 │ F8 │ F9 │ F10 │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ │ RGB │ RGB ┃ RGB ┃ RGB │ │ _ ┃ F4 ┃ F5 │ F6 │ F11 │ + * │ │ TOG │ MOD ┃ HUI ┃ HUD │ │ - ┃ ┃ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ │ RGB │ RGB │ RGB │ RGB │ │ │ F1 │ F2 │ F3 │ F12 │ + * │ │ SAI │ SAD │ VAI │ VAD │ │RAISE│ │ │ │ │ + * └─────┴─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┘ + * │OSM │SPACE│LOWER│ │RAISE│ENTER│COPY │ + * │SHIFT│ │ │ │ │ │PASTE│ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ +*/ + [_RAISE] = LAYOUT_split_3x5_3_wrapper ( + _______________RAISE_310_L1________________, _______________RAISE_310_R1________________, + _______________RAISE_310_L2________________, _______________RAISE_310_R2________________, + _______________RAISE_310_L3________________, _______________RAISE_310_R3________________, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + + + + /* EXTRAS + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ ! │ │ │ │ │ │ │ /\ | () | [] | ; │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ │ │ ┃EXTRA┃ │ │ ┃ @ # ┃ & % | │ ' │ + * │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ , │ . │ ? │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┘ + * │OSM │SPACE│LOWER│ │RAISE│ENTER│COPY │ + * │SHIFT│ │ │ │ │ │PASTE│ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ +*/ + [_EX] = LAYOUT_split_3x5_3_wrapper ( + ______________EXTRAS_310_L1________________, ______________EXTRAS_310_R1________________, + ______________EXTRAS_310_L2________________, ______________EXTRAS_310_R2________________, + ______________EXTRAS_310_L3________________, ______________EXTRAS_310_R3________________, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + + + + /* FUNCTION + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │COPY │CLIP │ SS │ │ │ │ │ /\ │ UP │ │ DEL │ + * │PASTE│ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ TAB │ M05 │ M06 ┃ M07 ┃ M08 │ │ ┃ LEFT┃ DOWN│RIGHT│ UP │ + * │ │ │ ┃ ┃ │ │ ┃ ┃ │ │RIGHT│ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ │ M01 │ M02 │ M03 │ M04 │ │ │ │ , │ . │DOWN │ + * │ FN │ │ │ │ │ │ │ │ │ │LEFT │ + * └─────┴─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┘ + * │OSM │SPACE│LOWER│ │RAISE│ENTER│COPY │ + * │SHIFT│ │ │ │ │ │PASTE│ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ +*/ + [_FN] = LAYOUT_split_3x5_3_wrapper ( + _____________FUNCTION_310_L1_______________, _____________FUNCTION_310_R1_______________, + _____________FUNCTION_310_L2_______________, _____________FUNCTION_310_R2_______________, + _____________FUNCTION_310_L3_______________, _____________FUNCTION_310_R3_______________, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + + + + /* SYMBOLS + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ $ │ ^ │ < │ > │ │ │ │ | │ [ │ ] │ - │ + * │ │ │ │ │ SYMB│ │ SYMB│ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ % │ : │ ; ┃ + ┃ = │ │ ┃ ┃ ( │ ) │ _ │ + * │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ & │ ' │ " │ * │ # │ │ ! │ ? │ / │ \ │ @ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┴─────┘ + * │OSM │SPACE│LOWER│ │RAISE│ENTER│COPY │ + * │SHIFT│ │ │ │ │ │PASTE│ + * └─────┴─────┴─────┘ └─────┴─────┴─────┘ +*/ + [_SYMB] = LAYOUT_split_3x5_3_wrapper ( + KC_DLR, KC_CIRC, KC_LABK, KC_RABK, XXXX, XXXX, KC_PIPE, KC_LBRC, KC_RBRC, KC_MINS, + KC_PERC, KC_COLN, KC_SCLN, KC_PLUS, KC_EQL, XXXX, XXXX, KC_LPRN, KC_RPRN, KC_UNDS, + KC_AMPR, KC_QUOT, KC_DQUO, KC_ASTR, KC_HASH, KC_EXLM, KC_QUES, KC_SLSH, KC_BSLS, KC_AT, + _________3KEY_LEFT___________, _________3KEY_RIGHT__________ + ), + +}; + + +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_A): + // Do not force the mod-tap key press to be handled as a modifier + // if any other key was pressed while the mod-tap key is held down. + return false; + case TEX: + return false; + case CTRLX: + return false; + case FNZ: + return false; + case MGUI: + return false; + case VLOWER: + return false; + case KRAISE: + return false; + default: + // Force the dual-role key press to be handled as a modifier if any + // other key was pressed while the mod-tap key is held down. + return true; + } +} + + +#ifdef AUDIO_ENABLE +float leader_start_song[][2] = SONG(ONE_UP_SOUND); +float leader_succeed_song[][2] = SONG(ALL_STAR); +float leader_fail_song[][2] = SONG(RICK_ROLL); +#endif + +void matrix_scan_user(void); + +void leader_start_user(void) { +#ifdef AUDIO_ENABLE + PLAY_SONG(leader_start_song); +#endif +} + +bool did_leader_succeed; + +void leader_end_user(void) { + did_leader_succeed = false; + + if (leader_sequence_one_key(KC_E)) { + SEND_STRING(SS_LCTL(SS_LSFT("t"))); + did_leader_succeed = true; + } else if (leader_sequence_two_keys(KC_E, KC_D)) { + SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c")); + did_leader_succeed = true; + } else if (leader_sequence_two_keys(KC_A, KC_T)) { + SEND_STRING("@guidehouse.com"); + did_leader_succeed = true; + } + + +#ifdef AUDIO_ENABLE + if (did_leader_succeed) { + PLAY_SONG(leader_succeed_song); + } else { + PLAY_SONG(leader_fail_song); + } +#endif +} + diff --git a/keyboards/hazel/bad_wings/keymaps/miketronic/rules.mk b/keyboards/hazel/bad_wings/keymaps/miketronic/rules.mk new file mode 100644 index 0000000000..72c338c157 --- /dev/null +++ b/keyboards/hazel/bad_wings/keymaps/miketronic/rules.mk @@ -0,0 +1,31 @@ +# Common feature for all keyboards +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes # Tap Dance keys +NKRO_ENABLE = yes # Enable N-Key Rollover +MACROS_ENABLED = yes + +# Keyboard specific +MOUSEKEY_ENABLE = yes # Mouse keys +CAPS_WORD_ENABLE = yes +KEY_OVERRIDE_ENABLE = yes +LEADER_ENABLE = yes + + + LTO_ENABLE = no # Enabled this causes longer build time, but smaller file. + AUTO_SHIFT_ENABLE = no + UNICODE_ENABLE = no # Unicode + CONSOLE_ENABLE = no # Console for debug + COMMAND_ENABLE = no # Commands for debug and configuration + RGBLIGHT_ENABLE = no + BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality + SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend (it uses the same timer as BACKLIGHT_ENABLE) + AUDIO_ENABLE = no # Audio output on port C6 + MIDI_ENABLE = no # MIDI support + BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + GRAVE_ESC_ENABLE = no + SPACE_CADET_ENABLE = no + COMBO_ENABLE = no + OLED_ENABLE = no + ENCODER_ENABLE = no + ENCODER_MAP_ENABLE = no diff --git a/keyboards/mechwild/bde/rev2/keymaps/miketronic/config.h b/keyboards/mechwild/bde/rev2/keymaps/miketronic/config.h new file mode 100644 index 0000000000..658c829f04 --- /dev/null +++ b/keyboards/mechwild/bde/rev2/keymaps/miketronic/config.h @@ -0,0 +1,10 @@ +// Copyright 2023 @miketronic -- Mike B +// SPDX-License-Identifier: GPL-2.0+ + +#pragma once + +# define TAPPING_TERM 160 +# define TAPPING_TERM_PER_KEY +# define HOLD_ON_OTHER_KEY_PRESS +# define QUICK_TAP_TERM TAPPING_TERM / 2 +# define QUICK_TAP_TERM_PER_KEY diff --git a/keyboards/mechwild/bde/rev2/keymaps/miketronic/keymap.c b/keyboards/mechwild/bde/rev2/keymaps/miketronic/keymap.c new file mode 100644 index 0000000000..e8a26fd28a --- /dev/null +++ b/keyboards/mechwild/bde/rev2/keymaps/miketronic/keymap.c @@ -0,0 +1,221 @@ +// Copyright 2023 @miketronic -- Mike B +// SPDX-License-Identifier: GPL-2.0+ + +#include "miketronic.h" + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* WORKMAN + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ Q │ D │ R │ W │ B │ 7 │ 8 │ 9 │ J │ F │ U │ P │ BSPC│BSPC │ + * │ ESC │ │ │ │ SYM │ │ │ │ SYM │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │ A │ S │ H ┃ T ┃ G │ 4 │ 5 │ 6 │ Y ┃ N ┃ E │ O │ I │UP │ + * │SHIFT│ │ ┃ EX ┃ │ │ │ │ ┃ ┃ │ │ │RIGHT│ + * ├─────┼─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │ Z │ X │ M │ C │ V │ 1 │ 2 │ 3 │ K │ L │ SPC │ SPC │ENTER│DOWN │ + * │ FN │ CTRL│ OS │ ALT │LOWER│ │ 0 │ │RAISE│RAISE│ │ │ │LEFT │ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * + */ + + [_WM] = LAYOUT_3x14_wrapper ( + _____________WORKMAN_310_001_L_____________, _________NUMBER_01__________, _____________WORKMAN_310_001_R_____________, KC_BSPC, + _____________WORKMAN_310_002_L_____________, _________NUMBER_02__________, _____________WORKMAN_310_002_R_____________, TD_UR, + _____________WORKMAN_310_003_L_____________, _________NUMBER_03__________, _____________WORKMAN_310_003_R_____________, TD_DL + ), + + [_QW] = LAYOUT_3x14_wrapper ( + _________________QWERTY_L1_________________, _________NUMBER_01__________, _________________QWERTY_R1_________________, KC_MUTE, + _________________QWERTY_L2_________________, _________NUMBER_02__________, _________________QWERTY_R2_________________, TD_UR, + _________________QWERTY_L3_________________, _________NUMBER_03__________, _________________QWERTY_R3_________________, TD_DL + ), + + + /* LOWER + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ () │ [] │ /\ │ │ │ │ 7 │ 8 │ 9 │ 0 │ │ │ │LEAD │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ @ # │ & % │ ┃ ┃ │ ┃ 4 ┃ 5 │ 6 │ │ │ │ │ │ + * │ │ │ ┃ ┃ │ ┃ ┃ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ 0 │ 1 │ 2 │ 3 │ . │ │ │ │ │ + * │ │ │ │ │LOWER│ │ │ 0 │ │ ENT │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * + */ + + [_LOWER] = LAYOUT_3x14_wrapper ( + _______________LOWER_310_L1________________, _________NUMBER_01__________, _______________LOWER_310_R1________________, QK_LEAD, + _______________LOWER_310_L2________________, _________NUMBER_02__________, _______________LOWER_310_R2________________, TD_UR, + _______________LOWER_310_L3________________, _________NUMBER_03__________, _______________LOWER_310_R3________________, TD_DL + ), + + + /* RAISE + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ BOOT│DEBUG│ │ │ MAKE│ │ F7 │ F8 │ F9 │ F10 │ │ │ │LEAD │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ RGB │ RGB ┃ RGB ┃ RGB │ _ ┃ F4 ┃ F5 │ F6 │ F11 │ │ │ │ │ + * │ │ TOG │ MOD ┃ HUI ┃ HUD │ - ┃ ┃ _ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ RGB │ RGB │ RGB │ RGB │RAISE│ F1 │ F2 │ F3 │ F12 │ │ │ │ │ + * │ │ SAI │ SAD │ VAI │ VAD │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * + */ + + [_RAISE] = LAYOUT_3x14_wrapper ( + _______________RAISE_310_L1________________, _________NUMBER_01__________, _______________RAISE_310_R1________________, QK_LEAD, + _______________RAISE_310_L2________________, _________NUMBER_02__________, _______________RAISE_310_R2________________, TD_UR, + _______________RAISE_310_L3________________, _________NUMBER_03__________, _______________RAISE_310_R3________________, TD_DL + ), + + + /* EXTRAS + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ! │ │ │ │ │ │ /\ | () | [] | ; │ │ │ │LEAD │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ ┃EXTRA┃ │ ┃ @ # ┃ & % | | ' | │ │ │ │ + * │ │ │ ┃ ┃ │ ┃ ┃ _ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ , | . | ? │ │ │ │ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + [_EX] = LAYOUT_3x14_wrapper ( + ______________EXTRAS_310_L1________________, _________NUMBER_01__________, ______________EXTRAS_310_R1________________, QK_LEAD, + ______________EXTRAS_310_L2________________, _________NUMBER_02__________, ______________EXTRAS_310_R2________________, TD_UR, + ______________EXTRAS_310_L3________________, _________NUMBER_03__________, ______________EXTRAS_310_R3________________, TD_DL +), + + + /* FUNCTION + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │COPY │CLIP │ SS │ │ │ │ │ │ | /\ │ UP │ │ DEL │LEAD │ + * │PASTE│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┼─────╆━━━━━╅─────┼─────┼─────┼─────┤ + * │SHIFT│ M05 │ M06 ┃ M07 ┃ M08 │ │ │ │ ┃ LEFT┃ DOWN│RIGHT│ │ UP │ + * │ │ │ ┃ ┃ │ │ │ │ ┃ ┃ │ │ │RIGHT│ + * ├─────┼─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┼─────╄━━━━━╃─────┼─────┼─────┼─────┤ + * │ │ M01 │ M02 │ M03 │ M04 │ │ │ | | │ , │ . │ │DOWN │ + * │ FN │ │ │ │ │ │ │ │ │ │ │ │ │LEFT │ + * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + [_FN] = LAYOUT_3x14_wrapper ( + _____________FUNCTION_310_L1_______________, _________NUMBER_01__________, _____________FUNCTION_310_R1_______________, QK_LEAD, + _____________FUNCTION_310_L2_______________, _________NUMBER_02__________, _____________FUNCTION_310_R2_______________, TD_UR, + _____________FUNCTION_310_L3_______________, _________NUMBER_03__________, _____________FUNCTION_310_R3_______________, TD_DL + ), + + + + /* SYMBOLS + * ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ + * │ $ │ ^ │ < │ > │ │ │ │ | │ [ │ ] │ - │ + * │ │ │ │ │ SYMB│ │ SYMB│ │ │ │ │ + * ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ + * │ % │ : │ ; ┃ + ┃ = │ │ ┃ ┃ ( │ ) │ _ │ + * │ │ │ ┃ ┃ │ │ ┃ ┃ │ │ │ + * ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ + * │ & │ ' │ " │ * │ # │ │ ! │ ? │ / │ \ │ @ │ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ + */ + + [_SYMB] = LAYOUT_3x14_wrapper ( + _____________SYMBOLS_310_L1________________, _________NUMBER_01__________, _____________SYMBOLS_310_R1________________, QK_LEAD, + _____________SYMBOLS_310_L2________________, _________NUMBER_02__________, _____________SYMBOLS_310_R2________________, TD_UR, + _____________SYMBOLS_310_L3________________, _________NUMBER_03__________, _____________SYMBOLS_310_R3________________, TD_DL + ), + + + +}; + + +#ifndef NUM_DIRECTIONS +# define NUM_DIRECTIONS 2 +#endif +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [_WM] = { ENCODER_CCW_CW(LCTL(KC_V), LCTL(KC_C)) }, + [_QW] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_LOWER] = { ENCODER_CCW_CW(____, ____) }, + [_RAISE] = { ENCODER_CCW_CW(____, ____) }, + [_EX] = { ENCODER_CCW_CW(____, ____) }, + [_FN] = { ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) }, + [_SYMB] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_A): + // Do not force the mod-tap key press to be handled as a modifier + // if any other key was pressed while the mod-tap key is held down. + return false; + case TEX: + return false; + case CTRLX: + return false; + case FNZ: + return false; + case MGUI: + return false; + case VLOWER: + return false; + case KRAISE: + return false; + default: + // Force the dual-role key press to be handled as a modifier if any + // other key was pressed while the mod-tap key is held down. + return true; + } +} + +#ifdef AUDIO_ENABLE +float leader_start_song[][2] = SONG(ONE_UP_SOUND); +float leader_succeed_song[][2] = SONG(ALL_STAR); +float leader_fail_song[][2] = SONG(RICK_ROLL); +#endif + +void matrix_scan_user(void); + +void leader_start_user(void) { +#ifdef AUDIO_ENABLE + PLAY_SONG(leader_start_song); +#endif +} + +bool did_leader_succeed; + +void leader_end_user(void) { + did_leader_succeed = false; + + if (leader_sequence_one_key(KC_E)) { + SEND_STRING(SS_LCTL(SS_LSFT("t"))); + did_leader_succeed = true; + } else if (leader_sequence_two_keys(KC_E, KC_D)) { + SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c")); + did_leader_succeed = true; + } else if (leader_sequence_two_keys(KC_A, KC_T)) { + SEND_STRING("@guidehouse.com"); + did_leader_succeed = true; + } + + +#ifdef AUDIO_ENABLE + if (did_leader_succeed) { + PLAY_SONG(leader_succeed_song); + } else { + PLAY_SONG(leader_fail_song); + } +#endif +} \ No newline at end of file diff --git a/keyboards/mechwild/bde/rev2/keymaps/miketronic/rules.mk b/keyboards/mechwild/bde/rev2/keymaps/miketronic/rules.mk new file mode 100644 index 0000000000..540fbaecb2 --- /dev/null +++ b/keyboards/mechwild/bde/rev2/keymaps/miketronic/rules.mk @@ -0,0 +1,13 @@ +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes # Tap Dance keys +NKRO_ENABLE = yes # Enable N-Key Rollover +MACROS_ENABLED = yes +LEADER_ENABLE = yes + +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes # Enable OLED Screen +OLED_DRIVER = SSD1306 # Set OLED Driver + +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file -- cgit v1.2.3