mirror of
				https://github.com/qmk/qmk_userspace.git
				synced 2025-11-03 18:30:07 -05:00 
			
		
		
		
	Finalisation
This commit is contained in:
		
					parent
					
						
							
								af19532ac6
							
						
					
				
			
			
				commit
				
					
						fd3b08829d
					
				
			
		
					 3 changed files with 31 additions and 29 deletions
				
			
		| 
						 | 
					@ -37,30 +37,30 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
                del_weak_mods(MOD_MASK_SHIFT);
 | 
					                del_weak_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
                del_oneshot_mods(MOD_MASK_SHIFT);
 | 
					                del_oneshot_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
                unregister_mods(MOD_MASK_SHIFT);
 | 
					                unregister_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                tap_code(PG_ODK);
 | 
					                tap_code(PG_ODK);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                set_oneshot_mods(MOD_BIT(KC_LSFT));     // Don't use weak mods !
 | 
					                set_oneshot_mods(MOD_BIT(KC_LSFT));     // Don't use weak mods !
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            if (IS_LAYER_ON(_ODK)) {
 | 
					 | 
				
			||||||
                switch (keycode) {
 | 
					 | 
				
			||||||
                    //case PG_3PTS:   // For Clever Keys
 | 
					 | 
				
			||||||
                    case PG_PVIR:
 | 
					 | 
				
			||||||
                    case PG_AROB:
 | 
					 | 
				
			||||||
                    case PG_K:
 | 
					 | 
				
			||||||
                    case PG_B:
 | 
					 | 
				
			||||||
                    case PG_APOS:
 | 
					 | 
				
			||||||
                    case OU_GRV:
 | 
					 | 
				
			||||||
                    case KC_SPC:    // When space is added by Clever Keys
 | 
					 | 
				
			||||||
                    case CNL_ODK:
 | 
					 | 
				
			||||||
                        break;
 | 
					 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
                    default:
 | 
					        } else if (IS_LAYER_ON(_ODK)) {
 | 
				
			||||||
                        // Don't use tap_code, it doesn't go through process_record.
 | 
					            switch (keycode) {
 | 
				
			||||||
                        // therefore it doesn't trigger the special behaviour of PG_ODK described above
 | 
					                //case PG_3PTS:   // For Clever Keys
 | 
				
			||||||
                        invoke_key(PG_ODK, record);
 | 
					                case PG_PVIR:
 | 
				
			||||||
                }
 | 
					                case PG_AROB:
 | 
				
			||||||
 | 
					                case PG_K:
 | 
				
			||||||
 | 
					                case PG_B:
 | 
				
			||||||
 | 
					                case PG_APOS:
 | 
				
			||||||
 | 
					                case OU_GRV:
 | 
				
			||||||
 | 
					                case KC_SPC:    // When space is added by Clever Keys
 | 
				
			||||||
 | 
					                case CNL_ODK:
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					                default:
 | 
				
			||||||
 | 
					                    // Don't use tap_code, it doesn't go through process_record.
 | 
				
			||||||
 | 
					                    // therefore it doesn't trigger the special behaviour of PG_ODK described above
 | 
				
			||||||
 | 
					                    invoke_key(PG_ODK, record);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -252,9 +252,10 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
 | 
				
			||||||
  uint8_t mods = get_mods() | get_weak_mods() | get_oneshot_mods();
 | 
					  uint8_t mods = get_mods() | get_weak_mods() | get_oneshot_mods();
 | 
				
			||||||
  //if (keycode == OS_ODK && (mods & ~(MOD_MASK_SHIFT | MOD_BIT(KC_ALGR)))) { return true; }
 | 
					  //if (keycode == OS_ODK && (mods & ~(MOD_MASK_SHIFT | MOD_BIT(KC_ALGR)))) { return true; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (keycode == OS_ODK && (mods & ~MOD_BIT(KC_ALGR))) { return true; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
 | 
					    case OS_ODK:
 | 
				
			||||||
 | 
					      if (mods & ~MOD_BIT(KC_ALGR)) { return true; }
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
    //case OS_ODK:  /!\ A ne pas remettre, sous peine de ne pas pouvoir faire shift + typo + touche de l'autre côté
 | 
					    //case OS_ODK:  /!\ A ne pas remettre, sous peine de ne pas pouvoir faire shift + typo + touche de l'autre côté
 | 
				
			||||||
    case L_OS4A:
 | 
					    case L_OS4A:
 | 
				
			||||||
    case R_OS4A:
 | 
					    case R_OS4A:
 | 
				
			||||||
| 
						 | 
					@ -267,11 +268,11 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
 | 
				
			||||||
    case NUMWORD:
 | 
					    case NUMWORD:
 | 
				
			||||||
    case TG_FA:
 | 
					    case TG_FA:
 | 
				
			||||||
    //case OS_WMNT:
 | 
					    //case OS_WMNT:
 | 
				
			||||||
    //case NUM_ODK:  // Ne sert à rien, car NUM_ODK est un vrai one-shot : les mods sont transmis même sans paramétrage.
 | 
					      return true;
 | 
				
			||||||
        return true;
 | 
					/*     default:
 | 
				
			||||||
    default:
 | 
					      return false; */
 | 
				
			||||||
        return false;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -228,10 +228,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 *                        `----------------------------------'  `----------------------------------'
 | 
					 *                        `----------------------------------'  `----------------------------------'
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_NUMBERS] = LAYOUT(
 | 
					    [_NUMBERS] = LAYOUT(
 | 
				
			||||||
       _______, PG_DLR,  PG_MOIN, PG_PLUS, PG_EURO, PG_PERC,                                      PG_EXP,  _______, PG_EGAL, PG_ASTX, _______, _______,
 | 
					      // S(KC_4), S(KC_3) and S(PG_EGAL) are here to give easy access to ⅔, ¾ and ≠.
 | 
				
			||||||
       _______, KC_4,    KC_3,    KC_2,    MT_1,    PG_2PTS,                                      PG_IND,  MT_SLSH, KC_6,    KC_7,    KC_8,    _______,
 | 
					       _______, PG_DLR,  PG_MOIN, PG_PLUS, PG_EURO, PG_PERC,                                      PG_EXP,  S(PG_EGAL), PG_EGAL, PG_ASTX, _______, _______,
 | 
				
			||||||
       _______, _______, _______, PG_H,    KC_5,    _______, _______, _______,  _______, _______, _______, KC_9,    PG_DEG,  _______, PG_ODK,  _______,
 | 
					       _______, KC_4,    KC_3,    KC_2,    MT_1,    PG_2PTS,                                      PG_IND,  MT_SLSH,    KC_6,    KC_7,    KC_8,    _______,
 | 
				
			||||||
                                  _______, _______, KC_PDOT, KC_0   , LT_NBSPC, _______, KC_SPC,  _______, _______, _______
 | 
					       _______, S(KC_4), S(KC_3), PG_H,    KC_5,    _______, _______, _______,  _______, _______, _______, KC_9,       PG_DEG,  _______, PG_ODK,  _______,
 | 
				
			||||||
 | 
					                                  _______, _______, KC_PDOT, KC_0   , LT_NBSPC, _______, KC_SPC,  _______, _______,    _______
 | 
				
			||||||
     ),
 | 
					     ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue