Karabiner Elements already works for things like that. See this topic for some examples.
More examples here; available key names here.
For more information, see the wiki Searching the Forum for Answers section.