DK Layout mac.
Unable to use the keys | and @ on MAC using the Full-size apple keyboard on a Macbook Pro 2019.
When looking at some forums we found that we could just change from DK to US Layout and it would work. However this is no good.
just switch off "Use Option as Meta key" in the Terminal settings page. In my case this is solved the problem.