diff options
Diffstat (limited to 'keyboards/massdrop')
-rw-r--r-- | keyboards/massdrop/ctrl/config_led.c | 28 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h | 23 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c | 82 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c | 13 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c | 76 |
6 files changed, 154 insertions, 69 deletions
diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index 5f1c452071..448793cf5d 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -39,31 +39,31 @@ led_config_t g_led_config = { { { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 }, // Underglow / Border - { 222, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, + { 224, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, { 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 }, { 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 }, - { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 222, 1 }, { 224, 17 }, { 224, 32 }, { 224, 47 } + { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 224, 0 }, { 224, 17 }, { 224, 32 }, { 224, 47 } }, { // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 1, 4, + 1, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 1, 1, 1, // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, + 4, 4, 4, 4, 4, 1, 1, 1, + 1, // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, + 1, // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, + 4, 4, 4, 4, 1, // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, + 1, 1, 1, 4, 1, 1, 1, 1, + 1, 1, 1, // Underglow / Border 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 35fd446194..4ee767cdd1 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -5,21 +5,35 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 150 +#define RGB_MATRIX_FRAMEBUFFER_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_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_RAINBOW_MOVING_CHEVRON +#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 +// #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 // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS @@ -35,7 +49,6 @@ // #define RGB_MATRIX_KEYRELEASES - // some speed shit #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c new file mode 100644 index 0000000000..448793cf5d --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c @@ -0,0 +1,82 @@ +#ifdef RGB_MATRIX_ENABLE +#include "ctrl.h" + +#include "led_matrix.h" +#include "rgb_matrix.h" +#include "config_led.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 16, 17, 18, 19, 20, 21, 22, 23 }, + { 33, 34, 35, 36, 37, 38, 39, 40 }, + { 50, 51, 52, 53, 54, 55, 56, 57 }, + { 63, 64, 65, 66, 67, 68, 69, 70 }, + { 76, 77, 78, 79, 80, 81, 82, 83 }, + { 8, 9, 10, 11, 12, 13, 14, 15 }, + { 24, 25, 26, 27, 28, 29, 30, 31 }, + { 41, 42, 43, 44, 45, 46, 47, 48 }, + { 58, 59, 60, 61, 62, 75, 49, 32 }, + { 71, 72, 73, 74, 84, 85, 86, NO_LED } +}, { + // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS + { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, + { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, + // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP + { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, + { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, + { 217, 20 }, + // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN + { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, + { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, + { 217, 30 }, + // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT + { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, + { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, + // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP + { 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, + { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, + { 193, 59 }, { 205, 59 }, { 217, 59 }, + // Underglow / Border + { 224, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, + { 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 }, + { 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 }, + { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 224, 0 }, { 224, 17 }, { 224, 32 }, { 224, 47 } +}, { + // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS + 1, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 1, 1, 1, + // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 1, 1, 1, + 1, + // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, + 1, + // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 1, + // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + 1, 1, 1, 4, 1, 1, 1, 1, + 1, 1, 1, + // Underglow / Border + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 +} }; + + +#ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) +{ + led_matrix_indicators(); +} +#endif // USB_LED_INDICATOR_ENABLE + +#endif diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index 2823292e68..112be66d6c 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -80,14 +80,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; -void set_color_helper(int index, uint8_t red, uint8_t green, uint8_t blue) -{ - if (!HAS_ANY_FLAGS(g_rgb_leds[index].flags, rgb_matrix_get_flags())) - { return; } - - rgb_matrix_set_color(index, red, green, blue); -} void rgb_matrix_indicators_user(void) { @@ -225,8 +217,9 @@ void rgb_matrix_indicators_user(void) void matrix_init_user(void) { autoshift_disable(); - rgb_matrix_sethsv(192, 112, 255); - rgb_matrix_mode(4); + rgb_matrix_sethsv(128, 255, 255); + // rgb_matrix_sethsv(192, 112, 255); + // rgb_matrix_mode(4); }; // Runs constantly in the background, in a loop. diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk index 4fb7826ce6..063d135a06 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk @@ -1,2 +1,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover AUTO_SHIFT_ENABLE = yes # Auto Shift +SRC += config_led.c diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c index 1e50b4a53c..8b45b53ecb 100644 --- a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c @@ -13,23 +13,35 @@ enum ctrl_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode -keymap_config_t keymap_config; +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + [_QWERTY] = LAYOUT( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, TD_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, TD_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, TD_DOT, KC_SLSH, KC_RSPC, KC_UP, \ + KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ - KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [1] = LAYOUT( +#endif + + [_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ - _______, RGB_RMOD, RGB_MOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, _______, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RGB_TOG, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, RGB_RMOD,RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, QWERTY, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, GAME, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* @@ -44,62 +56,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - static uint32_t key_timer; +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) +{ + static uint16_t reset_timer; switch (keycode) { case U_T_AUTO: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); - } return false; case U_T_AGCR: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); - } return false; case DBG_TOG: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); - } return false; case DBG_MTRX: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); - } return false; case DBG_KBD: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); - } return false; case DBG_MOU: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); - } return false; case MD_BOOT: - if (record->event.pressed) { - key_timer = timer_read32(); - } else { - if (timer_elapsed32(key_timer) >= 500) { + if (record->event.pressed) + reset_timer = timer_read() + 500; + else if (timer_expired(reset_timer)) reset_keyboard(); - } - } return false; - default: - return true; //Process all other keycodes normally } + + return true; } |