You may wish to look into xcape. Currently i have capslock = escape when pressed alone, or control when pressed with another key. [0] https://github.com/alols/xcape
This is brilliant idea. And it works on OSX too - using http://apple.stackexchange.com/a/132569