That isn't how keyboards work. If a key is assigned to a different keyboard code, then when you push the button the OS will recognise that code regardless of layout configuration.
Norwegian keyboards have a different physical layout meaning different character codes are sent for the same location.
I suppose you could use something like autohotkey to do that, but it would require intercepting and generating new key presses for every altered key on the keyboard, and could theoretically cause input-swaps if one keypress took longer than a subsequent keypress (e.g. due to a context switch).
Norwegian keyboards have a different physical layout meaning different character codes are sent for the same location.