Fix IntelliJ Alt Gr not working


I've several times had the Alt Gr key stop working while using IntelliJ. With norwegian keyboard layout this key is essential in typing e.g. the brackets {} and [], so it not working is extremely annoying. And what increases the annoyance even more, is that, when this happens, the key for some reason stops working in other programs too.

Anyways, this seemed to fix it, on my machine at least, for now: