Propergol face B

This commit is contained in:
Kawamashi 2025-06-17 10:25:54 +02:00
commit d78f54e0e6
30 changed files with 901 additions and 760 deletions

BIN
GMKyria.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 MiB

View file

@ -1,7 +1,9 @@
# QMK Userspace
# Kawamashis QMK configuration
This is a template repository which allows for an external set of QMK keymaps to be defined and compiled. This is useful for users who want to maintain their own keymaps without having to fork the main QMK repository.
![kb](https://github.com/filterpaper/filterpaper.github.io/raw/main/images/cradio_pink.png)
## Howto configure your build targets
1. Run the normal `qmk setup` procedure if you haven't already done so -- see [QMK Docs](https://docs.qmk.fm/#/newbs) for details.

View file

@ -23,6 +23,48 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
uint16_t prev_keycode = recent[RECENT_SIZE - 1];
// Inversion du point et de la virgule
static bool inversion = false;
if (*next_keycode == PG_POIN) {
replace_ongoing_key(PG_VIRG, next_keycode, record);
inversion = true;
}
if (inversion == false && *next_keycode == PG_VIRG) { replace_ongoing_key(PG_POIN, next_keycode, record); }
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
switch (*next_keycode) {
case PG_Q:
set_last_keycode(PG_APOS);
apostrophe = true;
break;
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 (!isLetter(prev_keycode)) { set_last_keycode(PG_APOS); }
if (!isLetter(prev_keycode)) {
set_last_keycode(PG_APOS);
apostrophe = true;
}
}
if (isLetter(*next_keycode) || isSendStringMacro(*next_keycode)) {
switch (prev_keycode) {
case PG_EXCL:
@ -64,9 +106,9 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
break;
// Raccourci pour "quelq"
case PG_Q:
/* case PG_Q:
process_word((uint16_t[]) {PG_U, PG_E, PG_L}, 3, record);
break;
break; */
// Raccourci pour "quoi", ça évite un aller-retour sur la main gauche.
case PG_Z:
@ -92,7 +134,7 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
// "pas"
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])) {
// "pour"
return finish_word((uint16_t[]) {PG_O, PG_U, PG_R}, 3, next_keycode, record);
@ -104,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);
}
break;
/* case PG_CCED:
if (!isLetter(*next_keycode)) {
invoke_key(PG_A, record);
set_last_keycode(*next_keycode);
}
break; */
}
@ -127,13 +162,24 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
break;
case MAGIC:
switch (prev_keycode) {
/* if (!isLetter(prev_keycode)) {
// "je"
return finish_word((uint16_t[]) {PG_J, PG_E}, 2, next_keycode, record);
} */
switch (prev_keycode) {
case PG_O:
// oui
invoke_key(PG_U, record);
case PG_U:
// ui SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_I, next_keycode, record);
case PG_L:
// là
return finish_word((uint16_t[]) {PG_ODK, PG_A}, 2, next_keycode, record);
case PG_EACU:
// éa SFB
bkspc_countdown = 0;
@ -144,14 +190,15 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
bkspc_countdown = 0;
return replace_ongoing_key(PG_C, next_keycode, record);
case PG_L:
// là SFB
return finish_word((uint16_t[]) {PG_ODK, PG_A}, 2, next_keycode, record);
case PG_C:
// cs SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_S, next_keycode, record);
case PG_N:
// sc SFB
// n. SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_VIRG, next_keycode, record);
return replace_ongoing_key(PG_POIN, next_keycode, record);
case PG_P:
// ph SFB
@ -159,6 +206,7 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
return replace_ongoing_key(PG_H, next_keycode, record);
case PG_Q:
// qué scissor
return finish_word((uint16_t[]) {PG_U, PG_EACU}, 2, next_keycode, record);
case PG_T:
@ -166,30 +214,6 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
case PG_I:
return finish_word((uint16_t[]) {PG_O, PG_N}, 2, next_keycode, record);
/* case PG_D:
// "cest"
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:
if (isLetter(recent[RECENT_SIZE - 2])) {
// "ment"
@ -199,6 +223,11 @@ 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);
}
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);
default:
return;
}
@ -207,30 +236,21 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
if (!isLetter(recent[RECENT_SIZE - 2])) {
switch (prev_keycode) {
/* case PG_N:
// "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:
// "p@" -> "peut-être"
// "p@" -> "problème"
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:
// "a@" -> "aujourd'hui"
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);
case PG_B:
/* 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); */
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à"
@ -240,16 +260,7 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
}
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) {
// "cm" -> "ch"
bkspc_countdown = 0;
@ -257,7 +268,15 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
}
break;
case PG_A:
/* case PG_R:
if (prev_keycode == PG_L) {
// "lr" -> "l" + 1DK
//bkspc_countdown = 0;
return replace_ongoing_key(OS_ODK, next_keycode, record);
}
break; */
/* case PG_A:
//if (prev_keycode == PG_O && !isCaps) {
if (prev_keycode == PG_O) {
// "oa" -> "oi"
@ -273,24 +292,33 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
bkspc_countdown = 0;
return replace_ongoing_key(PG_A, next_keycode, record);
}
break;
break; */
case OU_GRV:
layer_off(_ODK);
return finish_word((uint16_t[]) {PG_O, PG_ODK, PG_N}, 3, next_keycode, record);
/* case PG_BL:
layer_off(_ODK);
return finish_word((uint16_t[]) {PG_B, PG_L}, 2, next_keycode, record); */
/* 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);
case D_APOS:
return finish_word((uint16_t[]) {PG_D, PG_APOS}, 2, next_keycode, record); */
case PG_APOS:
if (is_apos_dr) { return replace_ongoing_key(PG_APOD, next_keycode, record); }
break;
/* case CA_CED:
layer_off(_ODK);
return finish_word((uint16_t[]) {PG_CCED, PG_A}, 2, next_keycode, record); */
/* case AGRV_SPC:
layer_off(_ODK);
return finish_word((uint16_t[]) {PG_AGR, KC_SPC}, 2, next_keycode, record); */
}
//return KC_NO; // Process next keycode normally
}

View file

