CTRL and ALT updates
Added support to enter bootloader from software (bootloader version must be newer than "v2.18Jun 22 2018 17:28:08" until workaround for older is created). Updated CTRL and ALT keymaps for entering bootloader with Fn+b held for >500ms. Added basic MacOS keymap for ALT. USB sleep LED indicator now turns off after 1 second. Slowed down debug LED code printing.
This commit is contained in:
		
							parent
							
								
									73a3399d0e
								
							
						
					
					
						commit
						e5465e1c57
					
				
					 7 changed files with 290 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -19,6 +19,7 @@ enum ctrl_keycodes {
 | 
			
		|||
    DBG_MTRX,           //DEBUG Toggle Matrix Prints
 | 
			
		||||
    DBG_KBD,            //DEBUG Toggle Keyboard Prints
 | 
			
		||||
    DBG_MOU,            //DEBUG Toggle Mouse Prints
 | 
			
		||||
    MD_BOOT,            //Restart into bootloader after hold timeout
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
 | 
			
		||||
| 
						 | 
				
			
			@ -71,6 +72,8 @@ void matrix_scan_user(void) {
 | 
			
		|||
#define MODS_ALT  (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT))
 | 
			
		||||
 | 
			
		||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
    static uint32_t key_timer;
 | 
			
		||||
 | 
			
		||||
    switch (keycode) {
 | 
			
		||||
        case L_BRI:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
| 
						 | 
				
			
			@ -197,6 +200,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
                CDC_print("\r\n");
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        case MD_BOOT:
 | 
			
		||||
            if (record->event.pressed) {
 | 
			
		||||
                key_timer = timer_read32();
 | 
			
		||||
            } else {
 | 
			
		||||
                if (timer_elapsed32(key_timer) >= 500) {
 | 
			
		||||
                    reset_keyboard();
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return false;
 | 
			
		||||
        default:
 | 
			
		||||
            return true; //Process all other keycodes normally
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue