The best way to deal with Caps Lock is to make it a Control Key when used as a modifier (held down when another key is pressed), but Escape when typed by itself. There's a program for GNU/Linux called xscape that does exactly that.
FYI it's here: https://github.com/alols/xcape