I do programming with two different Macs, both with an original Apple keyboard and using the German keyboard layout.
There is a strange issue, occurring from time to time. If I enter the squared bracket close ("]"), some other, invisible characters are inserted as well, and e.g. the Python parser does not work on the provided code.
Consider the following two lines of Python code:
def test(self, target, name): target[name] = self
and the resulting binary output
$ cat issue.py|xxd 0000000: 6465 6620 7465 7374 2873 656c 662c 2074 def test(self, t 0000010: 6172 6765 742c 206e 616d 6529 3a0a 2020 arget, name):. 0000020: 2020 7461 7267 6574 5b6e 616d 655d c2a0 target[name].. 0000030: 3d20 7365 6c66 0a = self.
The string "] =" should be ASCII 0x5D 0x20 0x3D, but instead of a space (0x20), the bytes 0xC2 0xA0 are inserted.
Do you have any idea what the problem might be, and how it could be solved? I have not tampered the OS X keyboard layout in any way, and it does not happen all the time, only about twice a day - but always when typing that special character, "]".
In order to type the "]" character, I need to press Alt + 6, so only 1 meta key is involved. If I hit the wrong one, I would not have produced the right character. Pressing Alt on its own does not produce a character at all, and Alt+ space switches windows, which I would have noticed. So why is no regular space inserted?