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,13 +37,14 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
del_weak_mods(MOD_MASK_SHIFT); del_weak_mods(MOD_MASK_SHIFT);
del_oneshot_mods(MOD_MASK_SHIFT); del_oneshot_mods(MOD_MASK_SHIFT);
unregister_mods(MOD_MASK_SHIFT); unregister_mods(MOD_MASK_SHIFT);
tap_code(PG_ODK); tap_code(PG_ODK);
set_oneshot_mods(MOD_BIT(KC_LSFT)); // Don't use weak mods! set_oneshot_mods(MOD_BIT(KC_LSFT)); // Don't use weak mods!
return false; return false;
} }
} else { } else if (IS_LAYER_ON(_ODK)) {
if (IS_LAYER_ON(_ODK)) {
switch (keycode) { switch (keycode) {
//case PG_3PTS: // For Clever Keys //case PG_3PTS: // For Clever Keys
case PG_PVIR: case PG_PVIR:
@ -63,6 +64,5 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
} }
} }
} }
}
return true; return true;
} }

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(); uint8_t mods = get_mods() | get_weak_mods() | get_oneshot_mods();
//if (keycode == OS_ODK && (mods & ~(MOD_MASK_SHIFT | MOD_BIT(KC_ALGR)))) { return true; } //if (keycode == OS_ODK && (mods & ~(MOD_MASK_SHIFT | MOD_BIT(KC_ALGR)))) { return true; }
if (keycode == OS_ODK && (mods & ~MOD_BIT(KC_ALGR))) { return true; }
switch (keycode) { switch (keycode) {
case OS_ODK:
if (mods & ~MOD_BIT(KC_ALGR)) { return true; }
break;
//case OS_ODK: /!\ A ne pas remettre, sous peine de ne pas pouvoir faire shift + typo + touche de l'autre côté //case OS_ODK: /!\ A ne pas remettre, sous peine de ne pas pouvoir faire shift + typo + touche de l'autre côté
case L_OS4A: case L_OS4A:
case R_OS4A: case R_OS4A:
@ -267,11 +268,11 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
case NUMWORD: case NUMWORD:
case TG_FA: case TG_FA:
//case OS_WMNT: //case OS_WMNT:
//case NUM_ODK: // Ne sert à rien, car NUM_ODK est un vrai one-shot : les mods sont transmis même sans paramétrage.
return true; return true;
default: /* default:
return false; return false; */
} }
return false;
} }

View file

@ -228,9 +228,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------' * `----------------------------------' `----------------------------------'
*/ */
[_NUMBERS] = LAYOUT( [_NUMBERS] = LAYOUT(
_______, PG_DLR, PG_MOIN, PG_PLUS, PG_EURO, PG_PERC, PG_EXP, _______, PG_EGAL, PG_ASTX, _______, _______, // S(KC_4), S(KC_3) and S(PG_EGAL) are here to give easy access to ⅔, ¾ and ≠.
_______, 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, _______, _______, 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, _______, _______, S(KC_4), S(KC_3), PG_H, KC_5, _______, _______, _______, _______, _______, _______, KC_9, PG_DEG, _______, PG_ODK, _______,
_______, _______, KC_PDOT, KC_0 , LT_NBSPC, _______, KC_SPC, _______, _______, _______ _______, _______, KC_PDOT, KC_0 , LT_NBSPC, _______, KC_SPC, _______, _______, _______
), ),