I installed windows 7 operating system OSX in a virtual machine, but found under win7, caps lock does not work, get through the terms below!
▲ keyboard options open settings, and switches the input source to the tab,
▲ uncheck "Use Caps Lock key to toggle between" American English ","
▲ At this press Caps lock switch case can be used normally.
▲ Update: Currently macOS 10.12 beta2 has canceled this option, the user must switch to the English input method status to turn Caps lock (caps lock)
reference: