I think we may need more information... I'm guessing you have some kind of alarm that alerts you to the fact that you've pressed the caps lock key? Something I've used for a long time with great success is BoldFinger, which disables the caps lock key SO YOU DON'T ACCIDENTALLY TYPE AN ENTIRE PARAGRAPH IN UPPER CASE. If you really want caps lock, you have to press something like Ctrl + caps lock.
Huawei P10 review