You could achieve this using 3rd party macro software. Such as some gaming peripheral software. Razer and the like.