AltGr randomly stops working on windows 10
The issue happens when you open a RDP connection. Just bring the RDP window in foreground and press Alt+Enter.
The issue will disappear on all other windows too
Source: How to Fix Alt Gr Key Not Working.
In my case left Shift+Caps Lock+AltGr helped. I have no idea what it does, but it works.
Some utility programs can also "steal" the keyboard stroks.
In my case it appeared that the VirtualDesktopManager resulted in non-functional AltGr, so I could not write [
and ]
.