Update keymaps to use PDF keycode (#24633)
This commit is contained in:
		
							parent
							
								
									4a5bae51cd
								
							
						
					
					
						commit
						e4e015c0c8
					
				
					 80 changed files with 286 additions and 1705 deletions
				
			
		| 
						 | 
				
			
			@ -8,14 +8,12 @@ enum layer_names {
 | 
			
		|||
  _ADJUST,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum custom_keycodes {
 | 
			
		||||
  QWERTY = SAFE_RANGE,
 | 
			
		||||
  COLEMAK,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define LOWER MO(_LOWER)
 | 
			
		||||
#define RAISE MO(_RAISE)
 | 
			
		||||
 | 
			
		||||
#define QWERTY PDF(_QWERTY)
 | 
			
		||||
#define COLEMAK PDF(_COLEMAK)
 | 
			
		||||
 | 
			
		||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
 | 
			
		||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
 | 
			
		||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
 | 
			
		||||
| 
						 | 
				
			
			@ -65,19 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
layer_state_t layer_state_set_user(layer_state_t state) {
 | 
			
		||||
  return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
  switch (keycode) {
 | 
			
		||||
    case QWERTY:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        set_single_persistent_default_layer(_QWERTY);
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
    case COLEMAK:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        set_single_persistent_default_layer(_COLEMAK);
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
  }
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue