@mercurhyo : I have already described it. The behavior is the same.
@Thaddy : I have joined a pdf with screen copies of the problem with a previous message.
@Handoko : You are right. I just checked with another, older Apple keyboard, the problem is the same.
In the mean time I have done another test : I have created a fresh Writer document with LibreOffice and put inside the magical phrase, For i := 0 To High(toto) Do something.
Than I have opened the document package, unpacked the file content.xml and fed it to ghex. Everything is perfect, the spaces are 32...
Than I have restarted a new Lazarus project, a new Unit with a single Class. The problem occurred only once right after the "=" in TMyClass = Class...
Than I have created another Class, and all the spaces following = have been replaced.
The attached file shows this.
Finally I have tried to write the same "Class" in a Windows 10 Virtual Machine, and it works...
To be short, the conflict may be with Lazarus running on Debian with a Swiss French keyboard. But I cannot investigate further, I don't have the skills to do it by myself.
Any idea welcome, thanks all for your time.