impr(french input): when typing œ and æ, replace them with oe and ae

closes #5437
This commit is contained in:
Miodec 2024-05-24 12:40:01 +02:00
parent fd3fc7ca47
commit b626fdd643

View file

@ -459,12 +459,6 @@ function handleChar(
return;
}
console.debug("Handling char", char, charIndex, realInputValue);
const now = performance.now();
const isCharKorean: boolean = TestInput.input.getKoreanStatus();
if (char === "…" && TestWords.words.getCurrent()[charIndex] !== "…") {
for (let i = 0; i < 3; i++) {
handleChar(".", charIndex + i);
@ -473,6 +467,24 @@ function handleChar(
return;
}
if (char === "œ" && TestWords.words.getCurrent()[charIndex] !== "œ") {
handleChar("o", charIndex);
handleChar("e", charIndex + 1);
return;
}
if (char === "æ" && TestWords.words.getCurrent()[charIndex] !== "æ") {
handleChar("a", charIndex);
handleChar("e", charIndex + 1);
return;
}
console.debug("Handling char", char, charIndex, realInputValue);
const now = performance.now();
const isCharKorean: boolean = TestInput.input.getKoreanStatus();
for (const f of FunboxList.get(Config.funbox)) {
if (f.functions?.handleChar) char = f.functions.handleChar(char);
}