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
				
			
		| 
						 | 
				
			
			@ -25,9 +25,7 @@ enum layer_number {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
enum custom_keycodes {
 | 
			
		||||
  QWERTY = SAFE_RANGE,
 | 
			
		||||
  MACROPAD,
 | 
			
		||||
  FN,
 | 
			
		||||
  FN = SAFE_RANGE,
 | 
			
		||||
  ADJ,
 | 
			
		||||
  BACKLIT,
 | 
			
		||||
  RGBRST
 | 
			
		||||
| 
						 | 
				
			
			@ -37,7 +35,8 @@ enum macro_keycodes {
 | 
			
		|||
  KC_SAMPLEMACRO,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define QWERT PDF(_QWERTY)
 | 
			
		||||
#define MACROPAD PDF(_MACROPAD)
 | 
			
		||||
 | 
			
		||||
#define FN_ESC  LT(_FN, KC_ESC)
 | 
			
		||||
#define FN_CAPS  LT(_FN, KC_CAPS)
 | 
			
		||||
| 
						 | 
				
			
			@ -109,18 +108,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
  //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
 | 
			
		||||
 | 
			
		||||
  switch (keycode) {
 | 
			
		||||
    case QWERTY:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        set_single_persistent_default_layer(_QWERTY);
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case MACROPAD:
 | 
			
		||||
      if(record->event.pressed) {
 | 
			
		||||
        set_single_persistent_default_layer(_MACROPAD);
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case FN:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        //not sure how to have keyboard check mode and set it to a variable, so my work around
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,15 +17,16 @@ enum layer_number {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
enum custom_keycodes {
 | 
			
		||||
  QWERTY = SAFE_RANGE,
 | 
			
		||||
  COLEMAK,
 | 
			
		||||
  FN,
 | 
			
		||||
  FN = SAFE_RANGE,
 | 
			
		||||
  ADJ,
 | 
			
		||||
  RGBRST
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define FN_CAPS  LT(_FN, KC_CAPS)
 | 
			
		||||
 | 
			
		||||
#define QWERTY PDF(_QWERTY)
 | 
			
		||||
#define COLEMAK PDF(_COLEMAK)
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
  /*  / QWERTY \
 | 
			
		||||
   * /-----------------------------------------\  /-----------------------------------------\
 | 
			
		||||
| 
						 | 
				
			
			@ -131,16 +132,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		|||
 | 
			
		||||
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;
 | 
			
		||||
    case FN:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        layer_on(_FN);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,15 +17,16 @@ enum layer_number {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
enum custom_keycodes {
 | 
			
		||||
  QWERTY = SAFE_RANGE,
 | 
			
		||||
  COLEMAK,
 | 
			
		||||
  FN,
 | 
			
		||||
  FN = SAFE_RANGE,
 | 
			
		||||
  ADJ,
 | 
			
		||||
  RGBRST
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define FN_CAPS  LT(_FN, KC_CAPS)
 | 
			
		||||
 | 
			
		||||
#define QWERTY PDF(_QWERTY)
 | 
			
		||||
#define COLEMAK PDF(_COLEMAK)
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
  /*  / QWERTY \
 | 
			
		||||
   * /-----------------------------------------\  /-----------------------------------------\
 | 
			
		||||
| 
						 | 
				
			
			@ -131,16 +132,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		|||
 | 
			
		||||
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;
 | 
			
		||||
    case FN:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        layer_on(_FN);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue