'Cannot use Alt-Gr characters on Swedish keyboard (e.g. Alt-Gr + 2 should print @ symbol)

I have a Swedish language keyboard. Some important characters such as "@" and "$" require combining the right hand alt button with numbers.

This used to work; either I have messed up my settings or an update has broken it. In MacOS preferences are region=UK, keyboard=SwedishPro. In MacOS terminal.app the Alt-Gr button combos still work as normal. In iTerm2 preferences->profiles->(profile-name)->terminal -Character Encoding is the default "UFT8," -Environment is set to "Set local variables locally" (I've tried turning this off but it doesn't fix the issue) I have icu4c in my .zshrc path, but I removed it and it didn't fix the issue.

Strangely "alt-gr + ¨ = ~" still works. Any help greatly appreciated.



Solution 1:[1]

I have a similar issue and solved it by:

  1. Going to Preferences -> Profiles -> Your profile name -> Keys
  2. Setting Right Option Key to Normal.

Hope the solution applies to you.

Screenshot

Solution 2:[2]

I had accidentally messed up Al tGr on my Finnish keyboard by defining a navigation shortcut (iTerm2 Preferences > Keys > Navigation Shortcuts) that remapped Alt Gr + Number.

The last line in the question suggests that this might be the culprit in your case as well:

Strangely "alt-gr + ยจ = ~" still works. Any help greatly appreciated."

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 silver_mx
Solution 2 Juuso Ohtonen