How can I rebind § to ð and ± to Ð on a Mac?

I want to make it so that when I type the key that is labelled "§" on my keyboard, a ð symbol is typed. I also want to do this with ± to Ð. I have tried using Karabiner, but when I downloaded it I didn't realise it was only for binding keyboard shortcuts. How could I achieve this?

I am using a 2019 MacBook Air with a British keyboard layout.


Solution 1:

[copied directly from my own answer on Ask Different - https://apple.stackexchange.com/a/421470/85275 ]

You need Ukelele (freeware).

Ukelele is a Unicode Keyboard Layout Editor for the macOS.

Ukelele aims to simplify keyboard layout editing by providing a graphical interface to .keylayout files, where the desired characters can simply be dragged onto keys as needed. (The Character Viewer or Character Palette, available in the Input menu if it has been enabled in System Preferences, and shown with Show Emoji & Symbols, is a great place to find the characters.)