[Keymap] Update based on massdrop/ctrl core changes n(#11134)
This commit is contained in:
		
							parent
							
								
									49b6c5fd83
								
							
						
					
					
						commit
						c4aae0e93b
					
				@ -23,5 +23,4 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
 | 
					#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
 | 
				
			||||||
#define RGB_MATRIX_STARTUP_VAL 100
 | 
					#define RGB_MATRIX_STARTUP_VAL 100
 | 
				
			||||||
#define RGB_BACKLIGHT_COLOR_1 RGB_BLUE
 | 
					#define HSV_BACKLIGHT_COLOR HSV_BLUE
 | 
				
			||||||
#define RGB_BACKLIGHT_COLOR_2 RGB_BLUE
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -16,11 +16,27 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include QMK_KEYBOARD_H
 | 
					#include QMK_KEYBOARD_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MODS_SHIFT  (get_mods() & MOD_MASK_SHIFT)
 | 
				
			||||||
 | 
					#define MODS_CTRL   (get_mods() & MOD_MASK_CTRL)
 | 
				
			||||||
 | 
					#define MODS_ALT    (get_mods() & MOD_MASK_ALT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum ctrl_keycodes {
 | 
					enum ctrl_keycodes {
 | 
				
			||||||
    U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect/Always Active
 | 
					    U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect/Always Active
 | 
				
			||||||
    U_T_AGCR,              // USB Toggle Automatic GCR control
 | 
					    U_T_AGCR,              // USB Toggle Automatic GCR control
 | 
				
			||||||
 | 
					    L_BRI = SAFE_RANGE,    // LED Brightness Increase
 | 
				
			||||||
 | 
					    L_BRD,                 // LED Brightness Decrease
 | 
				
			||||||
 | 
					    L_PTN,                 // LED Pattern Select Next
 | 
				
			||||||
 | 
					    L_PTP,                 // LED Pattern Select Previous
 | 
				
			||||||
 | 
					    L_PSI,                 // LED Pattern Speed Increase
 | 
				
			||||||
 | 
					    L_PSD,                 // LED Pattern Speed Decrease
 | 
				
			||||||
 | 
					    L_T_MD,                // LED Toggle Mode
 | 
				
			||||||
 | 
					    L_T_ONF,               // LED Toggle On / Off //Broken
 | 
				
			||||||
 | 
					    L_ON,                  // LED On              //Broken
 | 
				
			||||||
 | 
					    L_OFF,                 // LED Off             //Broken
 | 
				
			||||||
 | 
					    L_T_BR,                // LED Toggle Breath Effect
 | 
				
			||||||
 | 
					    L_T_PTD,               // LED Toggle Scrolling Pattern Direction
 | 
				
			||||||
    DBG_TOG,               // DEBUG Toggle On / Off
 | 
					    DBG_TOG,               // DEBUG Toggle On / Off
 | 
				
			||||||
    DBG_MTRX,              // DEBUG Toggle Matrix Prints
 | 
					    DBG_MTRX,              // DEBUG Toggle Matrix Print
 | 
				
			||||||
    DBG_KBD,               // DEBUG Toggle Keyboard Prints
 | 
					    DBG_KBD,               // DEBUG Toggle Keyboard Prints
 | 
				
			||||||
    DBG_MOU,               // DEBUG Toggle Mouse Prints
 | 
					    DBG_MOU,               // DEBUG Toggle Mouse Prints
 | 
				
			||||||
    MD_BOOT,               // Restart into bootloader after hold timeout
 | 
					    MD_BOOT,               // Restart into bootloader after hold timeout
 | 
				
			||||||
@ -38,31 +54,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			|||||||
    [1] = LAYOUT(
 | 
					    [1] = LAYOUT(
 | 
				
			||||||
        KC_EJCT, KC_F13,  KC_F14,  KC_F15,  KC_F16,  KC_F17,  KC_F18,  KC_F19,  KC_F20,  KC_F21,  KC_F22,  KC_F23,  KC_F24,             KC_MUTE, _______, _______,
 | 
					        KC_EJCT, KC_F13,  KC_F14,  KC_F15,  KC_F16,  KC_F17,  KC_F18,  KC_F19,  KC_F20,  KC_F21,  KC_F22,  KC_F23,  KC_F24,             KC_MUTE, _______, _______,
 | 
				
			||||||
        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,   KC_MPLY, KC_MSTP, KC_VOLU,
 | 
					        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,   KC_MPLY, KC_MSTP, KC_VOLU,
 | 
				
			||||||
        _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______,   KC_MPRV, KC_MNXT, KC_VOLD,
 | 
					        _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______,   KC_MPRV, KC_MNXT, KC_VOLD,
 | 
				
			||||||
        KC_CAPS, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______,
 | 
					        KC_CAPS, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______,
 | 
				
			||||||
        _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______,                              KC_BRIU,
 | 
					        _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______,                              KC_BRIU,
 | 
				
			||||||
        _______, _______, _______,                   _______,                            _______, _______, _______, _______,            KC_MRWD, KC_BRID, KC_MFFD
 | 
					        _______, _______, _______,                   _______,                            _______, _______, _______, _______,            KC_MRWD, KC_BRID, KC_MFFD
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Runs just one time when the keyboard initializes.
 | 
					// Init keyboard static color with underglow off.
 | 
				
			||||||
void matrix_init_user(void) {
 | 
					void matrix_init_user(void) {
 | 
				
			||||||
  // https://old.reddit.com/r/MechanicalKeyboards/comments/by8zv9/editing_rgb_backlighting_with_qmk/
 | 
					  rgblight_sethsv(HSV_BACKLIGHT_COLOR);
 | 
				
			||||||
  // https://docs.qmk.fm/#/feature_rgblight?id=colors
 | 
					  rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
 | 
				
			||||||
  rgblight_sethsv(HSV_BLUE);
 | 
					 | 
				
			||||||
  // Disable underglow by default
 | 
					 | 
				
			||||||
  rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
 | 
					 | 
				
			||||||
  rgb_matrix_set_color_all(0, 0, 0);
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Runs constantly in the background, in a loop.
 | 
					// Runs constantly in the background, in a loop.
 | 
				
			||||||
void matrix_scan_user(void) {
 | 
					void matrix_scan_user(void) {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MODS_SHIFT  (get_mods() & MOD_MASK_SHIFT)
 | 
					 | 
				
			||||||
#define MODS_CTRL   (get_mods() & MOD_MASK_CTRL)
 | 
					 | 
				
			||||||
#define MODS_ALT    (get_mods() & MOD_MASK_ALT)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
					bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
    static uint32_t key_timer;
 | 
					    static uint32_t key_timer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -110,13 +118,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
				
			|||||||
            if (record->event.pressed) {
 | 
					            if (record->event.pressed) {
 | 
				
			||||||
              switch (rgb_matrix_get_flags()) {
 | 
					              switch (rgb_matrix_get_flags()) {
 | 
				
			||||||
                case LED_FLAG_ALL: {
 | 
					                case LED_FLAG_ALL: {
 | 
				
			||||||
                    rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
 | 
					                    rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
 | 
				
			||||||
                    rgb_matrix_set_color_all(0, 0, 0);
 | 
					                    rgb_matrix_set_color_all(RGB_OFF);
 | 
				
			||||||
                  }
 | 
					                  }
 | 
				
			||||||
                  break;
 | 
					                  break;
 | 
				
			||||||
                case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
 | 
					                case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): {
 | 
				
			||||||
                    rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
 | 
					                    rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
 | 
				
			||||||
                    rgb_matrix_set_color_all(0, 0, 0);
 | 
					                    rgb_matrix_set_color_all(RGB_OFF);
 | 
				
			||||||
                  }
 | 
					                  }
 | 
				
			||||||
                  break;
 | 
					                  break;
 | 
				
			||||||
                case LED_FLAG_UNDERGLOW: {
 | 
					                case LED_FLAG_UNDERGLOW: {
 | 
				
			||||||
 | 
				
			|||||||
@ -18,16 +18,11 @@ in-game overlay keys.
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
### Function Layer
 | 
					### Function Layer
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Purple: Media keys. Note CD Eject on Escape, and OSX Prev/Next on Arrows.
 | 
					* Purple: Media keys. Note CD Eject on Escape, and OSX Prev/Next on Arrows.
 | 
				
			||||||
* Blue: Keyboard adminstration. Toggle NKRO (N Key Rollover) and enable bootloader.
 | 
					* Blue: Keyboard adminstration. Toggle NKRO (N Key Rollover) and enable bootloader.
 | 
				
			||||||
* Orange: RGB Controls.
 | 
					* Orange: RGB Controls.
 | 
				
			||||||
* Red: Danger can break things! USB autodetect (always on) and USB GCR Auto control. 
 | 
					 | 
				
			||||||
* Capslock: Now requires the use of the function key.
 | 
					* Capslock: Now requires the use of the function key.
 | 
				
			||||||
* F13-F14: Extended function keys.
 | 
					* F13-F24: Extended function keys.
 | 
				
			||||||
* Bright+/-: Monitor Brightness.
 | 
					* Bright+/-: Monitor Brightness.
 | 
				
			||||||
 | 
					 | 
				
			||||||
## GCR
 | 
					 | 
				
			||||||
GCR is the Global Current Register. Holds the value for current delivered to the LEDs, it's 165
 | 
					 | 
				
			||||||
default and has range 0-255. This should be auto managed.
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user