Keymap.getCapsLockState

bool getCapsLockState()

Returns whether the Caps Lock modifer is locked.

Returns

true if Caps Lock is on