Using caps lock indicator for other purpose
It looks like Karabiner + Seil can get you that.

The starting point: is the “Change CapsLock Key” on this page: https://pqrs.org/osx/karabiner/list.html.en.