bragefuglseth / keypunch

Practice your typing skills
GNU General Public License v3.0
133 stars 23 forks source link

[Suggestion]: Treat French special characters like Monkeytype does #22

Closed idoric closed 3 months ago

idoric commented 3 months ago

Context

The most common French keyboard layout (AZERTY) doesn't allow to type certain French characters. The French rely heavily on the autocorrection systems of word processors to compensate for this lack (for example "oe" is automatically replaced by "œ"). But we don't always write in a word processor, and some French people use keyboard layouts better designed for French (in particular Bépo and Ergo-L). And these users want to practice typing these characters, and get the right reflexes (for example in good French typography the exclamation point is preceded by a narrow no-break space U+202F). To satisfy everyone, Monkeytype offers a solution that is not very clean but sufficient in practice, and which has the advantage of being easily implementable.

Monkeytype's solution

In the texts to be typed in French there are no special characters (for example the word "cœur" is written "coeur", as a child would write), and then certain characters typed by users are automatically replaced:

bragefuglseth commented 3 months ago

Hi, and thanks for the suggestion! This makes sense to me, but there are multiple things to take into consideration if we're going to do it:

I think we can come to a solution, but it needs some thinking through first.

bragefuglseth commented 3 months ago

I think we can do this better than Monkeytype, and display those letters as-is while allowing them to be typed as one would in a word processor. It requires #24, though.

idoric commented 3 months ago

That would be really great!

bragefuglseth commented 3 months ago

This should be completed by #24.

The current aliases are:

œ - oe æ - ae « - " » - " non-breaking whitespaces - regular space

If one is able to enter the original letters directly, that is of course still possible.

Let me know if there are any more that are relevant for French. I'll make sure to update the alias list if I come up with any relevant characters myself.

idoric commented 3 months ago

Here are the ones I thought about:

Œ - OE Æ - AE … - ... ’⁽¹⁾ - ' There are no strict rules regarding the use of the non-breaking hyphen, so I would think that the easiest way to satisfy everyone would be for the hyphen (- U+002D) and the non-breaking hyphen (‑ U+2011) to both be an alias of the other.

⁽¹⁾ In France it is called the typographic apostrophe (apostrophe typographique)