Depending on your hardware, you might be able to use the dedicated macro software for the keyboards (Razer, Corsair, etc).
If not, you can always use a software rebinder/hotkey editor... I think AutoHotkey would be sufficient for your usage. You'd need to figure out how to setup the AutoHotkey scripts but there is tons of info on that around the web.