A lot of keyboard manufacturers include macro settings in their software, especially when it comes to gaming keyboards. If they don't, there are third-party programs such as AutoHotKey ...