Finalisation

This commit is contained in:
Kawamashi 2025-09-26 23:13:17 +02:00
commit fd3b08829d
3 changed files with 31 additions and 29 deletions

View file

@ -37,30 +37,30 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
del_weak_mods(MOD_MASK_SHIFT);
del_oneshot_mods(MOD_MASK_SHIFT);
unregister_mods(MOD_MASK_SHIFT);
tap_code(PG_ODK);
set_oneshot_mods(MOD_BIT(KC_LSFT)); // Don't use weak mods!
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:
// 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);
}
} 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:
// 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);
}
}
}

View file

@ -252,9 +252,10 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
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_BIT(KC_ALGR))) { return true; }
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 L_OS4A:
case R_OS4A:
@ -267,11 +268,11 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
case NUMWORD:
case TG_FA:
//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;
default:
return false;
return true;
/* default:
return false; */
}
return false;
}

View file

@ -228,10 +228,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_NUMBERS] = LAYOUT(
_______, PG_DLR, PG_MOIN, PG_PLUS, PG_EURO, PG_PERC, PG_EXP, _______, PG_EGAL, PG_ASTX, _______, _______,
_______, KC_4, KC_3, KC_2, MT_1, PG_2PTS, PG_IND, MT_SLSH, KC_6, KC_7, KC_8, _______,
_______, _______, _______, PG_H, KC_5, _______, _______, _______, _______, _______, _______, KC_9, PG_DEG, _______, PG_ODK, _______,
_______, _______, KC_PDOT, KC_0 , LT_NBSPC, _______, KC_SPC, _______, _______, _______
// S(KC_4), S(KC_3) and S(PG_EGAL) are here to give easy access to ⅔, ¾ and ≠.
_______, PG_DLR, PG_MOIN, PG_PLUS, PG_EURO, PG_PERC, PG_EXP, S(PG_EGAL), PG_EGAL, PG_ASTX, _______, _______,
_______, KC_4, KC_3, KC_2, MT_1, PG_2PTS, PG_IND, MT_SLSH, KC_6, KC_7, KC_8, _______,
_______, S(KC_4), S(KC_3), PG_H, KC_5, _______, _______, _______, _______, _______, _______, KC_9, PG_DEG, _______, PG_ODK, _______,
_______, _______, KC_PDOT, KC_0 , LT_NBSPC, _______, KC_SPC, _______, _______, _______
),