@ -78,16 +78,17 @@ uint16_t get_ongoing_keycode(uint16_t keycode, keyrecord_t* record) {
if (IS_LAYER_ON(_ODK)) {
switch (keycode) {
case PG_K:
case PG_J:
case PG_B:
case PG_AROB:
case PG_ECIR:
//case PG_CCED:
case PG_3PTS:
case KC_SPC: // In order to uppercase J after '?' for ex.
return keycode;
/* case PG_D:
return PG_CCED; */
case PG_VIRG:
return PG_3PTS;
/* case PG_T:
return PG_MOIN; */
default:
clear_recent_keys();
return KC_NO;
}
}

View file

@ -33,25 +33,26 @@ enum combos {
PANIC,
NUMWRD,
ALTTAB,
//CTRLALT,
/* L_APOST,
D_APOST, */
};
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 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 tab_combo[] = {PG_N, PG_I, 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 home_combo[] = {PG_Z, PG_Y, 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 numword_combo[] = {PG_T, PG_R, COMBO_END};
const uint16_t PROGMEM alttab_combo[] = {PG_H, PG_Y, COMBO_END};
//const uint16_t PROGMEM ctrlalt_Combo[] = {PG_A, PG_I, PG_N, 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[] = {
[R_BKSPC] = COMBO(bkspc_combo_d, KC_BSPC),
@ -68,13 +69,15 @@ combo_t key_combos[] = {
[PANIC] = COMBO(panic_combo, RAZ),
[NUMWRD] = COMBO(numword_combo, NUMWORD),
[ALTTAB] = COMBO(alttab_combo, KC_NO),
//[CTRLALT] = COMBO(ctrlalt_Combo, RCTL(RALT(KC_DEL)))
/* [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) {
switch (combo_index) {
case HOME:
return COMBO_TERM - 10;
case L_APOST:
case D_APOST:
return 100;
default:
return COMBO_TERM;
}
@ -92,6 +95,8 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
case ENTER:
case HOME:
case END:
/* case L_APOST:
case D_APOST: */
return true;
default:

View file

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "odk_layer.h"
#include "odk_layer.h"
//static uint16_t odk_keycode = KC_NO;
@ -29,57 +29,41 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
// Handle the custom OSL that go with this feature
// It's timerless, to avoid problems when rolling with an other key, when shift is on.
// Custom behaviour when alt-gr
if (mods & MOD_BIT(KC_ALGR)) {
/* if (mods & MOD_BIT(KC_ALGR)) {
tap_code16(ALGR(PG_ODK));
return false;
}
} */
is_shifted = mods & MOD_MASK_SHIFT;
if (is_shifted) {
del_weak_mods(MOD_MASK_SHIFT);
del_oneshot_mods(MOD_MASK_SHIFT);
unregister_mods(MOD_MASK_SHIFT);
}
/*layer_on(_ODK);
odk_keycode = KC_NO;
return false; */
} else if (keycode == PG_ODK) {
// Special behaviour of FR_ODK when shifted
// Shift must apply to the next keycode
/* is_shifted = 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(FR_ODK);
return true;
} else if (IS_LAYER_ON(_ODK)) {
//if (odk_keycode == KC_NO) { odk_keycode = keycode; }
//if (!IS_QK_USER(keycode)) { odk_keycode = keycode; }
switch (keycode) {
case PG_3PTS: // For Clever Keys
case PG_AROB:
case PG_K:
case PG_J:
case PG_B:
case PG_APOS:
//case PG_BL:
//case PG_ECIR:
//case J_APOS:
case OU_GRV:
//case PG_CCED:
//case CA_CED:
//case AGRV_SPC:
case KC_SPC: // When space is added by Clever Keys
case PG_3PTS:
case CNL_ODK:
break;
default:
/* is_shifted = 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_apos_dr) {
@ -90,26 +74,11 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
}
}
if (is_shifted) {
is_shifted = false;
//set_mods(mods);
set_oneshot_mods(MOD_BIT(KC_LSFT));
is_shifted = false;
}
//exit_odk = true;
/* } else {
odk_keycode = KC_NO; */
}
/* } else { // On release
switch (keycode) {
case OS_ODK:
case PG_ODK:
break;
default:
//if (exit_odk) { odk_layer_exit_check(); }
if (keycode == odk_keycode) {
layer_off(_ODK);
odk_keycode = KC_NO;
}
} */
}
return true;
}

View file

@ -40,7 +40,11 @@ bool isSendStringMacro(uint16_t keycode) {
switch (keycode) {
//case AGRV_SPC:
//case CA_CED:
/* case L_APOS:
case D_APOS: */
case OU_GRV:
//case J_APOS:
//case PG_BL:
case MAGIC:
return true;
@ -69,7 +73,7 @@ bool caps_word_press_user(uint16_t keycode) {
if ((get_mods() & MOD_BIT(KC_ALGR))) {
switch (keycode) {
case PG_E:
case PG_N:
case PG_T:
return true;
default:
return false;
@ -79,19 +83,20 @@ bool caps_word_press_user(uint16_t keycode) {
if (IS_LAYER_ON(_ODK)) {
switch (keycode) {
case PG_EACU:
case PG_B:
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
return true;
case PG_I:
case PG_F:
case PG_T:
return true;
case PG_L:
case PG_H:
case PG_VIRG:
case PG_B:
case PG_V:
case PG_M:
case PG_C:
case PG_T:
//case PG_T:
case PG_S:
return false;
}
@ -108,6 +113,7 @@ bool caps_word_press_user(uint16_t keycode) {
// Keycodes that continue Caps Word, without shifting.
case PG_ODK:
//case PG_GRV:
case PG_UNDS:
case PG_MOIN:
case KC_KP_1 ... KC_KP_0:
case KC_LEFT:
@ -218,12 +224,21 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
case C(PG_Y):
return C(PG_Z);
}
if ((get_mods() | get_weak_mods()) & MOD_BIT(KC_ALGR)) {
/* if ((get_mods() | get_weak_mods()) & MOD_BIT(KC_ALGR)) {
return KC_SPC;
}
} */
keycode = tap_hold_extractor(keycode);
if (recent[RECENT_SIZE - 1] != KC_NO) { 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.
}

View file

@ -138,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_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_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
@ -187,6 +187,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
/*
* Layer : Symbols
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | ^ | { | } | $ | # | | % | " | = | ! | ` | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | ? | ( | ) | ; | : | | \ | / | - | + | * | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | < | [ | ] | > | | | | | | | | ' | & | | | ~ | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_SYMBOLS] = LAYOUT(
_______, 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, _______,
_______, PG_INF, PG_LSBR, PG_RSBR, PG_SUP, _______, _______, _______, _______, _______, _______, PG_APOD, PG_ESPR, PG_PIPE, PG_TILD, _______,
_______, _______, _______, PG_UNDS, KC_SPC, PG_APOS, _______, _______, _______, _______
),
/*
* Layer 1 : Numpad
@ -203,10 +224,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_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, S(PG_ACIR), PG_PERC, _______, PG_EGAL, PG_ASTX, _______, _______,
_______, KC_4, KC_3, KC_2, MT_1, PG_CARN, _______, MT_SLSH, KC_6, KC_7, KC_8, _______,
_______, _______, _______, _______, KC_5, _______, _______, _______, _______, _______, _______, KC_9, KC_6, _______, PG_ODK, _______,
_______, _______, KC_PDOT, KC_0 , LT_NUMWORD, LT_REPT, KC_SPC, _______, _______, _______
_______, _______, KC_PDOT, KC_0 , LT_NUMWORD, LT_REPT, KC_SPC, KC_PDOT, _______, _______
),
@ -226,9 +247,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_ODK] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, OU_GRV, _______, _______, PG_R, PG_3PTS, _______, PG_J, _______, PG_AROB, _______, _______,
_______, OU_GRV, PG_R, _______, PG_T, _______, _______, PG_A, _______, PG_AROB, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PG_K, CNL_ODK, _______,
_______, _______, _______, _______, PG_O, _______, PG_T, _______, _______, _______
_______, _______, _______, _______, PG_O, PG_APOS, PG_B, _______, _______, _______
),

View file

@ -37,6 +37,7 @@ enum layers {
_L_MODS,
_R_MODS,
_ODK,
_SYMBOLS,
_NUMBERS,
_SHORTNAV,
_FUNCAPPS,
@ -50,18 +51,14 @@ enum custom_keycodes {
OS4A,
RAZ,
CAPSWORD,
//AGRV_SPC,
OU_GRV,
//J_APOS,
//E_CIRC,
/* I_CIRC,
A_CIRC,
O_CIRC,
U_CIRC,
I_TREM,
CA_CED,
CIRC,
TILDE,
GRAVE, */
I_TREM,*/
MAGIC,
OS_SHFT,
OS_CTRL,
@ -70,12 +67,15 @@ enum custom_keycodes {
OS_WIN,
//OS_ODK,
CNL_ODK,
TG_APOS
TG_APOS,
//PG_BL
/* L_APOS,
D_APOS */
};
// Layer taps
#define LT_SPC ALGR_T(KC_SPC)
#define LT_E ALGR_T(PG_E)
#define LT_SPC LT(_SYMBOLS, KC_SPC)
#define LT_E LT(_SYMBOLS, PG_E)
#define LT_REPT LT(_NUMBERS, KC_1)
#define LT_MGC LT(_SHORTNAV, KC_1)
#define OS_FA OSL(_FUNCAPPS)

View file

@ -24,11 +24,11 @@
/*
*
*     1  2  3  4  5  6  7  8  9  0  /  '        
*  `  1  2  3  4  5  6  7  8  9  0  /  =        
*
*       .  É  U  P  B  V  M  C  '  X  =  +      
*       .  É  U  P  B  V  M  C    X  '  -      
*     
*        O  A  I  N  ,  G  T  S  R  L  -       
*        O  A  I  N  ,  G  T  S  R  L  [  ]     
*
*      E  Q  Z  Y  H  J  K  D  F  W  **          
*
@ -37,19 +37,19 @@
*/
// Row 1
//#define PG_CCED KC_GRV // ç
#define FG_1 KC_1 // 1
#define FG_2 KC_2 // 2
#define FG_3 KC_3 // 3
#define FG_4 KC_4 // 4
#define FG_5 KC_5 // 5
#define FG_6 KC_6 // 6
#define FG_7 KC_7 // 7
#define FG_8 KC_8 // 8
#define FG_9 KC_9 // 9
#define FG_0 KC_0 // 0
#define PG_GRV KC_GRV // `
#define FG_1 KC_1 // 1
#define FG_2 KC_2 // 2
#define FG_3 KC_3 // 3
#define FG_4 KC_4 // 4
#define FG_5 KC_5 // 5
#define FG_6 KC_6 // 6
#define FG_7 KC_7 // 7
#define FG_8 KC_8 // 8
#define FG_9 KC_9 // 9
#define FG_0 KC_0 // 0
#define PG_SLSH KC_MINS // /
#define PG_APOD KC_EQL // *
#define PG_EGAL KC_EQL // =
// Row 2
#define PG_POIN KC_Q // .
@ -62,8 +62,8 @@
#define PG_C KC_I // C
#define PG_APOS KC_O //
#define PG_X KC_P // X
#define PG_EGAL KC_LBRC // =
#define PG_PLUS KC_RBRC // +
#define PG_APOD KC_LBRC // '
#define PG_MOIN KC_RBRC // -
// Row 3
#define PG_O KC_A // O
@ -76,8 +76,8 @@
#define PG_S KC_K // S
#define PG_R KC_L // R
#define PG_L KC_SCLN // L
#define PG_MOIN KC_QUOT // -
//#define PG_APOD KC_NUHS // '
#define PG_LSBR KC_QUOT // [
#define PG_RSBR KC_NUHS // ]
// Row 4
#define PG_E KC_NUBS // E
@ -95,11 +95,11 @@
/* Shifted symbols
*
*                                              
*  ~  |  <  >  $  %  ^  &  _  #  @  *  \        
*
*       ?                       !              
*       ?                       !     " │ + │     
*     
*                    :                    ?     
*                    :                          
*
*                                    ;           
*
@ -108,21 +108,32 @@
*/
// Row 1
#define PG_DLR S(KC_4) // $
#define PG_ASTX S(KC_MINS) // *
// Row 3
//#define PG_3PTS S(FG_0) // …
#define PG_TILD S(KC_GRV) // ~
#define PG_PIPE S(KC_1) // |
#define PG_INF S(KC_2) // <
#define PG_SUP S(KC_3) // >
#define PG_DLR S(KC_4) // $
#define PG_PERC S(KC_5) // %
#define PG_ACIR S(KC_6) // ^
#define PG_ESPR S(KC_7) // &
#define PG_UNDS S(KC_8) // _
#define PG_HASH S(KC_9) // #
#define PG_AROB S(KC_0) // @
#define PG_ASTX S(PG_SLSH) // *
#define PG_BSLS S(PG_EGAL) // '\'
// Row 2
#define PG_EXCL S(PG_APOS) // !
#define PG_QUES S(PG_POIN) // ?
#define PG_2PTS S(PG_VIRG) // :
#define PG_DIFF S(PG_EGAL) // ≠
#define PG_EXCL S(PG_APOS) // !
#define PG_DQUO S(PG_APOD) // "
#define PG_PLUS S(PG_MOIN) // +
//#define PG_DIFF S(PG_EGAL) // ≠
// Row 3
#define PG_2PTS S(PG_VIRG) // :
// Row 4
//#define PG_PVIR S(PG_ODK)
#define PG_PVIR S(PG_ODK)
// Row 5
#define PG_NBSP S(KC_SPC) // Espace insecable
@ -131,13 +142,13 @@
/* AltGr symbols
*
*                        à  ê        
*                                    
*
*       ^  !  =  $  %  #  ;  '  ?  :            
*       ^  {  }  $  #  %  " │ = │ ! │ ` │   │   │     
*     
*        *  +  -  /  \  `  (  )  <  >           
*        ?  (  )  ;  :  \  /  -  +  *           
*
*      _  ~  |  &  " │ @ │   │ { │ } │ [ │ ] │          
*      _  <  [  ]  >  @     '  &  |  ~           
*
*                                                     
*
@ -146,44 +157,39 @@
// Row 1
#define PG_3PTS ALGR(KC_GRV) // …
#define PG_AGR ALGR(PG_SLSH)
#define PG_ECIR ALGR(PG_ASTX)
//#define PG_ECIR ALGR(PG_ASTX)
// Row 2
#define PG_ACIR ALGR(PG_POIN) // ^
//#define PG_ACIR ALGR(PG_POIN) // ^
//#define PG_EXCL ALGR(PG_EACU) // !
//#define PG_EGAL ALGR(PG_U) // =
//#define PG_DLR ALGR(PG_P) // $
#define PG_PERC ALGR(PG_B) // %
#define PG_HASH ALGR(PG_V) // #
#define PG_PVIR ALGR(PG_M) // ;
//#define PG_PVIR ALGR(PG_M) // ;
//#define PG_QUES ALGR(PG_APOS) // ?
//#define PG_2PTS ALGR(PG_X) // :
// Row 3
/* #define PG_ASTX ALGR(PG_O) // *
/*
#define PG_PLUS ALGR(PG_A) // +
#define PG_SLSH ALGR(PG_N) // /
#define PG_MOIN ALGR(PG_I) // - */
#define PG_MOIN ALGR(PG_I) // -
#define PG_BSLS ALGR(PG_VIRG) // '\'
#define PG_GRV ALGR(PG_G) // `
#define PG_LPRN ALGR(PG_T) // (
#define PG_RPRN ALGR(PG_S) // )
#define PG_INF ALGR(PG_R) // <
#define PG_SUP ALGR(PG_L) // >
#define PG_GRV ALGR(PG_G) // `*/
#define PG_LPRN ALGR(PG_A) // (
#define PG_RPRN ALGR(PG_I) // )
//#define PG_INF ALGR(PG_R) // <
//#define PG_SUP ALGR(PG_L) // >
//#define PG_HQUO ALGR(PG_L) // "
#define PG_AROB ALGR(PG_J)
//#define PG_AROB ALGR(PG_J)
// Row 4
#define PG_UNDS ALGR(PG_E) // _
#define PG_TILD ALGR(PG_Q) // ~
#define PG_PIPE ALGR(PG_Z) // |
#define PG_ESPR ALGR(PG_Y) // &
#define PG_DQUO ALGR(PG_H) // "
#define PG_LCBR ALGR(PG_D) // {
#define PG_RCBR ALGR(PG_F) // }
#define PG_LSBR ALGR(PG_W) // [
#define PG_RSBR ALGR(PG_ODK) // ]
//#define PG_UNDS ALGR(PG_E) // _
//#define PG_TILD ALGR(PG_Q) // ~
//#define PG_PIPE ALGR(PG_Z) // |
//#define PG_ESPR ALGR(PG_Y) // &
//#define PG_DQUO ALGR(PG_H) // "
#define PG_LCBR ALGR(PG_EACU) // {
#define PG_RCBR ALGR(PG_U) // }
//#define PG_LSBR ALGR(PG_W) // [
//#define PG_RSBR ALGR(PG_ODK) // ]
/* Shift+AltGr symbols

View file

@ -41,7 +41,7 @@ bool oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state|default_layer_state)) {
case _BASE:
oled_write_P(PSTR("FR-Go\n"), false);
oled_write_P(PSTR("Propergol\n"), false);
break;
case _L_MODS:
oled_write_P(PSTR("Mods G\n"), false);
@ -49,8 +49,11 @@ bool oled_task_user(void) {
case _R_MODS:
oled_write_P(PSTR("Mods D\n"), false);
break;
/* case _SYMBOLS:
oled_write_P(PSTR("SymNum\n"), false); */
case _SYMBOLS:
oled_write_P(PSTR("Symboles\n"), false);
break;
case _NUMBERS:
oled_write_P(PSTR("Nombres\n"), false);
break;
case _SHORTNAV:
oled_write_P(PSTR("ShortNav\n"), false);
@ -59,7 +62,7 @@ bool oled_task_user(void) {
oled_write_P(PSTR("FuncApps\n"), false);
break;
case _ODK:
oled_write_P(PSTR("Accents\n"), false);
oled_write_P(PSTR("1DK\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);

View file

@ -0,0 +1,5 @@
{
"files.associations": {
"ppg.C": "cpp"
}
}

View file

@ -23,22 +23,48 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
uint16_t prev_keycode = recent[RECENT_SIZE - 1];
// Inversion du point et de la virgule
static bool inversion = false;
if (*next_keycode == PG_POIN) {
replace_ongoing_key(PG_VIRG, next_keycode, record);
inversion = true;
}
if (inversion == false && *next_keycode == PG_VIRG) { replace_ongoing_key(PG_POIN, next_keycode, record); }
inversion = false;
// Apostrophe
switch (*next_keycode) {
case PG_Q:
set_last_keycode(PG_APOS);
break;
case PG_L:
case PG_T:
case PG_D:
case PG_C:
case PG_N:
case PG_S:
case PG_M:
case PG_Y:
if (!isLetter(prev_keycode)) { set_last_keycode(PG_APOS); }
}
if (isLetter(*next_keycode) || isSendStringMacro(*next_keycode)) {
switch (prev_keycode) {
case FG_EXLM:
case FG_QUES:
case FG_3PTS:
case FG_2PTS:
case PG_EXCL:
case PG_QUES:
case PG_3PTS:
case PG_2PTS:
// Add space between punctuation and letters.
invoke_key(KC_SPC, record);
set_last_keycode(*next_keycode);
case KC_SPC:
switch (recent[RECENT_SIZE - 2]) {
case FG_EXLM:
case FG_QUES:
case FG_3PTS:
case FG_POIN:
case PG_EXCL:
case PG_QUES:
case PG_3PTS:
case PG_POIN:
// Add OS shift at the beginning of sentences.
if (!is_caps_lock_on()) { set_oneshot_mods(MOD_BIT(KC_LSFT)); }
break;
@ -49,61 +75,65 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
switch (prev_keycode) {
case FG_Q:
case PG_Q:
switch (*next_keycode) {
// Ajout automatique du "u" après le "q"
case FG_E:
case FG_I:
case FG_A:
case FG_O:
case FG_EACU:
case FG_APOS:
invoke_key(FG_U, record);
case PG_E:
case PG_I:
case PG_A:
case PG_O:
case PG_EACU:
case PG_APOS:
invoke_key(PG_U, record);
set_last_keycode(*next_keycode);
break;
// Raccourci pour "quelq"
case FG_Q:
process_word((uint16_t[]) {FG_U, FG_E, FG_L}, 3, record);
break;
/* case PG_Q:
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 FG_Z:
finish_word((uint16_t[]) {FG_U, FG_O, FG_I}, 3, next_keycode, record);
case PG_Z:
finish_word((uint16_t[]) {PG_U, PG_O, PG_I}, 3, next_keycode, record);
break;
// Raccourci pour "quand"
case FG_D:
process_word((uint16_t[]) {FG_U, FG_A, FG_N}, 3, record);
case PG_D:
process_word((uint16_t[]) {PG_U, PG_A, PG_N}, 3, record);
set_last_keycode(*next_keycode);
break;
}
break;
case FG_P:
case PG_P:
switch (*next_keycode) {
case FG_M:
// "pas"
return finish_word((uint16_t[]) {FG_A, FG_S}, 2, next_keycode, record);
case FG_APOS:
case PG_M:
// "par"
return finish_word((uint16_t[]) {FG_A, FG_R}, 2, next_keycode, record);
return finish_word((uint16_t[]) {PG_A, PG_R}, 2, next_keycode, record);
case FG_POIN:
case PG_C:
// "pas"
return finish_word((uint16_t[]) {PG_A, PG_S}, 2, next_keycode, record);
case PG_APOS:
if (!isLetter(recent[RECENT_SIZE - 2])) {
// "pour"
return finish_word((uint16_t[]) {FG_O, FG_U, FG_R}, 3, next_keycode, record);
return finish_word((uint16_t[]) {PG_O, PG_U, PG_R}, 3, next_keycode, record);
}
break;
case PG_X:
// "plus"
return finish_word((uint16_t[]) {PG_L, PG_U, PG_S}, 3, next_keycode, record);
}
break;
/* case FG_CCED:
/* case PG_CCED:
if (!isLetter(*next_keycode)) {
invoke_key(FG_A, record);
invoke_key(PG_A, record);
set_last_keycode(*next_keycode);
}
break; */
@ -112,8 +142,8 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
switch (*next_keycode) {
case FG_QUES:
case FG_EXLM:
case PG_QUES:
case PG_EXCL:
// 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.
if (isLetter(recent[RECENT_SIZE - 1])) {
@ -124,135 +154,189 @@ void get_clever_keycode(uint16_t* next_keycode, keyrecord_t* record) {
case MAGIC:
switch (prev_keycode) {
case PG_O:
// oui
invoke_key(PG_U, record);
case PG_U:
// ui SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_I, next_keycode, record);
case FG_T:
invoke_key(FG_I, record);
case FG_I:
return finish_word((uint16_t[]) {FG_O, FG_N}, 2, next_keycode, record);
case PG_L:
// là
return finish_word((uint16_t[]) {PG_ODK, PG_A}, 2, next_keycode, record);
case FG_C:
return finish_word((uint16_t[]) {FG_APOS, FG_E, FG_S, FG_T}, 4, next_keycode, record);
case PG_EACU:
// éa SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_A, next_keycode, record);
case FG_D:
return finish_word((uint16_t[]) {FG_A, FG_N, FG_S}, 3, next_keycode, record);
case PG_S:
// sc SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_C, next_keycode, record);
case FG_P:
return finish_word((uint16_t[]) {FG_L, FG_U, FG_S}, 3, next_keycode, record);
case PG_N:
// n. SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_POIN, next_keycode, record);
case FG_O:
return finish_word((uint16_t[]) {FG_N, FG_T}, 2, next_keycode, record);
case PG_P:
// ph SFB
bkspc_countdown = 0;
return replace_ongoing_key(PG_H, next_keycode, record);
case FG_A:
if (isLetter(recent[RECENT_SIZE - 2])) {
// "ant"
return finish_word((uint16_t[]) {FG_N, FG_T}, 2, next_keycode, record);
} else {
// "avec"
return finish_word((uint16_t[]) {FG_V, FG_E, FG_C}, 3, next_keycode, record);
}
case PG_Q:
// qué scissor
return finish_word((uint16_t[]) {PG_U, PG_EACU}, 2, next_keycode, record);
case FG_S:
return finish_word((uint16_t[]) {FG_U, FG_R}, 2, next_keycode, record);
case PG_T:
invoke_key(PG_I, record);
case PG_I:
return finish_word((uint16_t[]) {PG_O, PG_N}, 2, next_keycode, record);
case FG_B:
process_word((uint16_t[]) {FG_O, FG_N, FG_J}, 3, record);
/* case PG_D:
// "cest"
return finish_word((uint16_t[]) {PG_APOS, PG_E, PG_T, PG_N}, 4, next_keycode, record);
case FG_J:
return finish_word((uint16_t[]) {FG_O, FG_U, FG_R}, 3, next_keycode, record);
case PG_H:
// "dans"
return finish_word((uint16_t[]) {PG_A, PG_S, PG_T}, 3, next_keycode, record);
case FG_M:
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:
if (isLetter(recent[RECENT_SIZE - 2])) {
// "ment"
return finish_word((uint16_t[]) {FG_E, FG_N, FG_T}, 3, next_keycode, record);
return finish_word((uint16_t[]) {PG_E, PG_N, PG_T}, 3, next_keycode, record);
} else {
// "même"
return finish_word((uint16_t[]) {FG_ODK, FG_O, FG_M, FG_E}, 4, next_keycode, record);
return finish_word((uint16_t[]) {PG_ODK, PG_O, PG_M, PG_E}, 4, next_keycode, record);
}
default:
return;
}
case FG_AROB:
case PG_AROB:
if (!isLetter(recent[RECENT_SIZE - 2])) {
switch (prev_keycode) {
case FG_T:
/* case PG_T:
// "t@" -> "toujours"
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_O, FG_U, FG_J, FG_O, FG_U, FG_R, FG_S}, 7, next_keycode, record);
return finish_word((uint16_t[]) {PG_O, PG_L, PG_J, PG_O, PG_L, PG_R, PG_T}, 7, next_keycode, record); */
case FG_P:
case PG_P:
// "p@" -> "peut-être"
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_E, FG_U, FG_T, FG_MOIN, FG_ODK, FG_O, FG_T, FG_R, FG_E}, 9, next_keycode, record);
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);
case FG_A:
case PG_A:
// "a@" -> "aujourd'hui"
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_U, FG_J, FG_O, FG_U, FG_R, FG_D, FG_APOS, FG_H, FG_U, FG_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 FG_B:
case PG_B:
// "b@" -> "beaucoup"
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_E, FG_A, FG_U, FG_C, FG_O, FG_U, FG_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 FG_E:
/* case PG_E:
// "e@" -> "est-ce qu"
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_S, FG_T, FG_MOIN, FG_C, FG_E, KC_SPC, FG_Q}, 7, next_keycode, record);
return finish_word((uint16_t[]) {PG_T, PG_N, PG_MOIN, PG_D, PG_E, KC_SPC, PG_Q}, 7, next_keycode, record); */
case FG_D:
case PG_D:
// "d@" -> "déjà"
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_EACU, FG_J, FG_ODK, FG_A}, 4, next_keycode, record);
return finish_word((uint16_t[]) {PG_EACU, PG_J, PG_ODK, PG_A}, 4, next_keycode, record);
}
}
break;
case FG_Q:
if (prev_keycode == FG_J) {
/* case PG_Q:
if (prev_keycode == PG_J) {
// "jq" -> "jusqu"
process_word((uint16_t[]) {FG_U, FG_S}, 2, record);
process_word((uint16_t[]) {PG_U, PG_S}, 2, record);
set_last_keycode(*next_keycode);
return;
}
break; */
case PG_M:
if (prev_keycode == PG_C) {
// "cm" -> "ch"
bkspc_countdown = 0;
return replace_ongoing_key(PG_H, next_keycode, record);
}
break;
case FG_A:
//if (prev_keycode == FG_O && !isCaps) {
if (prev_keycode == FG_O) {
/* case PG_R:
if (prev_keycode == PG_L) {
// "lr" -> "l" + 1DK
//bkspc_countdown = 0;
return replace_ongoing_key(OS_ODK, next_keycode, record);
}
break; */
/* case PG_A:
//if (prev_keycode == PG_O && !isCaps) {
if (prev_keycode == PG_O) {
// "oa" -> "oi"
return replace_ongoing_key(FG_I, next_keycode, record);
bkspc_countdown = 0;
return replace_ongoing_key(PG_I, next_keycode, record);
}
break;
case FG_I:
//if (prev_keycode == FG_O && !isCaps && recent[RECENT_SIZE - 3] != FG_Q) {
if (prev_keycode == FG_O && recent[RECENT_SIZE - 3] != FG_Q) {
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"
return replace_ongoing_key(FG_A, next_keycode, record);
bkspc_countdown = 0;
return replace_ongoing_key(PG_A, next_keycode, record);
}
break;
case FG_O:
if (prev_keycode == FG_U && recent[RECENT_SIZE - 2] != FG_Q) {
// "uo" -> "un"
return replace_ongoing_key(FG_N, next_keycode, record);
}
break;
break; */
case OU_GRV:
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_O, FG_ODK, FG_T}, 3, next_keycode, record);
return finish_word((uint16_t[]) {PG_O, PG_ODK, PG_N}, 3, next_keycode, record);
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);
case D_APOS:
return finish_word((uint16_t[]) {PG_D, PG_APOS}, 2, next_keycode, record);
case PG_APOS:
if (is_apos_dr) { return replace_ongoing_key(PG_APOD, next_keycode, record); }
break;
/* case CA_CED:
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_CCED, FG_A}, 2, next_keycode, record); */
return finish_word((uint16_t[]) {PG_CCED, PG_A}, 2, next_keycode, record); */
/* case AGRV_SPC:
layer_off(_ODK);
return finish_word((uint16_t[]) {FG_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

View file

@ -37,7 +37,7 @@
// combo
#define COMBO_TERM 50
//#define COMBO_TERM_PER_COMBO
#define COMBO_TERM_PER_COMBO
#define COMBO_ONLY_FROM_LAYER 0
#define COMBO_SHOULD_TRIGGER
#define COMBO_PROCESS_KEY_REPRESS

View file

@ -15,19 +15,19 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
if (isLetter(next_keycode) || next_keycode == E_CIRC) {
switch (prev_keycode) {
case FG_EXLM:
case FG_QUES:
case FG_3PTS:
case FG_2PTS:
case PG_EXCL:
case PG_QUES:
case PG_3PTS:
case PG_2PTS:
// Add space between punctuation and letters.
process_next_key(KC_SPC, record);
case KC_SPC:
switch (recent[RECENT_SIZE - 2]) {
case FG_EXLM:
case FG_QUES:
case FG_3PTS:
case FG_POIN:
case PG_EXCL:
case PG_QUES:
case PG_3PTS:
case PG_X:
// Add OS shift at the beginning of a sentence.
if (!is_caps_lock_on()) { set_oneshot_mods(MOD_BIT(KC_LSFT)); }
break;
@ -36,97 +36,97 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
}
// Ajout automatique du "u" après le "q"
if (prev_keycode == FG_Q) {
if (prev_keycode == PG_Q) {
switch (next_keycode) {
case FG_E:
case FG_I:
case FG_A:
case FG_O:
case FG_EACU:
case PG_E:
case PG_I:
case PG_A:
case PG_O:
case PG_U:
case E_CIRC:
case FG_APOS:
process_next_key(FG_U, record);
case PG_APOS:
process_next_key(PG_L, record);
break;
// Raccourci pour "quelq"
case FG_Q:
case PG_Q:
clear_recent_keys(); // To prevent infinite loop
process_word((uint16_t[]) {FG_U, FG_E, FG_L}, 3, record);
process_word((uint16_t[]) {PG_L, PG_E, PG_C}, 3, record);
break;
// Raccourci pour "quoi", ça évite un aller-retour sur la main gauche.
case FG_Z:
return finish_word((uint16_t[]) {FG_U, FG_O, FG_I}, 3, record);
case PG_Z:
return finish_word((uint16_t[]) {PG_L, PG_O, PG_I}, 3, record);
// Raccourci pour "quand"
case FG_D:
process_word((uint16_t[]) {FG_U, FG_A, FG_N}, 3, record);
case PG_H:
process_word((uint16_t[]) {PG_L, PG_A, PG_S}, 3, record);
break;
}
} else if (next_keycode == FG_AROB && !isLetter(recent[RECENT_SIZE - 2])) {
} else if (next_keycode == PG_AROB && !isLetter(recent[RECENT_SIZE - 2])) {
switch (prev_keycode) {
case FG_T:
case PG_N:
// "t@" -> "toujours"
return finish_word((uint16_t[]) {FG_O, FG_U, FG_J, FG_O, FG_U, FG_R, FG_S}, 7, record);
return finish_word((uint16_t[]) {PG_O, PG_L, PG_J, PG_O, PG_L, PG_R, PG_T}, 7, record);
case FG_P:
case PG_P:
// "p@" -> "peut-être"
return finish_word((uint16_t[]) {FG_E, FG_U, FG_T, FG_MOIN, FG_ACIR, FG_E, FG_T, FG_R, FG_E}, 9, record);
return finish_word((uint16_t[]) {PG_E, PG_L, PG_N, PG_MOIN, PG_ACIR, PG_E, PG_N, PG_R, PG_E}, 9, record);
case FG_A:
case PG_A:
// "a@" -> "aujourd'hui"
return finish_word((uint16_t[]) {FG_U, FG_J, FG_O, FG_U, FG_R, FG_D, FG_APOS, FG_H, FG_U, FG_I}, 10, record);
return finish_word((uint16_t[]) {PG_L, PG_J, PG_O, PG_L, PG_R, PG_H, PG_APOS, PG_F, PG_L, PG_I}, 10, record);
case FG_B:
case PG_B:
// "b@" -> "beaucoup"
return finish_word((uint16_t[]) {FG_E, FG_A, FG_U, FG_C, FG_O, FG_U, FG_P}, 7, record);
return finish_word((uint16_t[]) {PG_E, PG_A, PG_L, PG_D, PG_O, PG_L, PG_P}, 7, record);
case FG_E:
case PG_E:
// "e@" -> "est-ce qu"
return finish_word((uint16_t[]) {FG_S, FG_T, FG_MOIN, FG_C, FG_E, KC_SPC, FG_Q}, 7, record);
return finish_word((uint16_t[]) {PG_T, PG_N, PG_MOIN, PG_D, PG_E, KC_SPC, PG_Q}, 7, record);
case FG_D:
case PG_H:
// "d@" -> "déjà"
return finish_word((uint16_t[]) {FG_EACU, FG_J, FG_AGRV}, 3, record);
return finish_word((uint16_t[]) {PG_U, PG_J, PG_AGRV}, 3, record);
}
} else if (prev_keycode == FG_P) {
} else if (prev_keycode == PG_P) {
switch (next_keycode) {
case FG_M:
case PG_M:
// "pas"
return finish_word((uint16_t[]) {FG_A, FG_S}, 2, record);
return finish_word((uint16_t[]) {PG_A, PG_T}, 2, record);
case FG_APOS:
case PG_APOS:
// "par"
return finish_word((uint16_t[]) {FG_A, FG_R}, 2, record);
return finish_word((uint16_t[]) {PG_A, PG_R}, 2, record);
case FG_POIN:
case PG_X:
if (!isLetter(recent[RECENT_SIZE - 2])) {
// "pour"
return finish_word((uint16_t[]) {FG_O, FG_U, FG_R}, 3, record);
return finish_word((uint16_t[]) {PG_O, PG_L, PG_R}, 3, record);
}
}
} else if (next_keycode == FG_A && prev_keycode == FG_O) {
} else if (next_keycode == PG_A && prev_keycode == PG_O) {
// "oa" -> "oi"
process_next_key(FG_I, record);
process_next_key(PG_I, record);
return false;
} else if (next_keycode == FG_O && prev_keycode == FG_U && recent[RECENT_SIZE - 2] != FG_Q) {
} else if (next_keycode == PG_O && prev_keycode == PG_L && recent[RECENT_SIZE - 2] != PG_Q) {
// "uo" -> "un"
process_next_key(FG_N, record);
process_next_key(PG_S, record);
return false;
}
switch (next_keycode) {
case FG_QUES:
case FG_EXLM:
case PG_QUES:
case PG_EXCL:
// 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.
if (isLetter(recent[RECENT_SIZE - 1])) {
@ -146,73 +146,73 @@ bool process_clever_keys(uint16_t keycode, keyrecord_t* record) {
case MAGIC:
switch (prev_keycode) {
case FG_T:
process_next_key(FG_I, record);
case FG_I:
return finish_word((uint16_t[]) {FG_O, FG_N}, 2, record);
case PG_N:
process_next_key(PG_I, record);
case PG_I:
return finish_word((uint16_t[]) {PG_O, PG_S}, 2, record);
case FG_C:
return finish_word((uint16_t[]) {FG_APOS, FG_E, FG_S, FG_T}, 4, record);
case PG_D:
return finish_word((uint16_t[]) {PG_APOS, PG_E, PG_T, PG_N}, 4, record);
case FG_D:
return finish_word((uint16_t[]) {FG_A, FG_N, FG_S}, 3, record);
case PG_H:
return finish_word((uint16_t[]) {PG_A, PG_S, PG_T}, 3, record);
case FG_P:
return finish_word((uint16_t[]) {FG_L, FG_U, FG_S}, 3, record);
case PG_P:
return finish_word((uint16_t[]) {PG_C, PG_L, PG_T}, 3, record);
case FG_A:
return finish_word((uint16_t[]) {FG_V, FG_E, FG_C}, 3, record);
case PG_A:
return finish_word((uint16_t[]) {PG_G, PG_E, PG_D}, 3, record);
case FG_S:
return finish_word((uint16_t[]) {FG_U, FG_R}, 2, record);
case PG_T:
return finish_word((uint16_t[]) {PG_L, PG_R}, 2, record);
case FG_B:
process_word((uint16_t[]) {FG_O, FG_N, FG_J}, 3, record);
case PG_B:
process_word((uint16_t[]) {PG_O, PG_S, PG_J}, 3, record);
case FG_J:
return finish_word((uint16_t[]) {FG_O, FG_U, FG_R}, 3, record);
case PG_J:
return finish_word((uint16_t[]) {PG_O, PG_L, PG_R}, 3, record);
case FG_M:
case PG_M:
// "même"
return finish_word((uint16_t[]) {FG_ACIR, FG_E, FG_M, FG_E}, 4, record);
return finish_word((uint16_t[]) {PG_ACIR, PG_E, PG_M, PG_E}, 4, record);
default:
return false;
}
case FG_Q:
if (prev_keycode == FG_J) {
case PG_Q:
if (prev_keycode == PG_J) {
// "jq" -> "jusqu"
process_word((uint16_t[]) {FG_U, FG_S}, 2, record);
process_word((uint16_t[]) {PG_L, PG_T}, 2, record);
}
break;
case CA_CED:
return finish_word((uint16_t[]) {FG_CCED, FG_A}, 2, record);
return finish_word((uint16_t[]) {PG_CCED, PG_A}, 2, record);
case OU_GRV:
return finish_word((uint16_t[]) {FG_O, ALGR(FG_U)}, 2, record);
return finish_word((uint16_t[]) {PG_O, ALGR(PG_L)}, 2, record);
case AGRV_SPC:
return finish_word((uint16_t[]) {FG_AGRV, KC_SPC}, 2, record);
return finish_word((uint16_t[]) {PG_AGRV, KC_SPC}, 2, record);
case E_CIRC:
return process_accent(FG_ACIR, FG_E, record);
return process_accent(PG_ACIR, PG_E, record);
case I_CIRC:
return process_accent(FG_ACIR, FG_I, record);
return process_accent(PG_ACIR, PG_I, record);
case A_CIRC:
return process_accent(FG_ACIR, FG_A, record);
return process_accent(PG_ACIR, PG_A, record);
case O_CIRC:
return process_accent(FG_ACIR, FG_O, record);
return process_accent(PG_ACIR, PG_O, record);
case U_CIRC:
return process_accent(FG_ACIR, FG_U, record);
return process_accent(PG_ACIR, PG_L, record);
case I_TREM:
return process_accent(FG_TREM, FG_I, record);
return process_accent(PG_NREM, PG_I, record);
}
store_keycode(next_keycode, record);

View file

@ -74,20 +74,21 @@ uint16_t get_ongoing_keycode(uint16_t keycode, keyrecord_t* record) {
// Handles custom keycodes.
if (isSendStringMacro(keycode)) { return keycode; }
//if (keycode == FG_CCED) { return FG_CCED; }
//if (keycode == PG_CCED) { return PG_CCED; }
if (IS_LAYER_ON(_ODK)) {
switch (keycode) {
case FG_K:
case FG_J:
case FG_AROB:
case FG_ECIR:
case FG_CCED:
case FG_3PTS:
case PG_K:
case PG_J:
case PG_AROB:
case PG_3PTS:
case KC_SPC: // In order to uppercase J after '?' for ex.
return keycode;
/* case FG_C:
return FG_CCED; */
case PG_VIRG:
return PG_3PTS;
/* case PG_T:
return PG_MOIN; */
default:
clear_recent_keys();
return KC_NO;
}
}
@ -98,7 +99,7 @@ uint16_t get_ongoing_keycode(uint16_t keycode, keyrecord_t* record) {
switch (basic_keycode) {
case KC_A ... KC_SLASH: // These keys type letters, digits, symbols.
case FG_E:
case PG_E:
if (isLetter(basic_keycode) && (mods & ~MOD_BIT(KC_ALGR))) {
// Shift doesn't matter for letters.
@ -161,6 +162,7 @@ void replace_ongoing_key(uint16_t clever_keycode, uint16_t* ongoing_keycode, key
void process_word(uint16_t keycodes[], uint8_t num_keycodes, keyrecord_t* record) {
for (int i = 0; i < num_keycodes; ++i) {
process_key(keycodes[i], record); // Better solution, if there is enought space in the chip.
//tap_code(keycodes[i]);
}
bkspc_countdown = num_keycodes;
}

View file

@ -33,25 +33,26 @@ enum combos {
PANIC,
NUMWRD,
ALTTAB,
//CTRLALT,
L_APOST,
D_APOST,
};
const uint16_t PROGMEM del_combo_d[] = {FG_S, FG_N, COMBO_END};
const uint16_t PROGMEM bkspc_combo_d[] = {FG_N, FG_R, COMBO_END};
const uint16_t PROGMEM del_word_combo[] = {FG_M, FG_L, COMBO_END};
const uint16_t PROGMEM bk_word_combo[] = {FG_L, FG_APOS, COMBO_END};
const uint16_t PROGMEM enter_combo[] = {FG_P, FG_EACU, COMBO_END};
const uint16_t PROGMEM tab_combo[] = {FG_T, FG_I, COMBO_END};
const uint16_t PROGMEM esc_combo[] = {FG_T, FG_A, COMBO_END};
const uint16_t PROGMEM bkspc_combo_g[] = {FG_A, FG_I, COMBO_END};
const uint16_t PROGMEM home_combo[] = {FG_Z, FG_Y, COMBO_END};
const uint16_t PROGMEM end_combo[] = {FG_EACU, FG_VIRG, COMBO_END};
const uint16_t PROGMEM help_combo[] = {FG_VIRG, FG_APOS, COMBO_END};
const uint16_t PROGMEM panic_combo[] = {FG_EACU, FG_L, COMBO_END};
const uint16_t PROGMEM numword_combo[] = {FG_S, FG_R, COMBO_END};
const uint16_t PROGMEM alttab_combo[] = {FG_D, FG_Y, COMBO_END};
//const uint16_t PROGMEM ctrlalt_Combo[] = {FG_A, FG_I, FG_T, 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 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 enter_combo[] = {PG_P, PG_U, 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 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 end_combo[] = {PG_U, PG_EACU, COMBO_END};
const uint16_t PROGMEM help_combo[] = {PG_EACU, PG_APOS, 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 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 d_apost_combo[] = {PG_D, PG_F, COMBO_END};
combo_t key_combos[] = {
[R_BKSPC] = COMBO(bkspc_combo_d, KC_BSPC),
@ -68,17 +69,19 @@ combo_t key_combos[] = {
[PANIC] = COMBO(panic_combo, RAZ),
[NUMWRD] = COMBO(numword_combo, NUMWORD),
[ALTTAB] = COMBO(alttab_combo, KC_NO),
//[CTRLALT] = COMBO(ctrlalt_Combo, RCTL(RALT(KC_DEL)))
[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) {
case HOME:
return COMBO_TERM - 10;
case L_APOST:
case D_APOST:
return 100;
default:
return COMBO_TERM;
}
} */
}
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.
@ -92,6 +95,8 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode
case ENTER:
case HOME:
case END:
case L_APOST:
case D_APOST:
return true;
default:
@ -121,10 +126,10 @@ bool process_combo_key_repress(uint16_t combo_index, combo_t *combo, uint8_t key
switch (combo_index) {
case ALTTAB:
switch (keycode) {
case FG_Y:
case PG_Y:
tap_code16(S(KC_TAB));
return true;
case FG_D:
case PG_H:
tap_code(KC_TAB);
return true;
}

View file

@ -16,7 +16,7 @@
#include "macros.h"
bool is_odk_shifted = false;
bool is_apos_dr = false;
bool process_macros(uint16_t keycode, keyrecord_t *record) {
//const uint8_t mods = get_mods();
@ -66,6 +66,10 @@ bool process_macros(uint16_t keycode, keyrecord_t *record) {
if (is_caps_lock_on()) { tap_code(KC_CAPS); }
caps_word_toggle();
return false;
case TG_APOS:
is_apos_dr = !is_apos_dr;
return false;
}
}
return true; // Process all other keycodes normally

View file

@ -22,7 +22,8 @@
#ifdef __cplusplus
extern "C" {
#endif
extern bool is_odk_shifted;
extern bool is_apos_dr;
bool process_macros(uint16_t keycode, keyrecord_t *record);

View file

@ -55,23 +55,23 @@ bool should_exit_num_word(uint16_t keycode, const keyrecord_t *record) {
// Numpad keycodes
case KC_1 ... KC_0:
case KC_PDOT:
case FG_POIN:
//case FG_VIRG:
case FG_MOIN:
case FG_ASTX:
case FG_PLUS:
case FG_SLSH:
case FG_ACIR:
case FG_CARN:
case PG_X:
//case PG_EACU:
case PG_MOIN:
case PG_ASTX:
case PG_PLUS:
case PG_SLSH:
case PG_ACIR:
case PG_CARN:
// Misc
case KC_BSPC:
case FG_ODK: // Not to exit Numword when chording it with ODK
case PG_ODK: // Not to exit Numword when chording it with ODK
case NUMWORD: // For the combo NUMWORD to work
/*
case FG_EGAL:
case FG_BSLS:*/
case PG_EGAL:
case PG_BSLS:*/
return false;
}

View file

@ -23,7 +23,7 @@ bool is_num_word_enabled(void);
extern bool is_num_word_on;
void enable_num_word(void);
extern void disable_num_word(void);
void disable_num_word(void);
void toggle_num_word(void);
bool process_numword(uint16_t keycode, const keyrecord_t *record);

View file

@ -14,9 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "odk_layer.h"
#include "odk_layer.h"
static uint16_t odk_keycode = KC_NO;
//static uint16_t odk_keycode = KC_NO;
bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
@ -29,94 +29,61 @@ bool process_odk_layer(uint16_t keycode, keyrecord_t *record) {
// Handle the custom OSL that go with this feature
// It's timerless, to avoid problems when rolling with an other key, when shift is on.
// Custom behaviour when alt-gr
if (mods & MOD_BIT(KC_ALGR)) {
tap_code16(ALGR(FG_ODK));
/* if (mods & MOD_BIT(KC_ALGR)) {
tap_code16(ALGR(PG_ODK));
return false;
}
} */
is_shifted = mods & MOD_MASK_SHIFT;
if (is_shifted) {
del_weak_mods(MOD_MASK_SHIFT);
del_oneshot_mods(MOD_MASK_SHIFT);
unregister_mods(MOD_MASK_SHIFT);
}
layer_on(_ODK);
odk_keycode = KC_NO;
return false;
} else if (keycode == FG_ODK) {
} else if (keycode == PG_ODK) {
// Special behaviour of FR_ODK when shifted
// Shift must apply to the next keycode
/* is_shifted = 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(FR_ODK);
return true;
} else if (IS_LAYER_ON(_ODK)) {
if (odk_keycode == KC_NO) { odk_keycode = keycode; }
//if (!IS_QK_USER(keycode)) { odk_keycode = keycode; }
switch (keycode) {
case FG_AROB:
case FG_K:
case FG_J:
case FG_ECIR:
case PG_3PTS: // For Clever Keys
case PG_AROB:
case PG_K:
case PG_J:
//case PG_ECIR:
case J_APOS:
case OU_GRV:
case FG_CCED:
//case CA_CED:
//case AGRV_SPC:
//case PG_CCED:
case KC_SPC: // When space is added by Clever Keys
case FG_3PTS:
case CNL_ODK:
break;
default:
/* is_shifted = 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(FG_ODK);
tap_code(PG_ODK);
}
if (!IS_LAYER_ON(_APOS_DR)) {
if (!is_apos_dr) {
switch (keycode) {
case FG_M:
case FG_L:
case PG_M:
case PG_C:
is_shifted = true;
}
}
if (is_shifted) {
is_shifted = false;
//set_mods(mods);
set_oneshot_mods(MOD_BIT(KC_LSFT));
is_shifted = false;
}
//exit_odk = true;
} else {
odk_keycode = KC_NO;
}
} else { // On release
switch (keycode) {
case OS_ODK:
case FG_ODK:
break;
default:
//if (exit_odk) { odk_layer_exit_check(); }
if (keycode == odk_keycode) {
layer_off(_ODK);
odk_keycode = KC_NO;
}
}
}
return true;
}
void odk_layer_exit_check(uint16_t keycode) {
/* void odk_layer_exit_check(uint16_t keycode) {
if (keycode == odk_keycode) {
layer_off(_ODK);
odk_keycode = KC_NO;
}
}
} */

View file

@ -25,7 +25,7 @@ extern "C" {
#endif
bool process_odk_layer(uint16_t keycode, keyrecord_t *record);
void odk_layer_exit_check(uint16_t keycode);
//void odk_layer_exit_check(uint16_t keycode);
#ifdef __cplusplus
}

View file

@ -72,14 +72,17 @@ bool process_custom_tap_hold(uint16_t keycode, keyrecord_t *record) {
if (record->tap.count) { // Handling of special tap-hold keys (on tap).
switch (keycode) {
/* case ALGR_T(FG_LACL):
return process_tap_hold(FG_LACL, record); */
/* case ALGR_T(PG_CACL):
return process_tap_hold(PG_CACL, record); */
case RCTL_T(FEN_B):
return process_tap_hold(LWIN(KC_DOWN), record);
case SFT_T(COPY):
return process_tap_hold(C(FG_C), record);
return process_tap_hold(C(PG_C), record);
case LT_NUMWORD:
return process_numword(NUMWORD, record);
case LT_REPT:
repeat_key_invoke(&record->event);

View file

@ -20,13 +20,14 @@ bool is_caps_lock_on(void) { return host_keyboard_led_state().caps_lock; }
bool isLetter(uint16_t keycode) {
switch (keycode) {
case KC_A ... KC_N:
case KC_Q ... KC_V:
case KC_X ... KC_Z:
case FG_U:
case FG_E:
case FG_AGR:
case FG_ECIR:
case KC_A ... KC_F:
case KC_H ... KC_N:
case KC_R ... KC_Z:
case PG_L:
case PG_X:
case PG_E:
//case PG_AGR:
//case PG_ECIR:
case KC_GRV ... KC_DOT:
return true;
@ -39,7 +40,10 @@ bool isSendStringMacro(uint16_t keycode) {
switch (keycode) {
//case AGRV_SPC:
//case CA_CED:
case L_APOS:
case D_APOS:
case OU_GRV:
case J_APOS:
case MAGIC:
return true;
@ -63,12 +67,12 @@ uint16_t tap_hold_extractor(uint16_t keycode) {
bool caps_word_press_user(uint16_t keycode) {
// Caps Word shouldn't be applied with Alt-gr
// Managing underscore on alt gr + E/T.
// Managing underscore and slash on alt gr + E/T.
// Underscore and slash must continue Caps Word, without shifting.
if ((get_mods() & MOD_BIT(KC_ALGR))) {
switch (keycode) {
case FG_E:
case FG_T:
case PG_E:
case PG_N:
return true;
default:
return false;
@ -77,44 +81,44 @@ bool caps_word_press_user(uint16_t keycode) {
if (IS_LAYER_ON(_ODK)) {
switch (keycode) {
case FG_VIRG:
case PG_EACU:
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
return true;
case FG_I:
case FG_H:
case PG_I:
case PG_F:
return true;
case FG_U:
case FG_D:
case FG_G:
case FG_B:
case FG_F:
case FG_M:
case FG_L:
case FG_S:
case FG_N:
case PG_L:
case PG_H:
case PG_VIRG:
case PG_B:
case PG_V:
case PG_M:
case PG_C:
case PG_T:
case PG_S:
return false;
}
}
//
// Keycodes that continue Caps Word, with shift applied.
if (isLetter(keycode)) {
// @ must be shifted, bc of CleverKeys using it.
if (isLetter(keycode) || isSendStringMacro(keycode) || keycode == PG_AROB) {
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
return true;
}
switch (keycode) {
// Keycodes that continue Caps Word, without shifting.
case FG_ODK:
//case FG_GRV:
case FG_MOIN:
case PG_ODK:
//case PG_GRV:
case PG_UNDS:
case PG_MOIN:
case KC_KP_1 ... KC_KP_0:
case KC_LEFT:
case KC_RIGHT:
case KC_BSPC:
case KC_DEL:
case FG_APOS:
case PG_APOS:
return true;
default:
@ -137,7 +141,7 @@ bool os4a_layer_changer(uint16_t keycode) {
case OS_FA:
case NUMWORD:
case TT_FA:
case TG_APOD:
//case TG_APOD:
return true;
default:
return false;
@ -174,9 +178,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.
// 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.
//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_BIT(KC_ALGR))) { return true;}
if (keycode == OS_ODK && (mods & ~MOD_BIT(KC_ALGR))) { return true;}
switch (keycode) {
//case OS_ODK: /!\ A ne pas remettre, sous peine de ne pas pouvoir faire shift + typo + touche de l'autre côté
@ -190,7 +194,7 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
case OS_FA:
case NUMWORD:
case TT_FA:
case FG_ODK:
case PG_ODK:
return true;
default:
return false;
@ -213,17 +217,17 @@ bool remember_last_key_user(uint16_t keycode, keyrecord_t* record, uint8_t* reme
uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
switch (keycode) {
case C(FG_Z):
return C(FG_Y);
case C(FG_Y):
return C(FG_Z);
case C(PG_Z):
return C(PG_Y);
case C(PG_Y):
return C(PG_Z);
}
if ((get_mods() | get_weak_mods()) & MOD_BIT(KC_ALGR)) {
/* if ((get_mods() | get_weak_mods()) & MOD_BIT(KC_ALGR)) {
return KC_SPC;
}
} */
keycode = tap_hold_extractor(keycode);
if (isLetter(keycode)) { return MAGIC; }
if (isLetter(keycode) || keycode == PG_APOS) { return MAGIC; }
return KC_TRNS; // Defer to default definitions.
}

View file

@ -23,12 +23,12 @@ bool is_caps_lock_on(void) { return host_keyboard_led_state().caps_lock; }
bool isLetter(uint16_t keycode) {
switch (keycode) {
case KC_A ... KC_L:
case FG_M:
case PG_M:
case KC_N ... KC_Z:
case FG_AGRV:
case FG_EACU:
case FG_EGRV:
case FG_CCED:
case PG_AGRV:
case PG_U:
case PG_EGRV:
case PG_CCED:
return true;
default:
@ -64,13 +64,13 @@ bool caps_word_press_user(uint16_t keycode) {
} else {
switch (keycode) {
// Keycodes that continue Caps Word, without shifting.
case FG_MOIN:
case PG_MOIN:
case KC_KP_1 ... KC_KP_0:
case KC_LEFT:
case KC_RIGHT:
case KC_BSPC:
case KC_DEL:
case FG_APOS:
case PG_APOS:
return true;
default:
@ -87,24 +87,24 @@ uint16_t COMBO_LEN = 0;
// Custom altGr keys
const custom_altgr_key_t custom_altgr_keys[] = {
{FG_AGRV, FG_AE},
{FG_B, FG_SS},
{FG_A, FG_LDAQ},
{FG_I, FG_RDAQ},
{FG_T, FG_ESPR},
{FG_S, FG_AROB},
{ALGR_T(FG_A), FG_LDAQ},
{LCTL_T(FG_I), FG_RDAQ},
{RCTL_T(FG_T), FG_ESPR},
{ALGR_T(FG_S), FG_AROB},
{FG_X, FG_TM},
{KC_KP_8, FG_INFN},
{FG_H, FG_HASH},
{FG_V, FG_DEG},
{FG_CCED, FG_CEDL},
{FG_Q, FG_SECT},
{FG_POIN, FG_PVIR},
{FG_C, FG_COPY},
{PG_AGRV, PG_AE},
{PG_B, PG_TS},
{PG_A, PG_CDAQ},
{PG_I, PG_RDAQ},
{PG_N, PG_ESPR},
{PG_T, PG_AROB},
{ALGR_T(PG_A), PG_CDAQ},
{LCTL_T(PG_I), PG_RDAQ},
{RCTL_T(PG_N), PG_ESPR},
{ALGR_T(PG_T), PG_AROB},
{PG_POIN, PG_NM},
{KC_KP_8, PG_INFN},
{PG_F, PG_HASH},
{PG_G, PG_HEG},
{PG_CCED, PG_DEDL},
{PG_Q, PG_TECT},
{PG_X, PG_PVIR},
{PG_D, PG_DOPY},
};
uint8_t NUM_CUSTOM_ALTGR_KEYS =
@ -156,9 +156,9 @@ bool forbidden_chord(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record, ui
bool first_of_chorded_mods(uint16_t keycode) {
switch (keycode) {
case LT_TAB: // Pour pouvoir faire OSM shift + LT_TAB (win + shift + flèche).
case FG_CCED: // Pour pouvoir faire Alt + F4, Alt + F11.
case LCTL_T(FG_I):
case RCTL_T(FG_T):
case PG_CCED: // Pour pouvoir faire Alt + F4, Alt + F11.
case LCTL_T(PG_I):
case RCTL_T(PG_N):
case OSM(MOD_LSFT): // Pour pouvoir faire OSM shift + LT_TAB (win + shift + flèche).
return true;
@ -234,10 +234,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_BASE] = LAYOUT(
KC_ESC, FG_AGRV, FG_B, FG_EACU, FG_POIN, FG_MOIN, FG_ACIR, FG_V, FG_L, FG_M, FG_X, FG_W,
KC_ENT, ALT_T(FG_O), SFT_T(FG_U), ALGR_T(FG_A), LCTL_T(FG_I), FG_J, FG_G, RCTL_T(FG_T), ALGR_T(FG_S), RSFT_T(FG_N), ALT_T(FG_R), FG_F,
LT_TAB, FG_Q, FG_Y, FG_EGRV, LWIN_T(FG_P), FG_DQUO, KC_BSPC, KC_END, KC_HOME, KC_DEL, FG_K, RWIN_T(FG_D), FG_Z, FG_H, FG_C, FG_CCED,
TG(_SYMBOLS), KC_SPC, OSM(MOD_LSFT), LT(_SYMBOLS,FG_E), LT_VIRG, LT_APOS, LT(_SYMBOLS,KC_SPC), OSM(MOD_RSFT), KC_RGUI, KC_MUTE
KC_ESC, PG_AGRV, PG_B, PG_U, PG_X, PG_MOIN, PG_ACIR, PG_G, PG_C, PG_M, PG_POIN, PG_W,
KC_ENT, ALT_T(PG_O), SFT_T(PG_L), ALGR_T(PG_A), LCTL_T(PG_I), PG_J, PG_VIRG, RCTL_T(PG_N), ALGR_T(PG_T), RSFT_T(PG_S), ALT_T(PG_R), PG_V,
LT_TAB, PG_Q, PG_Y, PG_EGRV, LWIN_T(PG_P), PG_HQUO, KC_BSPC, KC_END, KC_HOME, KC_DEL, PG_K, RWIN_T(PG_H), PG_Z, PG_F, PG_D, PG_CCED,
TG(_SYMBOLS), KC_SPC, OSM(MOD_LSFT), LT(_SYMBOLS,PG_E), LT_VIRG, LT_APOS, LT(_SYMBOLS,KC_SPC), OSM(MOD_RSFT), KC_RGUI, KC_MUTE
),
@ -256,10 +256,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_SYMBOLS] = LAYOUT(
KC_ESC, FG_EXLM, FG_QUES, FG_ESPR, FG_PVIR, FG_PIPE, FG_MOIN, KC_P7, KC_P8, KC_P9, FG_ASTX, KC_NUM,
_______, FG_LACL, SFT_T(FG_RACL), ALGR_T(FG_LPRN), FG_RPRN, LAYER_LCK, FG_EGAL, RCTL_T(KC_P4), ALGR_T(KC_P5), KC_P6, FG_SLSH, FG_BSLS,
_______, FG_LBKT, FG_RBKT, FG_INF, FG_SUP, FG_CARN, _______, _______, _______, _______, FG_ACIR, KC_P1, KC_P2, KC_P3, FG_PLUS, FG_PERC,
_______, _______, _______, KC_SPC, FG_VIRG, NUMWORD, KC_P0, KC_PDOT, _______ , _______
KC_ESC, PG_EXCL, PG_QUES, PG_ESPR, PG_PVIR, PG_PIPE, PG_MOIN, KC_P7, KC_P8, KC_P9, PG_ASTX, KC_NUM,
_______, PG_CACL, SFT_T(PG_RACL), ALGR_T(PG_LPRN), PG_RPRN, LAYER_LCK, PG_EGAL, RCTL_T(KC_P4), ALGR_T(KC_P5), KC_P6, PG_TLSH, PG_BSLS,
_______, PG_CBKT, PG_RBKT, PG_INF, PG_SUP, PG_CARN, _______, _______, _______, _______, PG_ACIR, KC_P1, KC_P2, KC_P3, PG_PLUS, PG_PERC,
_______, _______, _______, KC_SPC, PG_EACU, NUMWORD, KC_P0, KC_PDOT, _______ , _______
),
/*
* Layer 2 : Symbols + function keys
@ -276,9 +276,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_SHORTNAV] = LAYOUT(
KC_ESC, A(KC_F4), ALT_TAB, LWIN(FG_V), _______, _______, _______, C(KC_LEFT), KC_UP, C(KC_RIGHT), _______, _______,
_______, C(FG_A), C(FG_X), C(FG_V), C(FG_C), LAYER_LCK, KC_MUTE, RCTL_T(KC_LEFT), KC_DOWN, KC_RIGHT, KC_F2 , KC_MUTE,
_______, SELWORD, LWIN(KC_TAB), REV_TAB, ALT_TAB, _______, _______, S(KC_END), S(KC_HOME), _______, _______, C(FG_Z), C(FG_Y), _______, _______, _______,
KC_ESC, A(KC_F4), ALT_TAB, LWIN(PG_G), _______, _______, _______, C(KC_LEFT), KC_UP, C(KC_RIGHT), _______, _______,
_______, C(PG_A), C(PG_POIN), C(PG_G), C(PG_D), LAYER_LCK, KC_MUTE, RCTL_T(KC_LEFT), KC_DOWN, KC_RIGHT, KC_F2 , KC_MUTE,
_______, SELWORD, LWIN(KC_TAB), REV_TAB, ALT_TAB, _______, _______, S(KC_END), S(KC_HOME), _______, _______, C(PG_Z), C(PG_Y), _______, _______, _______,
_______, _______, _______, QUES_PT, QUES_PT, EXCL_PT, EXCL_PT, _______, _______, _______
),
@ -299,7 +299,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FUNCAPPS] = LAYOUT(
KC_ESC, KC_F12, KC_F9, KC_F8, KC_F7, C(KC_PAUS), _______, SWIN(KC_LEFT), LWIN(KC_UP), SWIN(KC_RIGHT), _______, QK_BOOT,
_______, ALT_T(KC_F11), SFT_T(KC_F6), KC_F5, KC_F4, LAYER_LCK, _______, RCTL_T(FEN_G), LWIN(KC_DOWN), LWIN(KC_RIGHT), _______, _______,
_______, KC_F10, KC_F3, KC_F2, KC_F1, _______, _______, _______, _______, _______, _______, LWIN(FG_D), LWIN(KC_HOME), _______, _______, _______,
_______, KC_F10, KC_F3, KC_F2, KC_F1, _______, _______, _______, _______, _______, _______, LWIN(PG_H), LWIN(KC_HOME), _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

View file

@ -115,7 +115,7 @@ void post_process_record_user(uint16_t keycode, keyrecord_t* record) {
//if (os4a_layer != 0 && exit_os4a_layer) { os4a_layer_off(os4a_layer); }
os4a_layer_exit_check();
numword_exit_check();
odk_layer_exit_check(keycode);
//odk_layer_exit_check(keycode);
end_CK(record);
}
@ -138,30 +138,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_BASE] = LAYOUT(
KC_NO, FG_X, FG_VIRG, FG_EACU, FG_P, FG_B, FG_F, FG_M, FG_L, FG_APOS, FG_POIN, KC_NO,
KC_NO, FG_O, FG_A, FG_I, FG_T, FG_G, FG_V, FG_S, FG_N, FG_R, FG_U, KC_NO,
KC_NO, FG_Q, FG_Z, FG_Y, FG_D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FG_C, FG_H, FG_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
),
// * Layer template
// *
// * ,-------------------------------------------. ,-------------------------------------------.
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
// * | | | | | | | | | | | | | | | | | |
// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
// * | | | | | | | | | | | |
// * | | | | | | | | | | | |
// * `----------------------------------' `----------------------------------'
// */
[_APOS_DR] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, FG_APOD, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
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_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, KC_SPC, L_OS4A, LT_E, LT_MGC, LT_REPT, LT_SPC, R_OS4A, KC_RGUI, KC_NO
),
/*
@ -200,13 +180,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_R_MODS] = LAYOUT(
_______, _______, _______, _______, _______, _______, KC_NO, KC_RGUI, OS_WIN, TG_APOD, KC_NO, KC_NO,
_______, _______, _______, _______, _______, _______, TT_FA, OS_SHFT, OS_CTRL, NUMWORD, FG_ODK, KC_NO,
_______, _______, _______, _______, _______, _______, KC_NO, KC_RGUI, OS_WIN, TG_APOS, KC_NO, KC_NO,
_______, _______, _______, _______, _______, _______, TT_FA, OS_SHFT, OS_CTRL, NUMWORD, PG_ODK, KC_NO,
_______, _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, OS_FA, OS_LALT, KC_NO,
_______, _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_NO
),
/*
* Layer : Symbols
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | ^ | { | } | $ | # | | % | " | = | ! | ` | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | ? | ( | ) | ; | : | | \ | / | - | + | * | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | < | [ | ] | > | | | | | | | | ' | & | | | ~ | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[_SYMBOLS] = LAYOUT(
_______, 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, _______,
_______, PG_INF, PG_LSBR, PG_RSBR, PG_SUP, _______, _______, _______, _______, _______, _______, PG_APOD, PG_ESPR, PG_PIPE, PG_TILD, _______,
_______, _______, _______, PG_UNDS, KC_SPC, _______, _______, _______, _______, _______
),
/*
* Layer 1 : Numpad
@ -223,10 +224,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_NUMBERS] = LAYOUT(
_______, _______, FG_ASTX, FG_EGAL, KC_7, FG_PERC, S(FG_ACIR), _______, FG_PLUS, FG_MOIN, _______, _______,
_______, KC_4, KC_3, KC_2, MT_1, _______, FG_CARN, MT_SLSH, KC_6, KC_7, KC_8, _______,
_______, _______, _______, _______, KC_5, _______, _______, _______, _______, _______, _______, KC_9, KC_6, _______, FG_ODK, _______,
_______, _______, KC_PDOT, KC_0 , NUMWORD, LT_REPT, KC_SPC, _______, _______, _______
_______, PG_DLR, PG_MOIN, PG_PLUS, KC_7, S(PG_ACIR), PG_PERC, _______, PG_EGAL, PG_ASTX, _______, _______,
_______, KC_4, KC_3, KC_2, MT_1, PG_CARN, _______, MT_SLSH, KC_6, KC_7, KC_8, _______,
_______, _______, _______, _______, KC_5, _______, _______, _______, _______, _______, _______, KC_9, KC_6, _______, PG_ODK, _______,
_______, _______, KC_PDOT, KC_0 , LT_NUMWORD, LT_REPT, KC_SPC, KC_PDOT, _______, _______
),
@ -246,9 +247,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_ODK] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, OU_GRV, _______, _______, FG_3PTS, _______, _______, FG_J, FG_D, FG_AROB, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, FG_CCED, _______, FG_K, CNL_ODK, _______,
_______, _______, _______, _______, FG_ECIR, _______, _______, _______, _______, _______
_______, OU_GRV, PG_R, _______, PG_T, _______, _______, PG_A, _______, PG_AROB, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, PG_K, CNL_ODK, _______,
_______, _______, _______, _______, PG_O, J_APOS, PG_J, _______, _______, _______
),
@ -267,9 +268,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
*/
[_SHORTNAV] = LAYOUT(
_______, KC_BSPC, LWIN(KC_TAB), LWIN(FG_V), RCS(FG_V), KC_VOLU, KC_PGUP, C(KC_LEFT), KC_UP, C(KC_RGHT), _______, _______,
_______, C(FG_A), C(FG_X), C(FG_V), SFT_T(COPY), KC_VOLD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F2 , _______,
_______, KC_SPC, KC_SPC, KC_MUTE, C(FG_Z), C(FG_Y), _______, _______, _______, _______, _______, C(KC_PGUP), C(KC_PGDN), C(FG_W), _______, _______,
_______, KC_BSPC, LWIN(KC_TAB), LWIN(PG_V), RCS(PG_V), KC_VOLU, KC_PGUP, C(KC_LEFT), KC_UP, C(KC_RGHT), _______, _______,
_______, C(PG_A), C(PG_X), C(PG_V), SFT_T(COPY), KC_VOLD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F2 , _______,
_______, KC_SPC, KC_SPC, KC_MUTE, C(PG_Z), C(PG_Y), _______, _______, _______, _______, _______, C(KC_PGUP), C(KC_PGDN), C(PG_W), _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

View file

@ -18,7 +18,7 @@
#include QMK_KEYBOARD_H
#include "keymap_french_frgo.h"
#include "keymap_french_propergol.h"
#include "features_conf.h"
#include "clever_keys.h"
#include "features/tap_hold_utilities.h"
@ -32,11 +32,12 @@
enum layers {
_BASE = 0,
_APOS_DR,
//_APOS_DR,
// OS4A layers should be as closed as base layer as possible
_L_MODS,
_R_MODS,
_ODK,
_SYMBOLS,
_NUMBERS,
_SHORTNAV,
_FUNCAPPS,
@ -50,40 +51,40 @@ enum custom_keycodes {
OS4A,
RAZ,
CAPSWORD,
//AGRV_SPC,
OU_GRV,
J_APOS,
//E_CIRC,
/* I_CIRC,
A_CIRC,
O_CIRC,
U_CIRC,
I_TREM,
CA_CED,
CIRC,
TILDE,
GRAVE, */
I_TREM,*/
MAGIC,
OS_SHFT,
OS_CTRL,
OS_RALT,
OS_LALT,
OS_WIN,
OS_ODK,
CNL_ODK
//OS_ODK,
CNL_ODK,
TG_APOS,
L_APOS,
D_APOS
};
// Layer taps
#define LT_SPC ALGR_T(KC_SPC)
#define LT_E ALGR_T(FG_E)
#define LT_REPT LT(_NUMBERS, KC_0)
#define LT_MGC LT(_SHORTNAV, KC_0)
#define LT_SPC LT(_SYMBOLS, KC_SPC)
#define LT_E LT(_SYMBOLS, PG_E)
#define LT_REPT LT(_NUMBERS, KC_1)
#define LT_MGC LT(_SHORTNAV, KC_1)
#define OS_FA OSL(_FUNCAPPS)
#define TT_FA TT(_FUNCAPPS)
#define TG_APOD TG(_APOS_DR)
#define MT_SLSH SFT_T(FG_SLSH)
//#define TG_APOD TG(_APOS_DR)
#define MT_SLSH SFT_T(PG_SLSH)
#define MT_1 SFT_T(KC_1)
#define LT_NUMWORD LT(_SHORTNAV, NUMWORD)
#define E_CIRC S(FG_0)
//#define OS_ODK OSL(_ODK)
#define OS_ODK OSL(_ODK)
// One shot mods
#define L_OS4A LSFT_T(OS4A)

View file

@ -24,82 +24,82 @@
/*
*
*  Ç  1  2  3  4  5  6  7  8  9  0  /  *        
*  `  1  2  3  4  5  6  7  8  9  0  /  =        
*
*       X  ,  É  P  B  F  M  L  '  .  =  +      
*       .  É  U  P  B  V  M  C    X  '  -      
*     
*        O  A  I  T  G  V  S  N  R  U  -       
*        O  A  I  N  ,  G  T  S  R  L  [  ]     
*
*      E  Q  Z  Y  D  J  K  C  H  W  **          
*      E  Q  Z  Y  H  J  K  D  F  W  **          
*
*                                                     
*
*/
// Row 1
#define FG_CCED KC_GRV // ç
#define FG_1 KC_1 // 1
#define FG_2 KC_2 // 2
#define FG_3 KC_3 // 3
#define FG_4 KC_4 // 4
#define FG_5 KC_5 // 5
#define FG_6 KC_6 // 6
#define FG_7 KC_7 // 7
#define FG_8 KC_8 // 8
#define FG_9 KC_9 // 9
#define FG_0 KC_0 // 0
#define FG_SLSH KC_MINS // /
#define FG_ASTX KC_EQL // *
#define PG_GRV KC_GRV // `
#define FG_1 KC_1 // 1
#define FG_2 KC_2 // 2
#define FG_3 KC_3 // 3
#define FG_4 KC_4 // 4
#define FG_5 KC_5 // 5
#define FG_6 KC_6 // 6
#define FG_7 KC_7 // 7
#define FG_8 KC_8 // 8
#define FG_9 KC_9 // 9
#define FG_0 KC_0 // 0
#define PG_SLSH KC_MINS // /
#define PG_EGAL KC_EQL // =
// Row 2
#define FG_X KC_Q // X
#define FG_VIRG KC_W // ,
#define FG_EACU KC_E // É
#define FG_P KC_R // P
#define FG_B KC_T // B
#define FG_F KC_Y // F
#define FG_M KC_U // M
#define FG_L KC_I // L
#define FG_APOS KC_O //
#define FG_POIN KC_P // .
#define FG_EGAL KC_LBRC // =
#define FG_PLUS KC_RBRC // +
#define PG_POIN KC_Q // .
#define PG_EACU KC_W // É
#define PG_U KC_E // U
#define PG_P KC_R // P
#define PG_B KC_T // B
#define PG_V KC_Y // V
#define PG_M KC_U // M
#define PG_C KC_I // C
#define PG_APOS KC_O //
#define PG_X KC_P // X
#define PG_APOD KC_LBRC // '
#define PG_MOIN KC_RBRC // -
// Row 3
#define FG_O KC_A // O
#define FG_A KC_S // A
#define FG_I KC_D // I
#define FG_T KC_F // T
#define FG_G KC_G // G
#define FG_V KC_H // V
#define FG_S KC_J // S
#define FG_N KC_K // N
#define FG_R KC_L // R
#define FG_U KC_SCLN // U
#define FG_MOIN KC_QUOT // -
#define FG_APOD KC_NUHS // '
#define PG_O KC_A // O
#define PG_A KC_S // A
#define PG_I KC_D // I
#define PG_N KC_F // N
#define PG_VIRG KC_G // ,
#define PG_G KC_H // G
#define PG_T KC_J // T
#define PG_S KC_K // S
#define PG_R KC_L // R
#define PG_L KC_SCLN // L
#define PG_LSBR KC_QUOT // [
#define PG_RSBR KC_NUHS // ]
// Row 4
#define FG_E KC_NUBS // E
#define FG_Q KC_Z // Q
#define FG_Z KC_X // Z
#define FG_Y KC_C // Y
#define FG_D KC_V // D
#define FG_J KC_B // J
#define FG_K KC_N // K
#define FG_C KC_M // C
#define FG_H KC_COMM // H
#define FG_W KC_DOT // W
#define FG_ODK KC_SLSH // **
#define PG_E KC_NUBS // E
#define PG_Q KC_Z // Q
#define PG_Z KC_X // Z
#define PG_Y KC_C // Y
#define PG_H KC_V // H
#define PG_J KC_B // J
#define PG_K KC_N // K
#define PG_D KC_M // C
#define PG_F KC_COMM // H
#define PG_W KC_DOT // W
#define PG_ODK KC_SLSH // **
/* Shifted symbols
*
*                                              
*  ~  |  <  >  $  %  ^  &  _  #  @  *  \        
*
*          !                    ?  :           
*       ?                       !     " │ + │     
*     
*                                         ?     
*                    :                          
*
*                                    ;           
*
@ -107,33 +107,48 @@
*
*/
// Row 3
#define FG_3PTS S(FG_0) // …
// Row 1
#define PG_TILD S(KC_GRV) // ~
#define PG_PIPE S(KC_1) // |
#define PG_INF S(KC_2) // <
#define PG_SUP S(KC_3) // >
#define PG_DLR S(KC_4) // $
#define PG_PERC S(KC_5) // %
#define PG_ACIR S(KC_6) // ^
#define PG_ESPR S(KC_7) // &
#define PG_UNDS S(KC_8) // _
#define PG_HASH S(KC_9) // #
#define PG_AROB S(KC_0) // @
#define PG_ASTX S(PG_SLSH) // *
#define PG_BSLS S(PG_EGAL) // '\'
// Row 2
#define FG_EXLM S(FG_VIRG) // !
#define FG_QUES S(FG_APOS) // ?
#define FG_2PTS S(FG_POIN) // :
#define FG_DIFF S(FG_EGAL) // ≠
#define PG_QUES S(PG_POIN) // ?
#define PG_EXCL S(PG_APOS) // !
#define PG_DQUO S(PG_APOD) // "
#define PG_PLUS S(PG_MOIN) // +
//#define PG_DIFF S(PG_EGAL) // ≠
// Row 3
#define PG_2PTS S(PG_VIRG) // :
// Row 4
//#define FG_PVIR S(FG_ODK)
#define PG_PVIR S(PG_ODK)
// Row 5
#define FG_NBSP S(KC_SPC) // Espace insecable
#define PG_NBSP S(KC_SPC) // Espace insecable
/* AltGr symbols
*
*                         à  ê        
*                                    
*
*       ^  !  =  $  %  #  ;  '  ?  :            
*       ^  {  }  $  #  %  " │ = │ ! │ ` │   │   │     
*     
*        *  +  -  /  \  `  (  )  <  >           
*        ?  (  )  ;  :  \  /  -  +  *           
*
*      _  ~  |  &  " │ @ │   │ { │ } │ [ │ ] │          
*      _  <  [  ]  >  @     '  &  |  ~           
*
*                                                     
*
@ -141,44 +156,40 @@
// Row 1
#define FG_AGR ALGR(FG_SLSH)
#define FG_ECIR ALGR(FG_ASTX)
#define PG_3PTS ALGR(KC_GRV) // …
//#define PG_ECIR ALGR(PG_ASTX)
// Row 2
#define FG_ACIR ALGR(FG_X) // ^
//#define FG_EXLM ALGR(FG_VIRG) // !
//#define FG_EGAL ALGR(FG_EACU) // =
#define FG_DLR ALGR(FG_P) // $
#define FG_PERC ALGR(FG_B) // %
#define FG_HASH ALGR(FG_F) // #
#define FG_PVIR ALGR(FG_M) // ;
//#define FG_QUES ALGR(FG_APOS) // ?
//#define FG_2PTS ALGR(FG_POIN) // :
//#define PG_ACIR ALGR(PG_POIN) // ^
//#define PG_EXCL ALGR(PG_EACU) // !
//#define PG_PVIR ALGR(PG_M) // ;
//#define PG_QUES ALGR(PG_APOS) // ?
//#define PG_2PTS ALGR(PG_X) // :
// Row 3
/* #define FG_ASTX ALGR(FG_O) // *
#define FG_PLUS ALGR(FG_A) // +
#define FG_SLSH ALGR(FG_T) // /
#define FG_MOIN ALGR(FG_I) // - */
#define FG_BSLS ALGR(FG_G) // '\'
#define FG_GRV ALGR(FG_V) // `
#define FG_LPRN ALGR(FG_S) // (
#define FG_RPRN ALGR(FG_N) // )
#define FG_INF ALGR(FG_R) // <
#define FG_SUP ALGR(FG_U) // >
//#define FG_DQUO ALGR(FG_U) // "
#define FG_AROB ALGR(FG_J)
/*
#define PG_PLUS ALGR(PG_A) // +
#define PG_SLSH ALGR(PG_N) // /
#define PG_MOIN ALGR(PG_I) // -
#define PG_BSLS ALGR(PG_VIRG) // '\'
#define PG_GRV ALGR(PG_G) // `*/
#define PG_LPRN ALGR(PG_A) // (
#define PG_RPRN ALGR(PG_I) // )
//#define PG_INF ALGR(PG_R) // <
//#define PG_SUP ALGR(PG_L) // >
//#define PG_HQUO ALGR(PG_L) // "
//#define PG_AROB ALGR(PG_J)
// Row 4
#define FG_UNDS ALGR(FG_E) // _
#define FG_TILD ALGR(FG_Q) // ~
#define FG_PIPE ALGR(FG_Z) // |
#define FG_ESPR ALGR(FG_Y) // &
#define FG_DQUO ALGR(FG_D) // "
#define FG_LCBR ALGR(FG_C) // {
#define FG_RCBR ALGR(FG_H) // }
#define FG_LSBR ALGR(FG_W) // [
#define FG_RSBR ALGR(FG_ODK) // ]
//#define PG_UNDS ALGR(PG_E) // _
//#define PG_TILD ALGR(PG_Q) // ~
//#define PG_PIPE ALGR(PG_Z) // |
//#define PG_ESPR ALGR(PG_Y) // &
//#define PG_DQUO ALGR(PG_H) // "
#define PG_LCBR ALGR(PG_EACU) // {
#define PG_RCBR ALGR(PG_U) // }
//#define PG_LSBR ALGR(PG_W) // [
//#define PG_RSBR ALGR(PG_ODK) // ]
/* Shift+AltGr symbols
@ -195,27 +206,27 @@
*
*/
#define FG_CARN S(ALGR(FG_POIN)) // ˇ (dead)
#define PG_CARN S(ALGR(PG_X)) // ˇ (dead)
/* // Row 1
#define FG_IBRV S(ALGR(FG_AROB)) //  ̑ (dead)
#define FG_DACU S(ALGR(FG_LPRN)) // ˝ (dead)
#define FG_DGRV S(ALGR(FG_RPRN)) //  ̏ (dead)
#define FG_MDSH S(ALGR(FG_RSQU)) // —
#define FG_LSAQ S(ALGR(FG_LDAQ)) //
#define FG_RSAQ S(ALGR(FG_RDAQ)) //
#define FG_IQUE S(ALGR(FG_APOS)) // ¿
#define PG_IBRV S(ALGR(PG_AROB)) //  ̑ (dead)
#define PG_HACU S(ALGR(PG_LPRN)) // ˝ (dead)
#define PG_HGRV S(ALGR(PG_RPRN)) //  ̏ (dead)
#define PG_MDSH S(ALGR(PG_RSQU)) // —
#define PG_CSAQ S(ALGR(PG_CDAQ)) //
#define PG_RSAQ S(ALGR(PG_RDAQ)) //
#define PG_IQUE S(ALGR(PG_APOS)) // ¿
// Row 2
#define FG_TM S(ALGR(FG_T)) // ™
#define FG_DOTB S(ALGR(FG_I)) //  ̣ (dead)
#define FG_PERM S(ALGR(FG_P)) // ‰
#define FG_NBHY S(ALGR(FG_MOIN)) // (non-breaking hyphen)
#define FG_DDAG S(ALGR(FG_PLUS)) // ‡
#define PG_NM S(ALGR(PG_N)) // ™
#define PG_HOTB S(ALGR(PG_I)) //  ̣ (dead)
#define PG_PERM S(ALGR(PG_P)) // ‰
#define PG_SBHY S(ALGR(PG_MOIN)) // (non-breaking hyphen)
#define PG_HDAG S(ALGR(PG_PLUS)) // ‡
// Row 3
#define FG_MACB S(ALGR(FG_H)) // ˍ (dead)
#define FG_SQRT S(ALGR(FG_SLSH)) // √
#define FG_QRTR S(ALGR(FG_ASTX)) // ¼
#define PG_MACB S(ALGR(PG_F)) // ˍ (dead)
#define PG_TQRT S(ALGR(PG_SLSH)) // √
#define PG_QRTR S(ALGR(PG_ASTX)) // ¼
// Row 4
#define FG_GEQL S(ALGR(FG_INF)) // ≥
#define FG_OGON S(ALGR(FG_V)) // ˛ (dead)
#define FG_IEXL S(ALGR(FG_VIRG)) //  ̦ (dead)
//#define FG_NEQL S(ALGR(FG_EGAL)) // ≠ */
#define PG_VIRGEQL S(ALGR(PG_INF)) // ≥
#define PG_OGON S(ALGR(PG_G)) // ˛ (dead)
#define PG_IEXL S(ALGR(PG_EACU)) //  ̦ (dead)
//#define PG_SEQL S(ALGR(PG_EGAL)) // ≠ */

View file

@ -41,7 +41,7 @@ bool oled_task_user(void) {
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state|default_layer_state)) {
case _BASE:
oled_write_P(PSTR("FR-Go\n"), false);
oled_write_P(PSTR("Propergol\n"), false);
break;
case _L_MODS:
oled_write_P(PSTR("Mods G\n"), false);
@ -49,8 +49,11 @@ bool oled_task_user(void) {
case _R_MODS:
oled_write_P(PSTR("Mods D\n"), false);
break;
/* case _SYMBOLS:
oled_write_P(PSTR("SymNum\n"), false); */
case _SYMBOLS:
oled_write_P(PSTR("Symboles\n"), false);
break;
case _NUMBERS:
oled_write_P(PSTR("Nombres\n"), false);
break;
case _SHORTNAV:
oled_write_P(PSTR("ShortNav\n"), false);
@ -59,7 +62,7 @@ bool oled_task_user(void) {
oled_write_P(PSTR("FuncApps\n"), false);
break;
case _ODK:
oled_write_P(PSTR("Accents\n"), false);
oled_write_P(PSTR("1DK\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);
@ -76,7 +79,7 @@ bool oled_task_user(void) {
oled_write_P(((mods & MOD_BIT(KC_LALT)) == MOD_BIT(KC_LALT)) ? PSTR("ALT ") : PSTR(" "), false);
oled_write_P(is_caps_word_on() ? PSTR("CAPSWORD\n") : PSTR(" \n"), false);
//oled_write_P(is_num_word_on() ? PSTR("NUMWORD\n") : PSTR(" \n"), false);
oled_write_P(is_num_word_on ? PSTR("NUMWORD\n") : PSTR(" \n"), false);
// Write host Keyboard LED Status to OLEDs
led_t led_usb_state = host_keyboard_led_state();