diff --git a/users/t4corun/config.h b/users/t4corun/config.h index f75a094c..312fdd42 100644 --- a/users/t4corun/config.h +++ b/users/t4corun/config.h @@ -4,7 +4,10 @@ * - enable features specific to certain board (e.g. encoders, rgb, oled) * - a way to save memory on MCU * -* feature specific inclusions driven by rules.mk +* Pattern +* - This will hold config for features we force to be on +* - bring in additional configuration for features that can be enabled/disabled +* - clear and reset the setting */ #pragma once @@ -13,13 +16,18 @@ #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE + + //Clear variables we plan to use that might be set elsewhere #undef USB_POLLING_INTERVAL_MS //Set common configuration for all keyboards #define USB_POLLING_INTERVAL_MS 1 -//#include "_layouts.h" + + + + #include "config/tapping_config.h" #if defined(CAPS_WORD_ENABLE) diff --git a/users/t4corun/config/capsword_config.h b/users/t4corun/config/capsword_config.h index 86499cf6..72bd9581 100644 --- a/users/t4corun/config/capsword_config.h +++ b/users/t4corun/config/capsword_config.h @@ -1,11 +1,13 @@ #pragma once -/* -https://docs.qmk.fm/#/feature_caps_word - -Explore these -#undef BOTH_SHIFTS_TURNS_ON_CAPS_WORD -#undef CAPS_WORD_INVERT_ON_SHIFT +/* Caps Word +* +* https://docs.qmk.fm/#/feature_caps_word +* +* Explore these +* #undef BOTH_SHIFTS_TURNS_ON_CAPS_WORD +* #undef CAPS_WORD_INVERT_ON_SHIFT +* */ diff --git a/users/t4corun/config/combo_config.h b/users/t4corun/config/combo_config.h index 033e2d1d..64b67a1d 100644 --- a/users/t4corun/config/combo_config.h +++ b/users/t4corun/config/combo_config.h @@ -1,38 +1,9 @@ #pragma once -/* -https://docs.qmk.fm/#/feature_combo - -Explore these (there are way more) -#undef COMBO_MUST_PRESS_IN_ORDER -#undef COMBO_ONLY_FROM_LAYER +/* Combos +* +* https://docs.qmk.fm/#/feature_combo +* */ -//Clear variables we plan to use that might be set elsewhere -#undef COMBO_ONLY_FROM_LAYER -#undef EXTRA_SHORT_COMBOS - -#undef COMBO_TERM -#undef COMBO_TERM_PER_COMBO - -#undef COMBO_HOLD_TERM -#undef COMBO_MUST_HOLD_PER_COMBO - -#undef COMBO_MUST_TAP_PER_COMBO -#undef COMBO_MUST_PRESS_IN_ORDER_PER_COMBO -#undef COMBO_SHOULD_TRIGGER - - -//Set common configuration for all keyboards -#define COMBO_ONLY_FROM_LAYER 0 //this will always setup combos based off of QWERTY layout -#define EXTRA_SHORT_COMBOS - -#define COMBO_TERM 35 -#define COMBO_TERM_PER_COMBO - -#define COMBO_HOLD_TERM TAPPING_TERM -#define COMBO_MUST_HOLD_PER_COMBO - -#define COMBO_MUST_TAP_PER_COMBO -#define COMBO_MUST_PRESS_IN_ORDER_PER_COMBO -#define COMBO_SHOULD_TRIGGER \ No newline at end of file +s \ No newline at end of file diff --git a/users/t4corun/config/mouse_config.h b/users/t4corun/config/mouse_config.h index a002e6bf..57fd9287 100644 --- a/users/t4corun/config/mouse_config.h +++ b/users/t4corun/config/mouse_config.h @@ -1,36 +1,9 @@ #pragma once -/* -https://docs.qmk.fm/#/feature_mouse_keys - -Notes: -I am only putting down settings for accelerated mode - -Explore these: -#undef MOUSEKEY_MOVE_DELTA -#undef MOUSEKEY_WHEEL_DELAY -#undef MOUSEKEY_WHEEL_INTERVAL -#undef MOUSEKEY_WHEEL_MAX_SPEED -#undef MOUSEKEY_WHEEL_TIME_TO_MAX - -other modes: -- Accelerated (default): Holding movement keys accelerates the cursor until it reaches its maximum speed. -- Kinetic: Holding movement keys accelerates the cursor with its speed following a quadratic curve until it reaches its maximum speed. -- Constant: Holding movement keys moves the cursor at constant speeds. -- Combined: Holding movement keys accelerates the cursor until it reaches its maximum speed, but holding acceleration and movement keys simultaneously moves the cursor at constant speeds. -- Inertia: Cursor accelerates when key held, and decelerates after key release. Tracks X and Y velocity separately for more nuanced movements. Applies to cursor only, not scrolling. - - -https://docs.qmk.fm/#/feature_mouse_keys?id=accelerated-mode - -notes: -there are way more settings but I don't want to mess anything that Quentin set for the nano -I will only include stuff for auto mouse layer - -Explore These: -#undef AUTO_MOUSE_DELAY -#undef AUTO_MOUSE_DEBOUNCE -#undef AUTO_MOUSE_DEFAULT_LAYER +/* Mouse Key +* +* https://docs.qmk.fm/#/feature_mouse_keys +* */ //Clear variables we plan to use that might be set elsewhere diff --git a/users/t4corun/config/oled_config.h b/users/t4corun/config/oled_config.h index 0c525661..318165a7 100644 --- a/users/t4corun/config/oled_config.h +++ b/users/t4corun/config/oled_config.h @@ -1,7 +1,9 @@ #pragma once -/* -https://docs.qmk.fm/#/feature_oled_driver +/* OLED +* +* https://docs.qmk.fm/#/feature_oled_driver +* */ //Clear variables we plan to use that might be set elsewhere diff --git a/users/t4corun/config/rgbmatrix_config.h b/users/t4corun/config/rgbmatrix_config.h index e9517d48..5612f3e1 100644 --- a/users/t4corun/config/rgbmatrix_config.h +++ b/users/t4corun/config/rgbmatrix_config.h @@ -1,5 +1,11 @@ #pragma once +/* RGB Matrix +* +* https://docs.qmk.fm/#/feature_rgb_matrix +* +*/ + //Clear variables we plan to use that might be set elsewhere #undef RGB_MATRIX_SLEEP diff --git a/users/t4corun/config/split_config.h b/users/t4corun/config/split_config.h index 6fb24ca0..18df9e05 100644 --- a/users/t4corun/config/split_config.h +++ b/users/t4corun/config/split_config.h @@ -1,8 +1,9 @@ #pragma once -/* -https://docs.qmk.fm/#/feature_split_keyboard - +/* Split keyboard +* +* https://docs.qmk.fm/#/feature_split_keyboard +* */ #undef SPLIT_TRANSPORT_MIRROR diff --git a/users/t4corun/config/tapping_config.h b/users/t4corun/config/tapping_config.h index cd6ccf0e..bd25ddb8 100644 --- a/users/t4corun/config/tapping_config.h +++ b/users/t4corun/config/tapping_config.h @@ -1,8 +1,10 @@ #pragma once -/* -https://docs.qmk.fm/#/tap_hold -https://docs.qmk.fm/#/one_shot_keys +/* Tapping, Oneshot +* +* https://docs.qmk.fm/#/tap_hold +* https://docs.qmk.fm/#/one_shot_keys +* */ diff --git a/users/t4corun/features/encoder.c b/users/t4corun/features/encoder.c deleted file mode 100644 index d095058d..00000000 --- a/users/t4corun/features/encoder.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "encoder.h" - - - diff --git a/users/t4corun/features/encoder.h b/users/t4corun/features/encoder.h deleted file mode 100644 index 2a576cc3..00000000 --- a/users/t4corun/features/encoder.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "t4corun.h" \ No newline at end of file diff --git a/users/t4corun/features/mouse.c b/users/t4corun/features/mouse.c deleted file mode 100644 index 59e6a6d9..00000000 --- a/users/t4corun/features/mouse.c +++ /dev/null @@ -1 +0,0 @@ -#include "mouse.h" \ No newline at end of file diff --git a/users/t4corun/features/mouse.h b/users/t4corun/features/mouse.h deleted file mode 100644 index 2a576cc3..00000000 --- a/users/t4corun/features/mouse.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include "t4corun.h" \ No newline at end of file diff --git a/users/t4corun/features/rgbmatrix.c b/users/t4corun/features/rgbmatrix.c deleted file mode 100644 index 15a79ec3..00000000 --- a/users/t4corun/features/rgbmatrix.c +++ /dev/null @@ -1,101 +0,0 @@ -#include "rgbmatrix.h" - -/* -Achieves the following -- layer tap key indicator when we are in layer -- Caps lock and scroll lock indicators when activated -- mouse button backlight when in mouse layer -- modifier indicators when activated -- default layer indicator - -Really only for the charybdis nano, and even then I don't really look down at the -RGB -*/ - -bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max){ - - /* - uint8_t current_layer = get_highest_layer(layer_state); - uint8_t current_default_layer = get_highest_layer(default_layer_state); - uint8_t current_mod = get_mods(); - uint8_t current_osm = get_oneshot_mods(); - - switch(current_layer) { - - case _NAVIGATION: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_NAVIGATION, KEY_LAYER_COLOR); - break; - - case _NUMBER: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_NUMBER, KEY_LAYER_COLOR); - break; - - case _SYMBOL: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_SYMBOL_L, KEY_TRILAYER_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_SYMBOL_R, KEY_TRILAYER_COLOR); - break; - - case _FUNCTION: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_FUNCTION, KEY_TRILAYER_COLOR); - - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_DMACRO_R1, KEY_MACROREC_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_DMACRO_P1, KEY_MACROPLY_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_DMACRO_R2, KEY_MACROREC_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_DMACRO_P2, KEY_MACROPLY_COLOR); - break; - - case _MOUSE: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_MOUSE, KEY_LAYER_COLOR); - break; - - case _CONFIG: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_CONFIG, KEY_LAYER_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_RESET, KEY_RESET_COLOR); - - switch (current_default_layer) { - - case _DEFAULT_LAYER_1: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_QWERTY, KEY_DEFAULTLAYER_COLOR); - break; - - case _DEFAULT_LAYER_2: - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_COLEMAKDH, KEY_DEFAULTLAYER_COLOR); - break; - - } - break; - } - - if ( (current_mod | current_osm) & MOD_MASK_SHIFT ) { - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_SHIFT_T, MOD_SHIFT_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_SHIFT_L, MOD_SHIFT_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_SHIFT_R, MOD_SHIFT_COLOR); - } - - if ( (current_mod | current_osm) & MOD_MASK_CTRL ) { - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_CTRL_L, MOD_CTRL_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_CTRL_R, MOD_CTRL_COLOR); - } - - if ( (current_mod | current_osm) & MOD_MASK_ALT ) { - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_ALT_L, MOD_ALT_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_ALT_R, MOD_ALT_COLOR); - } - - if ( (current_mod | current_osm) & MOD_MASK_GUI ) { - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_GUI_L, MOD_GUI_COLOR); - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_GUI_R, MOD_GUI_COLOR); - } - - if ( host_keyboard_led_state().caps_lock || is_caps_word_on() ) { - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_CAPSLOCK, CAPSLOCK_COLOR); - } - - if ( host_keyboard_led_state().scroll_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(LED_SCRLOCK, SCROLLOCK_COLOR); - } - - */ - return false; - -} \ No newline at end of file diff --git a/users/t4corun/features/rgbmatrix.h b/users/t4corun/features/rgbmatrix.h deleted file mode 100644 index 9f773eb6..00000000 --- a/users/t4corun/features/rgbmatrix.h +++ /dev/null @@ -1,111 +0,0 @@ -#pragma once -#include "t4corun.h" - -/* -Color preview - -( 0, RGB_AZURE); -( 1, RGB_BLACK); -( 2, RGB_BLUE); -( 3, RGB_CHARTREUSE); -( 4, RGB_CORAL); -( 5, RGB_CYAN); -( 6, RGB_GOLD); -( 7, RGB_GOLDENROD); -( 8, RGB_GREEN); -( 9, RGB_MAGENTA); -( 10, RGB_ORANGE); -( 11, RGB_PINK); -( 14, RGB_PURPLE); -( 13, RGB_RED); -( 12, RGB_SPRINGGREEN); -( 32, RGB_TEAL); -( 29, RGB_TURQUOISE); -( 24, RGB_WHITE); -( 23, RGB_YELLOW); -*/ - - - -#define LAYER_NAVIGATION_COLOR RGB_AZURE -#define LAYER_SYMBOL_COLOR RGB_CYAN -#define LAYER_NUMBER_COLOR RGB_PURPLE -#define LAYER_MOUSE_COLOR RGB_CORAL -#define LAYER_CONFIG_COLOR RGB_GOLDENROD - -#define KEY_LAYER_COLOR RGB_AZURE -#define KEY_TRILAYER_COLOR RGB_PURPLE -#define KEY_DEFAULTLAYER_COLOR RGB_PURPLE -#define KEY_RESET_COLOR RGB_MAGENTA -#define KEY_MACROREC_COLOR RGB_PINK -#define KEY_MACROPLY_COLOR RGB_TURQUOISE - - -#define MOD_SHIFT_COLOR RGB_WHITE -#define MOD_CTRL_COLOR RGB_CORAL -#define MOD_ALT_COLOR RGB_PINK -#define MOD_GUI_COLOR RGB_GOLDENROD - -#define CAPSLOCK_COLOR RGB_WHITE -#define SCROLLOCK_COLOR RGB_WHITE - -//so we can send the predefined RGB colors without requiring separate RGB values -#define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) - -/* qmk_firmware\keyboards\bastardkb\charybdis\3x5\3x5.c - * ╭────────────────────╮ ╭────────────────────╮ - * 2 3 8 9 12 30 27 26 21 20 - * ├────────────────────┤ ├────────────────────┤ - * 1 4 7 10 13 31 28 25 22 19 - * ├────────────────────┤ ├────────────────────┤ - * 0 5 6 11 14 32 29 24 23 18 - * ╰────────────────────╯ ╰────────────────────╯ - * 15 16 17 33 34 XX - * ╰────────────╯ ╰────────────╯ - */ - -#if defined(KEYBOARD_bastardkb_charybdis_3x5) -//layers -# define LED_NUMBER 16 -# define LED_NAVIGATION 34 -# define LED_MOUSE 6 -# define LED_SYMBOL_L 16 -# define LED_SYMBOL_R 34 -# define LED_CONFIG 20 -# define LED_FUNCTION 9 - -//base layers -# define LED_QWERTY 17 -# define LED_COLEMAKDH 16 - -//indicators -# define LED_CAPSLOCK 31 -# define LED_SCRLOCK 13 - -//dynamic macros -# define LED_DMACRO_R1 34 -# define LED_DMACRO_P1 33 -# define LED_DMACRO_R2 3 -# define LED_DMACRO_P2 2 - -//shift keys -# define LED_SHIFT_T 17 -# define LED_SHIFT_L 10 -# define LED_SHIFT_R 28 - -//control keys -# define LED_CTRL_L 7 -# define LED_CTRL_R 25 - -//alt keys -# define LED_ALT_L 4 -# define LED_ALT_R 22 - -//GUI keys -# define LED_GUI_L 1 -# define LED_GUI_R 19 - -//Reset LED -# define LED_RESET 26 - -#endif \ No newline at end of file diff --git a/users/t4corun/rules.mk b/users/t4corun/rules.mk index 33821418..8ffe0eef 100644 --- a/users/t4corun/rules.mk +++ b/users/t4corun/rules.mk @@ -36,34 +36,17 @@ COMBO_ENABLE = yes # --------------------------------------------------------- # include my code that will be common across all my keyboards -SRC += \ - t4corun.c \ - features/tapping.c \ - features/taphold.c +SRC += \ + t4corun.c \ + features/tapping.c \ + features/taphold.c \ + features/capsword.c \ + +INTROSPECTION_KEYMAP_C += features/combo.c # --------------------------------------------------------- # include my code for enabled features for each keyboard -ifeq ($(strip $(CAPS_WORD_ENABLE)), yes) - SRC += features/capsword.c -endif - -ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) - SRC += features/rgbmatrix.c -endif - -ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) - SRC += features/mouse.c -endif - ifeq ($(strip $(OLED_ENABLE)), yes) SRC += features/oled.c -endif - -ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes) - SRC += features/encoder.c -endif - -ifeq ($(strip $(COMBO_ENABLE)), yes) - INTROSPECTION_KEYMAP_C += features/combo.c endif \ No newline at end of file