hidutil
is a powerful tool that can remap keys on your MacOS. It can remap keys for internal keyboard as well
as for external keyboard. In the example below, I am remapping section sign key(§) to grave accent key(`),
because I want to have my recently bought K380 keyboard with UK layout to act almost like US layout.
Note: there are GUI tools like Karabiner, but it messed by FN keys on external keyboard, when I just wanted simple one key remap, so I found this might be useful if you want simple solution.