Karabiner-elements is good for mapping single keys to other keys. It doesn’t handle key combinations. (There is something called complex modifiers, but I can’t figure out how to edit them.)
BetterTouchTool is good for mapping key sequences. Further, it can do it selectively based on what application is active.