Don't forget about internationalization. Not all language have uppercase and lowercase characters [0], and tbh I'm not sure what effect (if any) caps lock has for these. And rules for converting case can sometimes be tricky.
0: https://en.wikipedia.org/wiki/Letter_case#Bicameral_script