Sometimes I had the problem on Windows 7 and Windows 10 that the Alt Gr Key wasn’t working.
The problem often arises if you are connected to another computer over the remote desktop protocol.
Solution
To solve the problem I just had to press the following key combination:
[Shift] + [Caps Lock] + [Alt Gr]