That happens when you have Spanish Accents CapsLock installed and activated. To disable this feature while keeping the application turned on, right click its icon in the system tray and then select Disable. This will restore the functionality of your Capslock key, then use the physical button to toggle the button on or off.
I couldn't find any other solution to this problem.