mirror of
				https://github.com/qmk/qmk_userspace.git
				synced 2025-11-04 02:40:06 -05:00 
			
		
		
		
	NUM_ODK
This commit is contained in:
		
					parent
					
						
							
								033a8ce672
							
						
					
				
			
			
				commit
				
					
						191a0bb949
					
				
			
		
					 20 changed files with 267 additions and 251 deletions
				
			
		| 
						 | 
					@ -22,6 +22,7 @@
 | 
				
			||||||
void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
					void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  uint16_t prev_keycode = recent[RECENT_SIZE - 1];
 | 
					  uint16_t prev_keycode = recent[RECENT_SIZE - 1];
 | 
				
			||||||
 | 
					  //static bool is_shifted = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Inversion du point et de la virgule
 | 
					    // Inversion du point et de la virgule
 | 
				
			||||||
    static bool inversion = false;
 | 
					    static bool inversion = false;
 | 
				
			||||||
| 
						 | 
					@ -43,7 +44,11 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
    apostrophe = false;
 | 
					    apostrophe = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Apostrophe
 | 
					    // Apostrophe
 | 
				
			||||||
    switch (*next_keycode) {
 | 
					    if (is_followed_by_apos(*next_keycode, prev_keycode)) {
 | 
				
			||||||
 | 
					      set_last_keycode(PG_APOS);
 | 
				
			||||||
 | 
					      apostrophe = true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					/*     switch (*next_keycode) {
 | 
				
			||||||
      case PG_Q:
 | 
					      case PG_Q:
 | 
				
			||||||
        set_last_keycode(PG_APOS);
 | 
					        set_last_keycode(PG_APOS);
 | 
				
			||||||
        apostrophe = true;
 | 
					        apostrophe = true;
 | 
				
			||||||
| 
						 | 
					@ -57,15 +62,15 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      case PG_M:
 | 
					      case PG_M:
 | 
				
			||||||
      case PG_Y:
 | 
					      case PG_Y:
 | 
				
			||||||
      case PG_J:
 | 
					      case PG_J:
 | 
				
			||||||
        //if (!isLetter(prev_keycode)) { set_last_keycode(PG_APOS); }
 | 
					        //if (!is_letter(prev_keycode)) { set_last_keycode(PG_APOS); }
 | 
				
			||||||
        if (!isLetter(prev_keycode)) {
 | 
					        if (!is_letter(prev_keycode)) {
 | 
				
			||||||
          set_last_keycode(PG_APOS);
 | 
					          set_last_keycode(PG_APOS);
 | 
				
			||||||
          apostrophe = true;
 | 
					          apostrophe = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    } */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (isLetter(*next_keycode) || isSendStringMacro(*next_keycode)) {
 | 
					    if (is_letter(*next_keycode) || is_send_string_macro(*next_keycode)) {
 | 
				
			||||||
      switch (prev_keycode) {
 | 
					      switch (prev_keycode) {
 | 
				
			||||||
          case PG_EXCL:
 | 
					          case PG_EXCL:
 | 
				
			||||||
          case PG_QUES:
 | 
					          case PG_QUES:
 | 
				
			||||||
| 
						 | 
					@ -73,7 +78,13 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          case PG_2PTS:
 | 
					          case PG_2PTS:
 | 
				
			||||||
            // Add space between punctuation and letters.
 | 
					            // Add space between punctuation and letters.
 | 
				
			||||||
            invoke_key(KC_SPC, record);
 | 
					            invoke_key(KC_SPC, record);
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            if (is_followed_by_apos(*next_keycode, prev_keycode)) {
 | 
				
			||||||
 | 
					              set_last_keycode(PG_APOS);
 | 
				
			||||||
 | 
					              apostrophe = true;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
              set_last_keycode(*next_keycode);
 | 
					              set_last_keycode(*next_keycode);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          case KC_SPC:
 | 
					          case KC_SPC:
 | 
				
			||||||
            switch (recent[RECENT_SIZE - 2]) {
 | 
					            switch (recent[RECENT_SIZE - 2]) {
 | 
				
			||||||
| 
						 | 
					@ -105,37 +116,25 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          set_last_keycode(*next_keycode);
 | 
					          set_last_keycode(*next_keycode);
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Raccourci pour "quelq"
 | 
					        // Raccourci pour "quoi"
 | 
				
			||||||
/*         case PG_Q:
 | 
					        case PG_H:
 | 
				
			||||||
          process_word((uint16_t[]) {PG_U, PG_E, PG_L}, 3, record);
 | 
					 | 
				
			||||||
          break; */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // Raccourci pour "quoi", ça évite un aller-retour sur la main gauche.
 | 
					 | 
				
			||||||
        case PG_Z:
 | 
					 | 
				
			||||||
          finish_word((uint16_t[]) {PG_U, PG_O, PG_I}, 3, next_keycode, record);
 | 
					          finish_word((uint16_t[]) {PG_U, PG_O, PG_I}, 3, next_keycode, record);
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Raccourci pour "quand"
 | 
					        // Raccourci pour "quand"
 | 
				
			||||||
        case PG_D:
 | 
					        case PG_N:
 | 
				
			||||||
          process_word((uint16_t[]) {PG_U, PG_A, PG_N}, 3, record);
 | 
					          return finish_word((uint16_t[]) {PG_U, PG_A, PG_N, PG_D}, 4, next_keycode, record);
 | 
				
			||||||
          set_last_keycode(*next_keycode);
 | 
					 | 
				
			||||||
          break;
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case PG_P:
 | 
					    case PG_P:
 | 
				
			||||||
      switch (*next_keycode) {        
 | 
					      switch (*next_keycode) {        
 | 
				
			||||||
 | 
					 | 
				
			||||||
        case PG_M:
 | 
					 | 
				
			||||||
          // "par"
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_A, PG_R}, 2, next_keycode, record);
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        case PG_C:
 | 
					        case PG_C:
 | 
				
			||||||
          // "pas"
 | 
					          // "pas"
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_A, PG_S}, 2, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_A, PG_S}, 2, next_keycode, record);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        case PG_J:
 | 
					        case PG_J:
 | 
				
			||||||
          if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
					          if (!is_letter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
            // "pour"
 | 
					            // "pour"
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_O, PG_U, PG_R}, 3, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_O, PG_U, PG_R}, 3, next_keycode, record);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
| 
						 | 
					@ -155,17 +154,29 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
    case PG_EXCL:
 | 
					    case PG_EXCL:
 | 
				
			||||||
      // On ajoute un espace insécable s'il n'a pas été entré avant le point d'exclamation.
 | 
					      // On ajoute un espace insécable s'il n'a pas été entré avant le point d'exclamation.
 | 
				
			||||||
      // Il ne faut pas tester cette fonctionnalité avec Word, qui ajoute cet espace automatiquement.
 | 
					      // Il ne faut pas tester cette fonctionnalité avec Word, qui ajoute cet espace automatiquement.
 | 
				
			||||||
      if (isLetter(recent[RECENT_SIZE - 1])) {
 | 
					      if (is_letter(recent[RECENT_SIZE - 1])) {
 | 
				
			||||||
        invoke_key(KC_SPC, record);
 | 
					        invoke_key(KC_SPC, record);
 | 
				
			||||||
        return replace_ongoing_key(*next_keycode, next_keycode, record);
 | 
					        return replace_ongoing_key(*next_keycode, next_keycode, record);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case MAGIC:
 | 
					    case MAGIC:
 | 
				
			||||||
/*       if (!isLetter(prev_keycode)) {
 | 
					      if (!is_letter(prev_keycode)) {
 | 
				
			||||||
          // "je"
 | 
					          // "à"
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_J, PG_E}, 2, next_keycode, record);
 | 
					          bool is_shifted = (get_mods() | get_weak_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT;
 | 
				
			||||||
      } */
 | 
					          if (is_shifted) {
 | 
				
			||||||
 | 
					              del_weak_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					              del_oneshot_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					              unregister_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          process_key(PG_ODK,record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if (is_shifted) {
 | 
				
			||||||
 | 
					              //is_shifted = false;
 | 
				
			||||||
 | 
					              set_oneshot_mods(MOD_BIT(KC_LSFT));
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          return replace_ongoing_key(PG_A, next_keycode, record);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      switch (prev_keycode) {
 | 
					      switch (prev_keycode) {
 | 
				
			||||||
        case PG_O:
 | 
					        case PG_O:
 | 
				
			||||||
| 
						 | 
					@ -173,7 +184,7 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          invoke_key(PG_U, record);
 | 
					          invoke_key(PG_U, record);
 | 
				
			||||||
        case PG_U:
 | 
					        case PG_U:
 | 
				
			||||||
          // ui SFB
 | 
					          // ui SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_I, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_I, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_L:
 | 
					        case PG_L:
 | 
				
			||||||
| 
						 | 
					@ -182,40 +193,49 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_EACU:
 | 
					        case PG_EACU:
 | 
				
			||||||
          // éa SFB
 | 
					          // éa SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_A, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_A, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_S:
 | 
					        case PG_S:
 | 
				
			||||||
          // sc SFB
 | 
					          // sc SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_C, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_C, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_C:
 | 
					        case PG_C:
 | 
				
			||||||
          // cs SFB
 | 
					          // cs SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_S, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_S, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_N:
 | 
					        case PG_N:
 | 
				
			||||||
          // n. SFB
 | 
					          // n. SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_POIN, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_POIN, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_P:
 | 
					        case PG_P:
 | 
				
			||||||
          // ph SFB
 | 
					          // ph SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_H, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_H, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_G:
 | 
				
			||||||
 | 
					          // gt SFB
 | 
				
			||||||
 | 
					          //bkspc_countdown = 0;
 | 
				
			||||||
 | 
					          return replace_ongoing_key(PG_T, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_Q:
 | 
					        case PG_Q:
 | 
				
			||||||
          // qué scissor
 | 
					          // qué scissor
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_U, PG_EACU}, 2, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_U, PG_EACU}, 2, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_Y:
 | 
				
			||||||
 | 
					          // you bad redirection
 | 
				
			||||||
 | 
					          return finish_word((uint16_t[]) {PG_O, PG_U}, 2, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_T:
 | 
					        case PG_T:
 | 
				
			||||||
          invoke_key(PG_I, record);
 | 
					          invoke_key(PG_I, record);
 | 
				
			||||||
        case PG_I:
 | 
					        case PG_I:
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_O, PG_N}, 2, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_O, PG_N}, 2, next_keycode, record);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        case PG_M:
 | 
					        case PG_M:
 | 
				
			||||||
          if (isLetter(recent[RECENT_SIZE - 2])) {
 | 
					          if (is_letter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
            // "ment"
 | 
					            // "ment"
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_E, PG_N, PG_T}, 3, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_E, PG_N, PG_T}, 3, next_keycode, record);
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
| 
						 | 
					@ -224,16 +244,19 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_B:
 | 
					        case PG_B:
 | 
				
			||||||
          // "b@" -> "beaucoup"
 | 
					          // "beaucoup"
 | 
				
			||||||
          //layer_off(_ODK);
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_E, PG_A, PG_U, PG_C, PG_O, PG_U, PG_P}, 7, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_E, PG_A, PG_U, PG_C, PG_O, PG_U, PG_P}, 7, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_D:
 | 
				
			||||||
 | 
					          // "déjà"
 | 
				
			||||||
 | 
					          return finish_word((uint16_t[]) {PG_EACU, PG_J, PG_ODK, PG_A}, 4, next_keycode, record);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
          return;
 | 
					          return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case PG_AROB:
 | 
					    case PG_AROB:
 | 
				
			||||||
      if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
					      if (!is_letter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
        switch (prev_keycode) {
 | 
					        switch (prev_keycode) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          case PG_P:
 | 
					          case PG_P:
 | 
				
			||||||
| 
						 | 
					@ -244,18 +267,7 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          case PG_A:
 | 
					          case PG_A:
 | 
				
			||||||
            // "a@" -> "aujourd'hui"
 | 
					            // "a@" -> "aujourd'hui"
 | 
				
			||||||
            layer_off(_ODK);
 | 
					            layer_off(_ODK);
 | 
				
			||||||
            apostrophe = true;
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_U, PG_J, PG_O, PG_U, PG_R, PG_D, PG_APOS, PG_H, PG_U, PG_I}, 10, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_U, PG_J, PG_O, PG_U, PG_R, PG_D, PG_APOS, PG_H, PG_U, PG_I}, 10, next_keycode, record);
 | 
				
			||||||
          
 | 
					 | 
				
			||||||
/*           case PG_B:
 | 
					 | 
				
			||||||
            // "b@" -> "beaucoup"
 | 
					 | 
				
			||||||
            layer_off(_ODK);
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_E, PG_A, PG_U, PG_C, PG_O, PG_U, PG_P}, 7, next_keycode, record); */
 | 
					 | 
				
			||||||
          
 | 
					 | 
				
			||||||
          case PG_D:
 | 
					 | 
				
			||||||
            // "d@" -> "déjà"
 | 
					 | 
				
			||||||
            layer_off(_ODK);
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_EACU, PG_J, PG_ODK, PG_A}, 4, next_keycode, record);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
| 
						 | 
					@ -268,6 +280,14 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case PG_H:
 | 
				
			||||||
 | 
					      if (prev_keycode == PG_M) {
 | 
				
			||||||
 | 
					        // "mh" -> "mb"
 | 
				
			||||||
 | 
					        bkspc_countdown = 0;
 | 
				
			||||||
 | 
					        return replace_ongoing_key(PG_B, next_keycode, record);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     case PG_R:
 | 
					/*     case PG_R:
 | 
				
			||||||
      if (prev_keycode == PG_L) {
 | 
					      if (prev_keycode == PG_L) {
 | 
				
			||||||
          // "lr" -> "l" + 1DK
 | 
					          // "lr" -> "l" + 1DK
 | 
				
			||||||
| 
						 | 
					@ -276,24 +296,6 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break; */
 | 
					      break; */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     case PG_A:
 | 
					 | 
				
			||||||
      //if (prev_keycode == PG_O && !isCaps) {
 | 
					 | 
				
			||||||
      if (prev_keycode == PG_O) {
 | 
					 | 
				
			||||||
        // "oa" -> "oi"
 | 
					 | 
				
			||||||
        bkspc_countdown = 0;
 | 
					 | 
				
			||||||
        return replace_ongoing_key(PG_I, next_keycode, record);
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    case PG_I:
 | 
					 | 
				
			||||||
      //if (prev_keycode == PG_O && !isCaps && recent[RECENT_SIZE - 3] != PG_Q) {
 | 
					 | 
				
			||||||
      if (prev_keycode == PG_O && recent[RECENT_SIZE - 3] != PG_Q) {
 | 
					 | 
				
			||||||
        // "oi" -> "oa", for "keyboard"
 | 
					 | 
				
			||||||
        bkspc_countdown = 0;
 | 
					 | 
				
			||||||
        return replace_ongoing_key(PG_A, next_keycode, record);
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      break; */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    case OU_GRV:
 | 
					    case OU_GRV:
 | 
				
			||||||
      layer_off(_ODK);
 | 
					      layer_off(_ODK);
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_O, PG_ODK, PG_N}, 3, next_keycode, record);
 | 
					      return finish_word((uint16_t[]) {PG_O, PG_ODK, PG_N}, 3, next_keycode, record);
 | 
				
			||||||
| 
						 | 
					@ -306,19 +308,9 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      layer_off(_ODK);
 | 
					      layer_off(_ODK);
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_J, PG_APOS}, 2, next_keycode, record); */
 | 
					      return finish_word((uint16_t[]) {PG_J, PG_APOS}, 2, next_keycode, record); */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     case L_APOS:
 | 
					 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_L, PG_APOS}, 2, next_keycode, record);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    case D_APOS:
 | 
					 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_D, PG_APOS}, 2, next_keycode, record); */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    case PG_APOS:
 | 
					    case PG_APOS:
 | 
				
			||||||
      if (is_apos_dr) { return replace_ongoing_key(PG_APOD, next_keycode, record); }
 | 
					      if (is_apos_dr) { return replace_ongoing_key(PG_APOD, next_keycode, record); }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					 | 
				
			||||||
/*     case AGRV_SPC:
 | 
					 | 
				
			||||||
      layer_off(_ODK);
 | 
					 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_AGR, KC_SPC}, 2, next_keycode, record); */
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
    uint16_t prev_keycode = recent[RECENT_SIZE - 1];
 | 
					    uint16_t prev_keycode = recent[RECENT_SIZE - 1];
 | 
				
			||||||
    //const uint8_t mods = get_mods();
 | 
					    //const uint8_t mods = get_mods();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (isLetter(next_keycode) || next_keycode == E_CIRC) {
 | 
					    if (is_letter(next_keycode) || next_keycode == E_CIRC) {
 | 
				
			||||||
      switch (prev_keycode) {
 | 
					      switch (prev_keycode) {
 | 
				
			||||||
          case PG_EXCL:
 | 
					          case PG_EXCL:
 | 
				
			||||||
          case PG_QUES:
 | 
					          case PG_QUES:
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    } else if (next_keycode == PG_AROB && !isLetter(recent[RECENT_SIZE - 2])) {
 | 
					    } else if (next_keycode == PG_AROB && !is_letter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
        switch (prev_keycode) {
 | 
					        switch (prev_keycode) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          case PG_N:
 | 
					          case PG_N:
 | 
				
			||||||
| 
						 | 
					@ -106,7 +106,7 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_A, PG_R}, 2, record);
 | 
					            return finish_word((uint16_t[]) {PG_A, PG_R}, 2, record);
 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          case PG_X:
 | 
					          case PG_X:
 | 
				
			||||||
            if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
					            if (!is_letter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
              // "pour"
 | 
					              // "pour"
 | 
				
			||||||
              return finish_word((uint16_t[]) {PG_O, PG_L, PG_R}, 3, record);
 | 
					              return finish_word((uint16_t[]) {PG_O, PG_L, PG_R}, 3, record);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -129,7 +129,7 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
      case PG_EXCL:
 | 
					      case PG_EXCL:
 | 
				
			||||||
        // On ajoute un espace insécable s'il n'a pas été entré avant le point d'exclamation.
 | 
					        // On ajoute un espace insécable s'il n'a pas été entré avant le point d'exclamation.
 | 
				
			||||||
        // Il ne faut pas tester cette fonctionnalité avec Word, qui ajoute cet espace automatiquement.
 | 
					        // Il ne faut pas tester cette fonctionnalité avec Word, qui ajoute cet espace automatiquement.
 | 
				
			||||||
        if (isLetter(recent[RECENT_SIZE - 1])) {
 | 
					        if (is_letter(recent[RECENT_SIZE - 1])) {
 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          if ((mods | get_oneshot_mods() | get_weak_mods()) & MOD_MASK_SHIFT) {
 | 
					          if ((mods | get_oneshot_mods() | get_weak_mods()) & MOD_MASK_SHIFT) {
 | 
				
			||||||
            del_weak_mods(MOD_MASK_SHIFT);
 | 
					            del_weak_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,7 +73,7 @@ uint16_t get_ongoing_keycode(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Handles custom keycodes.
 | 
					  // Handles custom keycodes.
 | 
				
			||||||
  if (isSendStringMacro(keycode)) { return keycode; }
 | 
					  if (is_send_string_macro(keycode)) { return keycode; }
 | 
				
			||||||
  //if (keycode == PG_CCED) { return PG_CCED; }
 | 
					  //if (keycode == PG_CCED) { return PG_CCED; }
 | 
				
			||||||
  if (IS_LAYER_ON(_ODK)) {
 | 
					  if (IS_LAYER_ON(_ODK)) {
 | 
				
			||||||
    switch (keycode) {
 | 
					    switch (keycode) {
 | 
				
			||||||
| 
						 | 
					@ -101,7 +101,7 @@ uint16_t get_ongoing_keycode(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
    case KC_A ... KC_SLASH:  // These keys type letters, digits, symbols.
 | 
					    case KC_A ... KC_SLASH:  // These keys type letters, digits, symbols.
 | 
				
			||||||
    case PG_E:
 | 
					    case PG_E:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (isLetter(basic_keycode) && (mods & ~MOD_BIT(KC_ALGR))) {
 | 
					      if (is_letter(basic_keycode) && (mods & ~MOD_BIT(KC_ALGR))) {
 | 
				
			||||||
          // Shift doesn't matter for letters.
 | 
					          // Shift doesn't matter for letters.
 | 
				
			||||||
          return basic_keycode;
 | 
					          return basic_keycode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,8 +33,7 @@ enum combos {
 | 
				
			||||||
  PANIC,
 | 
					  PANIC,
 | 
				
			||||||
  NUMWRD,
 | 
					  NUMWRD,
 | 
				
			||||||
  ALTTAB,
 | 
					  ALTTAB,
 | 
				
			||||||
/*   L_APOST,
 | 
					  ALTESC
 | 
				
			||||||
  D_APOST, */
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const uint16_t PROGMEM del_combo_d[] = {PG_T, PG_S, COMBO_END};
 | 
					const uint16_t PROGMEM del_combo_d[] = {PG_T, PG_S, COMBO_END};
 | 
				
			||||||
| 
						 | 
					@ -51,8 +50,7 @@ const uint16_t PROGMEM help_combo[] = {PG_EACU, PG_J, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM panic_combo[] = {PG_U, PG_C, COMBO_END};
 | 
					const uint16_t PROGMEM panic_combo[] = {PG_U, PG_C, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM numword_combo[] = {PG_T, PG_R, COMBO_END};
 | 
					const uint16_t PROGMEM numword_combo[] = {PG_T, PG_R, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM alttab_combo[] = {PG_H, PG_Y, COMBO_END};
 | 
					const uint16_t PROGMEM alttab_combo[] = {PG_H, PG_Y, COMBO_END};
 | 
				
			||||||
/* const uint16_t PROGMEM l_apost_combo[] = {PG_X, PG_APOS, COMBO_END};
 | 
					const uint16_t PROGMEM altesc_combo[] = {PG_A, PG_I, PG_N, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM d_apost_combo[] = {PG_D, PG_F, COMBO_END}; */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
combo_t key_combos[] = {
 | 
					combo_t key_combos[] = {
 | 
				
			||||||
    [R_BKSPC] = COMBO(bkspc_combo_d, KC_BSPC),
 | 
					    [R_BKSPC] = COMBO(bkspc_combo_d, KC_BSPC),
 | 
				
			||||||
| 
						 | 
					@ -69,8 +67,7 @@ combo_t key_combos[] = {
 | 
				
			||||||
    [PANIC] = COMBO(panic_combo, RAZ),
 | 
					    [PANIC] = COMBO(panic_combo, RAZ),
 | 
				
			||||||
    [NUMWRD] = COMBO(numword_combo, NUMWORD),
 | 
					    [NUMWRD] = COMBO(numword_combo, NUMWORD),
 | 
				
			||||||
    [ALTTAB] = COMBO(alttab_combo, KC_NO),
 | 
					    [ALTTAB] = COMBO(alttab_combo, KC_NO),
 | 
				
			||||||
/*     [L_APOST] = COMBO(l_apost_combo, L_APOS),
 | 
					    [ALTESC] = COMBO(altesc_combo, LALT(KC_ESC))
 | 
				
			||||||
    [D_APOST] = COMBO(d_apost_combo, D_APOS) */
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
 | 
					/* uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
 | 
				
			||||||
| 
						 | 
					@ -95,8 +92,6 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
 | 
				
			||||||
        case ENTER:
 | 
					        case ENTER:
 | 
				
			||||||
        case HOME:
 | 
					        case HOME:
 | 
				
			||||||
        case END:
 | 
					        case END:
 | 
				
			||||||
/*         case L_APOST:
 | 
					 | 
				
			||||||
        case D_APOST: */
 | 
					 | 
				
			||||||
          return true;
 | 
					          return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@ bool is_apos_dr = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool process_macros(uint16_t keycode, keyrecord_t *record) {
 | 
					bool process_macros(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
    //const uint8_t mods = get_mods();
 | 
					    //const uint8_t mods = get_mods();
 | 
				
			||||||
 | 
					    //static bool is_shifted = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (record->event.pressed) {    // Handling of other macros (on press).
 | 
					    if (record->event.pressed) {    // Handling of other macros (on press).
 | 
				
			||||||
        switch (keycode) {
 | 
					        switch (keycode) {
 | 
				
			||||||
| 
						 | 
					@ -70,6 +71,21 @@ bool process_macros(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
            case TG_APOS:
 | 
					            case TG_APOS:
 | 
				
			||||||
                is_apos_dr = !is_apos_dr;
 | 
					                is_apos_dr = !is_apos_dr;
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            case NUM_ODK:
 | 
				
			||||||
 | 
					                bool is_shifted = (get_mods() | get_weak_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT;
 | 
				
			||||||
 | 
					                if (is_shifted) {
 | 
				
			||||||
 | 
					                    del_weak_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					                    del_oneshot_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					                    unregister_mods(MOD_MASK_SHIFT);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                tap_code(PG_ODK);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (is_shifted) {
 | 
				
			||||||
 | 
					                    //is_shifted = false;
 | 
				
			||||||
 | 
					                    set_oneshot_mods(MOD_BIT(KC_LSFT));
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return true; // Process all other keycodes normally
 | 
					    return true; // Process all other keycodes normally
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,14 +52,8 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
                case PG_K:
 | 
					                case PG_K:
 | 
				
			||||||
                case PG_B:
 | 
					                case PG_B:
 | 
				
			||||||
                case PG_APOS:
 | 
					                case PG_APOS:
 | 
				
			||||||
                //case PG_BL:
 | 
					 | 
				
			||||||
                //case PG_ECIR:
 | 
					 | 
				
			||||||
                //case J_APOS:
 | 
					 | 
				
			||||||
                case OU_GRV:
 | 
					                case OU_GRV:
 | 
				
			||||||
                //case PG_CCED:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                case KC_SPC:    // When space is added by Clever Keys
 | 
					                case KC_SPC:    // When space is added by Clever Keys
 | 
				
			||||||
                
 | 
					 | 
				
			||||||
                case CNL_ODK:
 | 
					                case CNL_ODK:
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool is_caps_lock_on(void) { return host_keyboard_led_state().caps_lock; }
 | 
					bool is_caps_lock_on(void) { return host_keyboard_led_state().caps_lock; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool isLetter(uint16_t keycode) {
 | 
					bool is_letter(uint16_t keycode) {
 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
    case KC_A ... KC_F:
 | 
					    case KC_A ... KC_F:
 | 
				
			||||||
    case KC_H ... KC_N:
 | 
					    case KC_H ... KC_N:
 | 
				
			||||||
| 
						 | 
					@ -36,14 +36,9 @@ bool isLetter(uint16_t keycode) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool isSendStringMacro(uint16_t keycode) {
 | 
					bool is_send_string_macro(uint16_t keycode) {
 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
    //case AGRV_SPC:
 | 
					 | 
				
			||||||
    //case CA_CED:
 | 
					 | 
				
			||||||
/*     case L_APOS:
 | 
					 | 
				
			||||||
    case D_APOS: */
 | 
					 | 
				
			||||||
    case OU_GRV:
 | 
					    case OU_GRV:
 | 
				
			||||||
    //case J_APOS:
 | 
					 | 
				
			||||||
    //case PG_BL:
 | 
					    //case PG_BL:
 | 
				
			||||||
    case MAGIC:
 | 
					    case MAGIC:
 | 
				
			||||||
      return true;
 | 
					      return true;
 | 
				
			||||||
| 
						 | 
					@ -53,6 +48,25 @@ bool isSendStringMacro(uint16_t keycode) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool is_followed_by_apos(uint16_t keycode, uint16_t prev_keycode) {
 | 
				
			||||||
 | 
					  switch (keycode) {
 | 
				
			||||||
 | 
					    case PG_Q:
 | 
				
			||||||
 | 
					      return true;
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					    case PG_L:
 | 
				
			||||||
 | 
					    case PG_T:
 | 
				
			||||||
 | 
					    case PG_D:
 | 
				
			||||||
 | 
					    case PG_C:
 | 
				
			||||||
 | 
					    case PG_N:
 | 
				
			||||||
 | 
					    case PG_S:
 | 
				
			||||||
 | 
					    case PG_M:
 | 
				
			||||||
 | 
					    case PG_Y:
 | 
				
			||||||
 | 
					    case PG_J:
 | 
				
			||||||
 | 
					      if (!is_letter(prev_keycode)) { return true; }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// This function extracts the base keycode of MT and LT,
 | 
					// This function extracts the base keycode of MT and LT,
 | 
				
			||||||
// even if the tap/hold key is a custom one, with non-basic tap keycode.
 | 
					// even if the tap/hold key is a custom one, with non-basic tap keycode.
 | 
				
			||||||
uint16_t tap_hold_extractor(uint16_t keycode) {
 | 
					uint16_t tap_hold_extractor(uint16_t keycode) {
 | 
				
			||||||
| 
						 | 
					@ -104,7 +118,7 @@ bool caps_word_press_user(uint16_t keycode) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Keycodes that continue Caps Word, with shift applied.
 | 
					  // Keycodes that continue Caps Word, with shift applied.
 | 
				
			||||||
  // @ must be shifted, bc of CleverKeys using it.
 | 
					  // @ must be shifted, bc of CleverKeys using it.
 | 
				
			||||||
  if (isLetter(keycode) || isSendStringMacro(keycode) || keycode == PG_AROB) {
 | 
					  if (is_letter(keycode) || is_send_string_macro(keycode) || keycode == PG_AROB) {
 | 
				
			||||||
    add_weak_mods(MOD_BIT(KC_LSFT));  // Apply shift to next key.
 | 
					    add_weak_mods(MOD_BIT(KC_LSFT));  // Apply shift to next key.
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
  } 
 | 
					  } 
 | 
				
			||||||
| 
						 | 
					@ -143,7 +157,8 @@ bool os4a_layer_changer(uint16_t keycode) {
 | 
				
			||||||
    case OS_FA:
 | 
					    case OS_FA:
 | 
				
			||||||
    case NUMWORD:
 | 
					    case NUMWORD:
 | 
				
			||||||
    case TT_FA:
 | 
					    case TT_FA:
 | 
				
			||||||
    //case TG_APOD:
 | 
					    case OS_RSA:
 | 
				
			||||||
 | 
					    case NUM_ODK:
 | 
				
			||||||
      return true;
 | 
					      return true;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
      return false;
 | 
					      return false;
 | 
				
			||||||
| 
						 | 
					@ -180,9 +195,9 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
 | 
				
			||||||
  // Alt-gr et shift s'appliquent à la touche typo, pour permettre de faire les majuscules plus facilement ainsi que ] avec.
 | 
					  // Alt-gr et shift s'appliquent à la touche typo, pour permettre de faire les majuscules plus facilement ainsi que ] avec.
 | 
				
			||||||
  // Autrement, la touche typo est ignorée par les Callum mods.
 | 
					  // Autrement, la touche typo est ignorée par les Callum mods.
 | 
				
			||||||
  // Ça permet de transmettre les mods à la touche suivante, par ex pour faire Ctrl + K. 
 | 
					  // Ça permet de transmettre les mods à la touche suivante, par ex pour faire Ctrl + K. 
 | 
				
			||||||
  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;}
 | 
					  //if (keycode == OS_ODK && (mods & ~MOD_BIT(KC_ALGR))) { return true; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
    //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é
 | 
				
			||||||
| 
						 | 
					@ -196,7 +211,8 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
 | 
				
			||||||
    case OS_FA:
 | 
					    case OS_FA:
 | 
				
			||||||
    case NUMWORD:
 | 
					    case NUMWORD:
 | 
				
			||||||
    case TT_FA:
 | 
					    case TT_FA:
 | 
				
			||||||
    case PG_ODK:
 | 
					    case NUM_ODK:
 | 
				
			||||||
 | 
					    //case PG_ODK:
 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
    default:
 | 
					    default:
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
| 
						 | 
					@ -231,7 +247,7 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
 | 
				
			||||||
  if (recent[RECENT_SIZE - 1] != KC_NO) { return MAGIC; }
 | 
					  if (recent[RECENT_SIZE - 1] != KC_NO) { return MAGIC; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*   keycode = tap_hold_extractor(keycode);
 | 
					/*   keycode = tap_hold_extractor(keycode);
 | 
				
			||||||
  if (isLetter(keycode)) { return MAGIC; }
 | 
					  if (is_letter(keycode)) { return MAGIC; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
  case PG_APOS:
 | 
					  case PG_APOS:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,8 +19,9 @@
 | 
				
			||||||
#include "quantum.h"
 | 
					#include "quantum.h"
 | 
				
			||||||
#include "keymap.h"
 | 
					#include "keymap.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool isLetter(uint16_t keycode);
 | 
					bool is_letter(uint16_t keycode);
 | 
				
			||||||
bool isSendStringMacro(uint16_t keycode);
 | 
					bool is_send_string_macro(uint16_t keycode);
 | 
				
			||||||
 | 
					bool is_followed_by_apos(uint16_t keycode, uint16_t prev_keycode);
 | 
				
			||||||
bool is_caps_lock_on(void);
 | 
					bool is_caps_lock_on(void);
 | 
				
			||||||
uint16_t tap_hold_extractor(uint16_t keycode);
 | 
					uint16_t tap_hold_extractor(uint16_t keycode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool is_caps_lock_on(void) { return host_keyboard_led_state().caps_lock; }
 | 
					bool is_caps_lock_on(void) { return host_keyboard_led_state().caps_lock; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool isLetter(uint16_t keycode) {
 | 
					bool is_letter(uint16_t keycode) {
 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
    case KC_A ... KC_L:
 | 
					    case KC_A ... KC_L:
 | 
				
			||||||
    case PG_M:
 | 
					    case PG_M:
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,7 @@ bool achordion_eager_mod(uint8_t mod) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool caps_word_press_user(uint16_t keycode) {
 | 
					bool caps_word_press_user(uint16_t keycode) {
 | 
				
			||||||
  // Keycodes that continue Caps Word, with shift applied.
 | 
					  // Keycodes that continue Caps Word, with shift applied.
 | 
				
			||||||
  if (isLetter(keycode)) {
 | 
					  if (is_letter(keycode)) {
 | 
				
			||||||
    add_weak_mods(MOD_BIT(KC_LSFT));  // Apply shift to next key.
 | 
					    add_weak_mods(MOD_BIT(KC_LSFT));  // Apply shift to next key.
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -160,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_L_MODS] = LAYOUT(
 | 
					    [_L_MODS] = LAYOUT(
 | 
				
			||||||
      KC_NO, KC_NO,   KC_NO,  OS_WIN,  KC_RGUI, KC_NO,                                        _______, _______, _______, _______, _______, _______,
 | 
					      KC_NO, KC_NO,   KC_NO,  OS_WIN,  KC_RGUI, KC_NO,                                        _______, _______, _______, _______, _______, _______,
 | 
				
			||||||
      KC_NO, OS_RALT, OS_FA,  OS_CTRL, OS_SHFT, KC_NO,                                        _______, _______, _______, _______, _______, _______,
 | 
					      KC_NO, OS_RSA,  OS_FA,  OS_CTRL, OS_SHFT, KC_NO,                                        _______, _______, _______, _______, _______, _______,
 | 
				
			||||||
      KC_NO, OS_LALT, KC_NO,  KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   _______,  _______, _______, _______, _______, _______, _______, _______,
 | 
					      KC_NO, OS_LALT, KC_NO,  KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   _______,  _______, _______, _______, _______, _______, _______, _______,
 | 
				
			||||||
                              KC_NO,   KC_NO,   _______, _______, _______, CAPSWORD, _______, KC_CAPS, _______, _______
 | 
					                              KC_NO,   KC_NO,   _______, _______, _______, CAPSWORD, _______, KC_CAPS, _______, _______
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
| 
						 | 
					@ -180,10 +180,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 *                        `----------------------------------'  `----------------------------------'
 | 
					 *                        `----------------------------------'  `----------------------------------'
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_R_MODS] = LAYOUT(
 | 
					    [_R_MODS] = LAYOUT(
 | 
				
			||||||
      _______, _______, _______, _______, _______, _______,                                     KC_NO,   KC_RGUI, OS_WIN,  TG_APOS, KC_NO,   KC_NO,
 | 
					      _______, _______, _______, _______, _______, _______,                                     KC_NO,   KC_RGUI, OS_WIN,  KC_NO,   KC_NO,   KC_NO,
 | 
				
			||||||
      _______, _______, _______, _______, _______, _______,                                     TT_FA,   OS_SHFT, OS_CTRL, NUMWORD, PG_ODK,  KC_NO,
 | 
					      _______, _______, _______, _______, _______, _______,                                     TT_FA,   OS_SHFT, OS_CTRL, NUMWORD, NUM_ODK,  KC_NO,
 | 
				
			||||||
      _______, _______, _______, _______, _______, _______, _______, _______, KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   OS_FA,   OS_LALT, KC_NO,
 | 
					      _______, _______, _______, _______, _______, _______, _______, _______, KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   OS_FA,   OS_LALT, KC_NO,
 | 
				
			||||||
                                 _______, _______, _______, _______, _______, _______, _______, _______, KC_NO,   KC_NO
 | 
					                                 _______, _______, _______, _______, _______, TG_APOS, _______, _______, KC_NO,   KC_NO
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -202,7 +202,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 *                        `----------------------------------'  `----------------------------------'
 | 
					 *                        `----------------------------------'  `----------------------------------'
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_SYMBOLS] = LAYOUT(
 | 
					    [_SYMBOLS] = LAYOUT(
 | 
				
			||||||
      _______, PG_ACIR,    PG_LCBR, PG_RCBR, PG_DLR,  PG_HASH,                                           PG_PERC, PG_DQUO, PG_EGAL, ALGR(PG_APOS), PG_GRV,  _______,
 | 
					      _______, PG_ACIR,    PG_LCBR, PG_RCBR, PG_DLR,  PG_PERC,                                           PG_HASH, PG_DQUO, PG_EGAL, ALGR(PG_APOS), PG_GRV,  _______,
 | 
				
			||||||
      _______, ALGR(PG_O), PG_LPRN, PG_RPRN, PG_PVIR, ALGR(PG_VIRG),                                     PG_BSLS, MT_SLSH, PG_MOIN, PG_PLUS,       PG_ASTX, _______,
 | 
					      _______, ALGR(PG_O), PG_LPRN, PG_RPRN, PG_PVIR, ALGR(PG_VIRG),                                     PG_BSLS, MT_SLSH, PG_MOIN, PG_PLUS,       PG_ASTX, _______,
 | 
				
			||||||
      _______, PG_INF,     PG_LSBR, PG_RSBR, PG_SUP,  _______,       _______, _______, _______, _______, _______, PG_APOD, PG_ESPR, PG_PIPE,       PG_TILD, _______,
 | 
					      _______, PG_INF,     PG_LSBR, PG_RSBR, PG_SUP,  _______,       _______, _______, _______, _______, _______, PG_APOD, PG_ESPR, PG_PIPE,       PG_TILD, _______,
 | 
				
			||||||
                                    _______, _______, _______,       PG_UNDS, KC_SPC,  PG_APOS, _______, _______, _______, _______
 | 
					                                    _______, _______, _______,       PG_UNDS, KC_SPC,  PG_APOS, _______, _______, _______, _______
 | 
				
			||||||
| 
						 | 
					@ -224,9 +224,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 *                        `----------------------------------'  `----------------------------------'
 | 
					 *                        `----------------------------------'  `----------------------------------'
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_NUMBERS] = LAYOUT(
 | 
					    [_NUMBERS] = LAYOUT(
 | 
				
			||||||
       _______, PG_DLR,  PG_MOIN, PG_PLUS, KC_7,    S(PG_ACIR),                                        PG_PERC, _______, PG_EGAL, PG_ASTX, _______, _______,
 | 
					       _______, PG_DLR,  PG_MOIN, PG_PLUS, KC_7,    PG_PERC,                                           SAGR(PG_POIN), _______, PG_EGAL, PG_ASTX, _______, _______,
 | 
				
			||||||
       _______, KC_4,    KC_3,    KC_2,    MT_1,    PG_CARN,                                           _______, MT_SLSH, KC_6,    KC_7,    KC_8,    _______,
 | 
					       _______, KC_4,    KC_3,    KC_2,    MT_1,    ALGR(PG_VIRG),                                     PG_CARN,       MT_SLSH, KC_6,    KC_7,    KC_8,    _______,
 | 
				
			||||||
       _______, _______, _______, _______, KC_5,    _______,    _______, _______,    _______, _______, _______, KC_9,    KC_6,    _______, PG_ODK,  _______,
 | 
					       _______, _______, _______, PG_H,    KC_5,    _______,    _______, _______,    _______, _______, _______,       KC_9,    _______, _______, PG_ODK,  _______,
 | 
				
			||||||
                                  _______, _______, KC_PDOT,    KC_0   , LT_NUMWORD, LT_REPT, KC_SPC,  KC_PDOT,       _______, _______
 | 
					                                  _______, _______, KC_PDOT,    KC_0   , LT_NUMWORD, LT_REPT, KC_SPC,  KC_PDOT,       _______, _______
 | 
				
			||||||
     ),
 | 
					     ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -247,8 +247,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_ODK] = LAYOUT(
 | 
					    [_ODK] = LAYOUT(
 | 
				
			||||||
       _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
					       _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
				
			||||||
       _______, OU_GRV,  PG_R,    _______, PG_T,    _______,                                     _______, PG_A,    _______, PG_AROB, _______, _______,
 | 
					       _______, OU_GRV,  _______, _______, PG_T,    _______,                                     _______, PG_K,    _______, _______, _______, _______,
 | 
				
			||||||
       _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PG_K,    CNL_ODK, _______,
 | 
					       _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PG_AROB, CNL_ODK, _______,
 | 
				
			||||||
                                  _______, _______, _______, _______, PG_O,    PG_APOS, PG_B,    _______, _______, _______
 | 
					                                  _______, _______, _______, _______, PG_O,    PG_APOS, PG_B,    _______, _______, _______
 | 
				
			||||||
     ),
 | 
					     ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,7 +32,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum layers {
 | 
					enum layers {
 | 
				
			||||||
    _BASE = 0,
 | 
					    _BASE = 0,
 | 
				
			||||||
    //_APOS_DR,
 | 
					 | 
				
			||||||
    // OS4A layers should be as closed as base layer as possible
 | 
					    // OS4A layers should be as closed as base layer as possible
 | 
				
			||||||
    _L_MODS,
 | 
					    _L_MODS,
 | 
				
			||||||
    _R_MODS,
 | 
					    _R_MODS,
 | 
				
			||||||
| 
						 | 
					@ -52,7 +51,6 @@ enum custom_keycodes {
 | 
				
			||||||
  RAZ,
 | 
					  RAZ,
 | 
				
			||||||
  CAPSWORD,
 | 
					  CAPSWORD,
 | 
				
			||||||
  OU_GRV,
 | 
					  OU_GRV,
 | 
				
			||||||
  //J_APOS,
 | 
					 | 
				
			||||||
  //E_CIRC,
 | 
					  //E_CIRC,
 | 
				
			||||||
/*  I_CIRC,
 | 
					/*  I_CIRC,
 | 
				
			||||||
  A_CIRC,
 | 
					  A_CIRC,
 | 
				
			||||||
| 
						 | 
					@ -67,10 +65,8 @@ enum custom_keycodes {
 | 
				
			||||||
  OS_WIN,
 | 
					  OS_WIN,
 | 
				
			||||||
  //OS_ODK,
 | 
					  //OS_ODK,
 | 
				
			||||||
  CNL_ODK,
 | 
					  CNL_ODK,
 | 
				
			||||||
  TG_APOS,
 | 
					  TG_APOS
 | 
				
			||||||
  //PG_BL
 | 
					
 | 
				
			||||||
/*   L_APOS,
 | 
					 | 
				
			||||||
  D_APOS */
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Layer taps
 | 
					// Layer taps
 | 
				
			||||||
| 
						 | 
					@ -80,12 +76,13 @@ enum custom_keycodes {
 | 
				
			||||||
#define LT_MGC LT(_SHORTNAV, KC_1)
 | 
					#define LT_MGC LT(_SHORTNAV, KC_1)
 | 
				
			||||||
#define OS_FA OSL(_FUNCAPPS)
 | 
					#define OS_FA OSL(_FUNCAPPS)
 | 
				
			||||||
#define TT_FA TT(_FUNCAPPS)
 | 
					#define TT_FA TT(_FUNCAPPS)
 | 
				
			||||||
//#define TG_APOD TG(_APOS_DR)
 | 
					 | 
				
			||||||
#define MT_SLSH SFT_T(PG_SLSH)
 | 
					#define MT_SLSH SFT_T(PG_SLSH)
 | 
				
			||||||
#define MT_1 SFT_T(KC_1)
 | 
					#define MT_1 SFT_T(KC_1)
 | 
				
			||||||
#define LT_NUMWORD LT(_SHORTNAV, NUMWORD)
 | 
					#define LT_NUMWORD LT(_SHORTNAV, NUMWORD)
 | 
				
			||||||
#define E_CIRC S(FG_0)
 | 
					#define E_CIRC S(FG_0)
 | 
				
			||||||
#define OS_ODK OSL(_ODK)
 | 
					#define OS_ODK OSL(_ODK)
 | 
				
			||||||
 | 
					#define OS_RSA OSM(MOD_RALT | MOD_LSFT)
 | 
				
			||||||
 | 
					#define NUM_ODK OSL(_NUMBERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// One shot mods
 | 
					// One shot mods
 | 
				
			||||||
#define L_OS4A LSFT_T(OS4A)
 | 
					#define L_OS4A LSFT_T(OS4A)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -206,7 +206,7 @@
 | 
				
			||||||
 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
 | 
					 * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 #define PG_CARN S(ALGR(PG_X)) // ˇ (dead)
 | 
					 #define PG_CARN S(ALGR(PG_O)) // ˇ (dead)
 | 
				
			||||||
/* // Row 1
 | 
					/* // Row 1
 | 
				
			||||||
#define PG_IBRV S(ALGR(PG_AROB))   //  ̑ (dead)
 | 
					#define PG_IBRV S(ALGR(PG_AROB))   //  ̑ (dead)
 | 
				
			||||||
#define PG_HACU S(ALGR(PG_LPRN)) // ˝ (dead)
 | 
					#define PG_HACU S(ALGR(PG_LPRN)) // ˝ (dead)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,10 +32,21 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
    if (inversion == false && *next_keycode == PG_VIRG) { replace_ongoing_key(PG_POIN, next_keycode, record); }
 | 
					    if (inversion == false && *next_keycode == PG_VIRG) { replace_ongoing_key(PG_POIN, next_keycode, record); }
 | 
				
			||||||
    inversion = false;
 | 
					    inversion = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    static bool apostrophe = false;
 | 
				
			||||||
 | 
					    if (IS_LAYER_ON(_BASE) && *next_keycode == PG_APOS) {
 | 
				
			||||||
 | 
					      if (apostrophe) {
 | 
				
			||||||
 | 
					        apostrophe = false;
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        replace_ongoing_key(PG_MOIN, next_keycode, record);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    apostrophe = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Apostrophe
 | 
					    // Apostrophe
 | 
				
			||||||
    switch (*next_keycode) {
 | 
					    switch (*next_keycode) {
 | 
				
			||||||
      case PG_Q:
 | 
					      case PG_Q:
 | 
				
			||||||
        set_last_keycode(PG_APOS);
 | 
					        set_last_keycode(PG_APOS);
 | 
				
			||||||
 | 
					        apostrophe = true;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
      case PG_L:
 | 
					      case PG_L:
 | 
				
			||||||
      case PG_T:
 | 
					      case PG_T:
 | 
				
			||||||
| 
						 | 
					@ -45,7 +56,12 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      case PG_S:
 | 
					      case PG_S:
 | 
				
			||||||
      case PG_M:
 | 
					      case PG_M:
 | 
				
			||||||
      case PG_Y:
 | 
					      case PG_Y:
 | 
				
			||||||
        if (!isLetter(prev_keycode)) { set_last_keycode(PG_APOS); }
 | 
					      case PG_J:
 | 
				
			||||||
 | 
					        //if (!isLetter(prev_keycode)) { set_last_keycode(PG_APOS); }
 | 
				
			||||||
 | 
					        if (!isLetter(prev_keycode)) {
 | 
				
			||||||
 | 
					          set_last_keycode(PG_APOS);
 | 
				
			||||||
 | 
					          apostrophe = true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -100,10 +116,10 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Raccourci pour "quand"
 | 
					        // Raccourci pour "quand"
 | 
				
			||||||
        case PG_D:
 | 
					        case PG_N:
 | 
				
			||||||
          process_word((uint16_t[]) {PG_U, PG_A, PG_N}, 3, record);
 | 
					          return finish_word((uint16_t[]) {PG_U, PG_A, PG_N, PG_D}, 4, next_keycode, record);
 | 
				
			||||||
          set_last_keycode(*next_keycode);
 | 
					          //set_last_keycode(*next_keycode);
 | 
				
			||||||
          break;
 | 
					          //break;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -118,7 +134,7 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          // "pas"
 | 
					          // "pas"
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_A, PG_S}, 2, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_A, PG_S}, 2, next_keycode, record);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        case PG_APOS:
 | 
					        case PG_J:
 | 
				
			||||||
          if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
					          if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
            // "pour"
 | 
					            // "pour"
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_O, PG_U, PG_R}, 3, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_O, PG_U, PG_R}, 3, next_keycode, record);
 | 
				
			||||||
| 
						 | 
					@ -130,13 +146,6 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_L, PG_U, PG_S}, 3, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_L, PG_U, PG_S}, 3, next_keycode, record);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
/*     case PG_CCED:
 | 
					 | 
				
			||||||
      if (!isLetter(*next_keycode)) {
 | 
					 | 
				
			||||||
        invoke_key(PG_A, record);
 | 
					 | 
				
			||||||
        set_last_keycode(*next_keycode);
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      break; */
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
| 
						 | 
					@ -153,6 +162,11 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case MAGIC:
 | 
					    case MAGIC:
 | 
				
			||||||
 | 
					/*       if (!isLetter(prev_keycode)) {
 | 
				
			||||||
 | 
					          // "je"
 | 
				
			||||||
 | 
					          return finish_word((uint16_t[]) {PG_J, PG_E}, 2, next_keycode, record);
 | 
				
			||||||
 | 
					      } */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      switch (prev_keycode) {
 | 
					      switch (prev_keycode) {
 | 
				
			||||||
        case PG_O:
 | 
					        case PG_O:
 | 
				
			||||||
          // oui
 | 
					          // oui
 | 
				
			||||||
| 
						 | 
					@ -176,6 +190,11 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_C, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_C, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_C:
 | 
				
			||||||
 | 
					          // cs SFB
 | 
				
			||||||
 | 
					          bkspc_countdown = 0;
 | 
				
			||||||
 | 
					          return replace_ongoing_key(PG_S, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_N:
 | 
					        case PG_N:
 | 
				
			||||||
          // n. SFB
 | 
					          // n. SFB
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          bkspc_countdown = 0;
 | 
				
			||||||
| 
						 | 
					@ -186,6 +205,11 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
          bkspc_countdown = 0;
 | 
					          bkspc_countdown = 0;
 | 
				
			||||||
          return replace_ongoing_key(PG_H, next_keycode, record);
 | 
					          return replace_ongoing_key(PG_H, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_G:
 | 
				
			||||||
 | 
					          // gt SFB
 | 
				
			||||||
 | 
					          bkspc_countdown = 0;
 | 
				
			||||||
 | 
					          return replace_ongoing_key(PG_T, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        case PG_Q:
 | 
					        case PG_Q:
 | 
				
			||||||
          // qué scissor
 | 
					          // qué scissor
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_U, PG_EACU}, 2, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_U, PG_EACU}, 2, next_keycode, record);
 | 
				
			||||||
| 
						 | 
					@ -195,30 +219,6 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
        case PG_I:
 | 
					        case PG_I:
 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_O, PG_N}, 2, next_keycode, record);
 | 
					          return finish_word((uint16_t[]) {PG_O, PG_N}, 2, next_keycode, record);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
/*         case PG_D:
 | 
					 | 
				
			||||||
          // "c’est" 
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_APOS, PG_E, PG_T, PG_N}, 4, next_keycode, record); 
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        case PG_H:
 | 
					 | 
				
			||||||
          // "dans"
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_A, PG_S, PG_T}, 3, next_keycode, record);
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        case PG_P:
 | 
					 | 
				
			||||||
          // "plus"
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_C, PG_L, PG_T}, 3, next_keycode, record);
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        case PG_A:
 | 
					 | 
				
			||||||
          // "avec"
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_G, PG_E, PG_D}, 3, next_keycode, record); */
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
/*         case PG_B:
 | 
					 | 
				
			||||||
          // "bonjour"
 | 
					 | 
				
			||||||
          process_word((uint16_t[]) {PG_O, PG_S, PG_J}, 3, record);
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        case PG_J:
 | 
					 | 
				
			||||||
          // "jour"
 | 
					 | 
				
			||||||
          return finish_word((uint16_t[]) {PG_O, PG_L, PG_R}, 3, next_keycode, record); */
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        case PG_M:
 | 
					        case PG_M:
 | 
				
			||||||
          if (isLetter(recent[RECENT_SIZE - 2])) {
 | 
					          if (isLetter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
            // "ment"
 | 
					            // "ment"
 | 
				
			||||||
| 
						 | 
					@ -228,6 +228,16 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_ODK, PG_O, PG_M, PG_E}, 4, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_ODK, PG_O, PG_M, PG_E}, 4, next_keycode, record);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_B:
 | 
				
			||||||
 | 
					          // "beaucoup"
 | 
				
			||||||
 | 
					          //layer_off(_ODK);
 | 
				
			||||||
 | 
					          return finish_word((uint16_t[]) {PG_E, PG_A, PG_U, PG_C, PG_O, PG_U, PG_P}, 7, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case PG_D:
 | 
				
			||||||
 | 
					          // "déjà"
 | 
				
			||||||
 | 
					          //layer_off(_ODK);
 | 
				
			||||||
 | 
					          return finish_word((uint16_t[]) {PG_EACU, PG_J, PG_ODK, PG_A}, 4, next_keycode, record);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
          return;
 | 
					          return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					@ -236,48 +246,19 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
					      if (!isLetter(recent[RECENT_SIZE - 2])) {
 | 
				
			||||||
        switch (prev_keycode) {
 | 
					        switch (prev_keycode) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*           case PG_T:
 | 
					 | 
				
			||||||
            // "t@" -> "toujours"
 | 
					 | 
				
			||||||
            layer_off(_ODK);
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_O, PG_L, PG_J, PG_O, PG_L, PG_R, PG_T}, 7, next_keycode, record); */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          case PG_P:
 | 
					          case PG_P:
 | 
				
			||||||
            // "p@" -> "peut-être"
 | 
					            // "p@" -> "problème"
 | 
				
			||||||
            layer_off(_ODK);
 | 
					            layer_off(_ODK);
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_E, PG_U, PG_T, PG_MOIN, PG_ODK, PG_O, PG_T, PG_R, PG_E}, 9, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_R, PG_O, PG_B, PG_L, PG_ODK, PG_E, PG_M, PG_E}, 8, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          case PG_A:
 | 
					          case PG_A:
 | 
				
			||||||
            // "a@" -> "aujourd'hui"
 | 
					            // "a@" -> "aujourd'hui"
 | 
				
			||||||
            layer_off(_ODK);
 | 
					            layer_off(_ODK);
 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_U, PG_J, PG_O, PG_U, PG_R, PG_D, PG_APOS, PG_H, PG_U, PG_I}, 10, next_keycode, record);
 | 
					            return finish_word((uint16_t[]) {PG_U, PG_J, PG_O, PG_U, PG_R, PG_D, PG_APOS, PG_H, PG_U, PG_I}, 10, next_keycode, record);
 | 
				
			||||||
          
 | 
					 | 
				
			||||||
          case PG_B:
 | 
					 | 
				
			||||||
            // "b@" -> "beaucoup"
 | 
					 | 
				
			||||||
            layer_off(_ODK);
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_E, PG_A, PG_U, PG_C, PG_O, PG_U, PG_P}, 7, next_keycode, record);
 | 
					 | 
				
			||||||
          
 | 
					 | 
				
			||||||
/*           case PG_E:
 | 
					 | 
				
			||||||
            // "e@" -> "est-ce qu"
 | 
					 | 
				
			||||||
            layer_off(_ODK);
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_T, PG_N, PG_MOIN, PG_D, PG_E, KC_SPC, PG_Q}, 7, next_keycode, record); */
 | 
					 | 
				
			||||||
          
 | 
					 | 
				
			||||||
          case PG_D:
 | 
					 | 
				
			||||||
            // "d@" -> "déjà"
 | 
					 | 
				
			||||||
            layer_off(_ODK);
 | 
					 | 
				
			||||||
            return finish_word((uint16_t[]) {PG_EACU, PG_J, PG_ODK, PG_A}, 4, next_keycode, record);
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     case PG_Q:
 | 
					 | 
				
			||||||
      if (prev_keycode == PG_J) {
 | 
					 | 
				
			||||||
          // "jq" -> "jusqu"
 | 
					 | 
				
			||||||
          process_word((uint16_t[]) {PG_U, PG_S}, 2, record);
 | 
					 | 
				
			||||||
          set_last_keycode(*next_keycode);
 | 
					 | 
				
			||||||
          return;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      break; */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    case PG_M:
 | 
					    case PG_M:
 | 
				
			||||||
      if (prev_keycode == PG_C) {
 | 
					      if (prev_keycode == PG_C) {
 | 
				
			||||||
        // "cm" -> "ch"
 | 
					        // "cm" -> "ch"
 | 
				
			||||||
| 
						 | 
					@ -286,6 +267,14 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    case PG_H:
 | 
				
			||||||
 | 
					      if (prev_keycode == PG_M) {
 | 
				
			||||||
 | 
					        // "mh" -> "mb"
 | 
				
			||||||
 | 
					        bkspc_countdown = 0;
 | 
				
			||||||
 | 
					        return replace_ongoing_key(PG_B, next_keycode, record);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     case PG_R:
 | 
					/*     case PG_R:
 | 
				
			||||||
      if (prev_keycode == PG_L) {
 | 
					      if (prev_keycode == PG_L) {
 | 
				
			||||||
          // "lr" -> "l" + 1DK
 | 
					          // "lr" -> "l" + 1DK
 | 
				
			||||||
| 
						 | 
					@ -316,28 +305,27 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
 | 
				
			||||||
      layer_off(_ODK);
 | 
					      layer_off(_ODK);
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_O, PG_ODK, PG_N}, 3, next_keycode, record);
 | 
					      return finish_word((uint16_t[]) {PG_O, PG_ODK, PG_N}, 3, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case J_APOS:
 | 
					/*      case PG_BL:
 | 
				
			||||||
      layer_off(_ODK);
 | 
					      layer_off(_ODK);
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_J, PG_APOS}, 2, next_keycode, record);
 | 
					      return finish_word((uint16_t[]) {PG_B, PG_L}, 2, next_keycode, record); */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case L_APOS:
 | 
					/*     case J_APOS:
 | 
				
			||||||
 | 
					      layer_off(_ODK);
 | 
				
			||||||
 | 
					      return finish_word((uint16_t[]) {PG_J, PG_APOS}, 2, next_keycode, record); */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*     case L_APOS:
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_L, PG_APOS}, 2, next_keycode, record);
 | 
					      return finish_word((uint16_t[]) {PG_L, PG_APOS}, 2, next_keycode, record);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case D_APOS:
 | 
					    case D_APOS:
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_D, PG_APOS}, 2, next_keycode, record);
 | 
					      return finish_word((uint16_t[]) {PG_D, PG_APOS}, 2, next_keycode, record); */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case PG_APOS:
 | 
					    case PG_APOS:
 | 
				
			||||||
      if (is_apos_dr) { return replace_ongoing_key(PG_APOD, next_keycode, record); }
 | 
					      if (is_apos_dr) { return replace_ongoing_key(PG_APOD, next_keycode, record); }
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     case CA_CED:
 | 
					 | 
				
			||||||
      layer_off(_ODK);
 | 
					 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_CCED, PG_A}, 2, next_keycode, record); */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*     case AGRV_SPC:
 | 
					/*     case AGRV_SPC:
 | 
				
			||||||
      layer_off(_ODK);
 | 
					      layer_off(_ODK);
 | 
				
			||||||
      return finish_word((uint16_t[]) {PG_AGR, KC_SPC}, 2, next_keycode, record); */
 | 
					      return finish_word((uint16_t[]) {PG_AGR, KC_SPC}, 2, next_keycode, record); */
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  //return KC_NO; // Process next keycode normally
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -37,7 +37,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// combo
 | 
					// combo
 | 
				
			||||||
#define COMBO_TERM 50
 | 
					#define COMBO_TERM 50
 | 
				
			||||||
#define COMBO_TERM_PER_COMBO
 | 
					//#define COMBO_TERM_PER_COMBO
 | 
				
			||||||
#define COMBO_ONLY_FROM_LAYER 0
 | 
					#define COMBO_ONLY_FROM_LAYER 0
 | 
				
			||||||
#define COMBO_SHOULD_TRIGGER
 | 
					#define COMBO_SHOULD_TRIGGER
 | 
				
			||||||
#define COMBO_PROCESS_KEY_REPRESS 
 | 
					#define COMBO_PROCESS_KEY_REPRESS 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,7 +78,7 @@ uint16_t get_ongoing_keycode(uint16_t keycode, keyrecord_t* record) {
 | 
				
			||||||
  if (IS_LAYER_ON(_ODK)) {
 | 
					  if (IS_LAYER_ON(_ODK)) {
 | 
				
			||||||
    switch (keycode) {
 | 
					    switch (keycode) {
 | 
				
			||||||
      case PG_K:
 | 
					      case PG_K:
 | 
				
			||||||
      case PG_J:
 | 
					      case PG_B:
 | 
				
			||||||
      case PG_AROB:
 | 
					      case PG_AROB:
 | 
				
			||||||
      case PG_3PTS:
 | 
					      case PG_3PTS:
 | 
				
			||||||
      case KC_SPC:  // In order to uppercase J after '?' for ex.
 | 
					      case KC_SPC:  // In order to uppercase J after '?' for ex.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,26 +33,28 @@ enum combos {
 | 
				
			||||||
  PANIC,
 | 
					  PANIC,
 | 
				
			||||||
  NUMWRD,
 | 
					  NUMWRD,
 | 
				
			||||||
  ALTTAB,
 | 
					  ALTTAB,
 | 
				
			||||||
  L_APOST,
 | 
					  ALTESC
 | 
				
			||||||
  D_APOST,
 | 
					/*   L_APOST,
 | 
				
			||||||
 | 
					  D_APOST, */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const uint16_t PROGMEM del_combo_d[] = {PG_T, PG_S, COMBO_END};
 | 
					const uint16_t PROGMEM del_combo_d[] = {PG_T, PG_S, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM bkspc_combo_d[] = {PG_S, PG_R, COMBO_END};
 | 
					const uint16_t PROGMEM bkspc_combo_d[] = {PG_S, PG_R, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM del_word_combo[] = {PG_M, PG_C, COMBO_END};
 | 
					const uint16_t PROGMEM del_word_combo[] = {PG_M, PG_C, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM bk_word_combo[] = {PG_C, PG_APOS, COMBO_END};
 | 
					const uint16_t PROGMEM bk_word_combo[] = {PG_C, PG_J, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM enter_combo[] = {PG_P, PG_U, COMBO_END};
 | 
					const uint16_t PROGMEM enter_combo[] = {PG_P, PG_U, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM tab_combo[] = {PG_N, PG_I, COMBO_END};
 | 
					const uint16_t PROGMEM tab_combo[] = {PG_N, PG_I, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM esc_combo[] = {PG_N, PG_A, COMBO_END};
 | 
					const uint16_t PROGMEM esc_combo[] = {PG_N, PG_A, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM bkspc_combo_g[] = {PG_A, PG_I, COMBO_END};
 | 
					const uint16_t PROGMEM bkspc_combo_g[] = {PG_A, PG_I, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM home_combo[] = {PG_Z, PG_Y, COMBO_END};
 | 
					const uint16_t PROGMEM home_combo[] = {PG_Z, PG_Y, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM end_combo[] = {PG_U, PG_EACU, COMBO_END};
 | 
					const uint16_t PROGMEM end_combo[] = {PG_U, PG_EACU, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM help_combo[] = {PG_EACU, PG_APOS, COMBO_END};
 | 
					const uint16_t PROGMEM help_combo[] = {PG_EACU, PG_J, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM panic_combo[] = {PG_U, PG_C, COMBO_END};
 | 
					const uint16_t PROGMEM panic_combo[] = {PG_U, PG_C, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM numword_combo[] = {PG_T, PG_R, COMBO_END};
 | 
					const uint16_t PROGMEM numword_combo[] = {PG_T, PG_R, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM alttab_combo[] = {PG_H, PG_Y, COMBO_END};
 | 
					const uint16_t PROGMEM alttab_combo[] = {PG_H, PG_Y, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM l_apost_combo[] = {PG_X, PG_APOS, COMBO_END};
 | 
					const uint16_t PROGMEM altesc_combo[] = {PG_A, PG_I, PG_N, COMBO_END};
 | 
				
			||||||
const uint16_t PROGMEM d_apost_combo[] = {PG_D, PG_F, COMBO_END};
 | 
					/* const uint16_t PROGMEM l_apost_combo[] = {PG_X, PG_APOS, COMBO_END};
 | 
				
			||||||
 | 
					const uint16_t PROGMEM d_apost_combo[] = {PG_D, PG_F, COMBO_END}; */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
combo_t key_combos[] = {
 | 
					combo_t key_combos[] = {
 | 
				
			||||||
    [R_BKSPC] = COMBO(bkspc_combo_d, KC_BSPC),
 | 
					    [R_BKSPC] = COMBO(bkspc_combo_d, KC_BSPC),
 | 
				
			||||||
| 
						 | 
					@ -69,11 +71,12 @@ combo_t key_combos[] = {
 | 
				
			||||||
    [PANIC] = COMBO(panic_combo, RAZ),
 | 
					    [PANIC] = COMBO(panic_combo, RAZ),
 | 
				
			||||||
    [NUMWRD] = COMBO(numword_combo, NUMWORD),
 | 
					    [NUMWRD] = COMBO(numword_combo, NUMWORD),
 | 
				
			||||||
    [ALTTAB] = COMBO(alttab_combo, KC_NO),
 | 
					    [ALTTAB] = COMBO(alttab_combo, KC_NO),
 | 
				
			||||||
    [L_APOST] = COMBO(l_apost_combo, L_APOS),
 | 
					    [ALTESC] = COMBO(altesc_combo, LALT(KC_ESC))
 | 
				
			||||||
    [D_APOST] = COMBO(d_apost_combo, D_APOS)
 | 
					/*     [L_APOST] = COMBO(l_apost_combo, L_APOS),
 | 
				
			||||||
 | 
					    [D_APOST] = COMBO(d_apost_combo, D_APOS) */
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
 | 
					/* uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
 | 
				
			||||||
    switch (combo_index) {
 | 
					    switch (combo_index) {
 | 
				
			||||||
        case L_APOST:
 | 
					        case L_APOST:
 | 
				
			||||||
        case D_APOST:
 | 
					        case D_APOST:
 | 
				
			||||||
| 
						 | 
					@ -81,7 +84,7 @@ uint16_t get_combo_term(uint16_t combo_index, combo_t *combo) {
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            return COMBO_TERM;
 | 
					            return COMBO_TERM;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) {
 | 
					bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
    // Chorded mods shouldn't be considered as combos.
 | 
					    // Chorded mods shouldn't be considered as combos.
 | 
				
			||||||
| 
						 | 
					@ -95,8 +98,8 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
 | 
				
			||||||
        case ENTER:
 | 
					        case ENTER:
 | 
				
			||||||
        case HOME:
 | 
					        case HOME:
 | 
				
			||||||
        case END:
 | 
					        case END:
 | 
				
			||||||
        case L_APOST:
 | 
					/*         case L_APOST:
 | 
				
			||||||
        case D_APOST:
 | 
					        case D_APOST: */
 | 
				
			||||||
          return true;
 | 
					          return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,9 +50,11 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
                case PG_3PTS:   // For Clever Keys
 | 
					                case PG_3PTS:   // For Clever Keys
 | 
				
			||||||
                case PG_AROB:
 | 
					                case PG_AROB:
 | 
				
			||||||
                case PG_K:
 | 
					                case PG_K:
 | 
				
			||||||
                case PG_J:
 | 
					                case PG_B:
 | 
				
			||||||
 | 
					                case PG_APOS:
 | 
				
			||||||
 | 
					                //case PG_BL:
 | 
				
			||||||
                //case PG_ECIR:
 | 
					                //case PG_ECIR:
 | 
				
			||||||
                case J_APOS:
 | 
					                //case J_APOS:
 | 
				
			||||||
                case OU_GRV:
 | 
					                case OU_GRV:
 | 
				
			||||||
                //case PG_CCED:
 | 
					                //case PG_CCED:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,10 +40,11 @@ bool isSendStringMacro(uint16_t keycode) {
 | 
				
			||||||
  switch (keycode) {
 | 
					  switch (keycode) {
 | 
				
			||||||
    //case AGRV_SPC:
 | 
					    //case AGRV_SPC:
 | 
				
			||||||
    //case CA_CED:
 | 
					    //case CA_CED:
 | 
				
			||||||
    case L_APOS:
 | 
					/*     case L_APOS:
 | 
				
			||||||
    case D_APOS:
 | 
					    case D_APOS: */
 | 
				
			||||||
    case OU_GRV:
 | 
					    case OU_GRV:
 | 
				
			||||||
    case J_APOS:
 | 
					    //case J_APOS:
 | 
				
			||||||
 | 
					    //case PG_BL:
 | 
				
			||||||
    case MAGIC:
 | 
					    case MAGIC:
 | 
				
			||||||
      return true;
 | 
					      return true;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -72,7 +73,7 @@ bool caps_word_press_user(uint16_t keycode) {
 | 
				
			||||||
  if ((get_mods() & MOD_BIT(KC_ALGR))) {
 | 
					  if ((get_mods() & MOD_BIT(KC_ALGR))) {
 | 
				
			||||||
    switch (keycode) {
 | 
					    switch (keycode) {
 | 
				
			||||||
      case PG_E:
 | 
					      case PG_E:
 | 
				
			||||||
      case PG_N:
 | 
					      case PG_T:
 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
      default:
 | 
					      default:
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
| 
						 | 
					@ -82,19 +83,20 @@ bool caps_word_press_user(uint16_t keycode) {
 | 
				
			||||||
  if (IS_LAYER_ON(_ODK)) {
 | 
					  if (IS_LAYER_ON(_ODK)) {
 | 
				
			||||||
    switch (keycode) {
 | 
					    switch (keycode) {
 | 
				
			||||||
      case PG_EACU:
 | 
					      case PG_EACU:
 | 
				
			||||||
 | 
					      case PG_B:
 | 
				
			||||||
        add_weak_mods(MOD_BIT(KC_LSFT));  // Apply shift to next key.
 | 
					        add_weak_mods(MOD_BIT(KC_LSFT));  // Apply shift to next key.
 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
      case PG_I:
 | 
					      case PG_I:
 | 
				
			||||||
      case PG_F:
 | 
					      case PG_F:
 | 
				
			||||||
 | 
					      case PG_T:
 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
      case PG_L:
 | 
					      case PG_L:
 | 
				
			||||||
      case PG_H:
 | 
					      case PG_H:
 | 
				
			||||||
      case PG_VIRG:
 | 
					      case PG_VIRG:
 | 
				
			||||||
      case PG_B:
 | 
					 | 
				
			||||||
      case PG_V:
 | 
					      case PG_V:
 | 
				
			||||||
      case PG_M:
 | 
					      case PG_M:
 | 
				
			||||||
      case PG_C:
 | 
					      case PG_C:
 | 
				
			||||||
      case PG_T:
 | 
					      //case PG_T:
 | 
				
			||||||
      case PG_S:
 | 
					      case PG_S:
 | 
				
			||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -226,8 +228,17 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
 | 
				
			||||||
    return KC_SPC;
 | 
					    return KC_SPC;
 | 
				
			||||||
  }  */
 | 
					  }  */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  keycode = tap_hold_extractor(keycode);
 | 
					  if (recent[RECENT_SIZE - 1] != KC_NO) { return MAGIC; }
 | 
				
			||||||
  if (isLetter(keycode) || keycode == PG_APOS) { return MAGIC; }
 | 
					
 | 
				
			||||||
 | 
					/*   keycode = tap_hold_extractor(keycode);
 | 
				
			||||||
 | 
					  if (isLetter(keycode)) { return MAGIC; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  switch (keycode) {
 | 
				
			||||||
 | 
					  case PG_APOS:
 | 
				
			||||||
 | 
					  case KC_SPC:
 | 
				
			||||||
 | 
					  case 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  } */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return KC_TRNS;  // Defer to default definitions.
 | 
					  return KC_TRNS;  // Defer to default definitions.
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 *                        `----------------------------------'  `----------------------------------'
 | 
					 *                        `----------------------------------'  `----------------------------------'
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_BASE] = LAYOUT(
 | 
					    [_BASE] = LAYOUT(
 | 
				
			||||||
      KC_NO, PG_POIN, PG_EACU, PG_U,  PG_P,   PG_B,                                    PG_V,   PG_M,    PG_C, PG_APOS, PG_X,   KC_NO,
 | 
					      KC_NO, PG_POIN, PG_EACU, PG_U,  PG_P,   PG_APOS,                                 PG_V,   PG_M,    PG_C, PG_J,    PG_X,   KC_NO,
 | 
				
			||||||
      KC_NO, PG_O,    PG_A,    PG_I,  PG_N,   PG_VIRG,                                 PG_G,   PG_T,    PG_S, PG_R,    PG_L,   KC_NO,
 | 
					      KC_NO, PG_O,    PG_A,    PG_I,  PG_N,   PG_VIRG,                                 PG_G,   PG_T,    PG_S, PG_R,    PG_L,   KC_NO,
 | 
				
			||||||
      KC_NO, PG_Q,    PG_Z,    PG_Y,  PG_H,   KC_NO,   KC_NO, KC_NO,  KC_NO,   KC_NO,  KC_NO,  PG_D,    PG_F, PG_W,    OS_ODK, KC_NO,
 | 
					      KC_NO, PG_Q,    PG_Z,    PG_Y,  PG_H,   KC_NO,   KC_NO, KC_NO,  KC_NO,   KC_NO,  KC_NO,  PG_D,    PG_F, PG_W,    OS_ODK, KC_NO,
 | 
				
			||||||
                               KC_NO, KC_SPC, L_OS4A,  LT_E,  LT_MGC, LT_REPT, LT_SPC, R_OS4A, KC_RGUI, KC_NO
 | 
					                               KC_NO, KC_SPC, L_OS4A,  LT_E,  LT_MGC, LT_REPT, LT_SPC, R_OS4A, KC_RGUI, KC_NO
 | 
				
			||||||
| 
						 | 
					@ -205,7 +205,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
      _______, PG_ACIR,    PG_LCBR, PG_RCBR, PG_DLR,  PG_HASH,                                           PG_PERC, PG_DQUO, PG_EGAL, ALGR(PG_APOS), PG_GRV,  _______,
 | 
					      _______, PG_ACIR,    PG_LCBR, PG_RCBR, PG_DLR,  PG_HASH,                                           PG_PERC, PG_DQUO, PG_EGAL, ALGR(PG_APOS), PG_GRV,  _______,
 | 
				
			||||||
      _______, ALGR(PG_O), PG_LPRN, PG_RPRN, PG_PVIR, ALGR(PG_VIRG),                                     PG_BSLS, MT_SLSH, PG_MOIN, PG_PLUS,       PG_ASTX, _______,
 | 
					      _______, ALGR(PG_O), PG_LPRN, PG_RPRN, PG_PVIR, ALGR(PG_VIRG),                                     PG_BSLS, MT_SLSH, PG_MOIN, PG_PLUS,       PG_ASTX, _______,
 | 
				
			||||||
      _______, PG_INF,     PG_LSBR, PG_RSBR, PG_SUP,  _______,       _______, _______, _______, _______, _______, PG_APOD, PG_ESPR, PG_PIPE,       PG_TILD, _______,
 | 
					      _______, PG_INF,     PG_LSBR, PG_RSBR, PG_SUP,  _______,       _______, _______, _______, _______, _______, PG_APOD, PG_ESPR, PG_PIPE,       PG_TILD, _______,
 | 
				
			||||||
                                    _______, _______, _______,       PG_UNDS, KC_SPC,  _______, _______, _______, _______, _______
 | 
					                                    _______, _______, _______,       PG_UNDS, KC_SPC,  PG_APOS, _______, _______, _______, _______
 | 
				
			||||||
    ),
 | 
					    ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -247,9 +247,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    [_ODK] = LAYOUT(
 | 
					    [_ODK] = LAYOUT(
 | 
				
			||||||
       _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
					       _______, _______, _______, _______, _______, _______,                                     _______, _______, _______, _______, _______, _______,
 | 
				
			||||||
       _______, OU_GRV,  PG_R,    _______, PG_T,    _______,                                     _______, PG_A,    _______, PG_AROB, _______, _______,
 | 
					       _______, OU_GRV,  _______, _______, PG_T,    _______,                                     _______, PG_R,    _______, PG_AROB, _______, _______,
 | 
				
			||||||
       _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PG_K,    CNL_ODK, _______,
 | 
					       _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PG_K,    CNL_ODK, _______,
 | 
				
			||||||
                                  _______, _______, _______, _______, PG_O,    J_APOS,  PG_J,    _______, _______, _______
 | 
					                                  _______, _______, _______, _______, PG_O,    PG_APOS, PG_B,    _______, _______, _______
 | 
				
			||||||
     ),
 | 
					     ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ enum custom_keycodes {
 | 
				
			||||||
  RAZ,
 | 
					  RAZ,
 | 
				
			||||||
  CAPSWORD,
 | 
					  CAPSWORD,
 | 
				
			||||||
  OU_GRV,
 | 
					  OU_GRV,
 | 
				
			||||||
  J_APOS,
 | 
					  //J_APOS,
 | 
				
			||||||
  //E_CIRC,
 | 
					  //E_CIRC,
 | 
				
			||||||
/*  I_CIRC,
 | 
					/*  I_CIRC,
 | 
				
			||||||
  A_CIRC,
 | 
					  A_CIRC,
 | 
				
			||||||
| 
						 | 
					@ -68,8 +68,9 @@ enum custom_keycodes {
 | 
				
			||||||
  //OS_ODK,
 | 
					  //OS_ODK,
 | 
				
			||||||
  CNL_ODK,
 | 
					  CNL_ODK,
 | 
				
			||||||
  TG_APOS,
 | 
					  TG_APOS,
 | 
				
			||||||
  L_APOS,
 | 
					  //PG_BL
 | 
				
			||||||
  D_APOS
 | 
					/*   L_APOS,
 | 
				
			||||||
 | 
					  D_APOS */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Layer taps
 | 
					// Layer taps
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue