hammerspoon2-docs
    Preparing search index...

    Function capsLockState

    • Checks the system-wide state of CapsLock. This reflects a single, global lock state shared by every attached keyboard — macOS has no public API to query the functional (character-affecting) CapsLock state independently per keyboard. For a genuinely per-keyboard signal, see keyboardCapsLockState(), which reads each keyboard's own CapsLock LED.

      Returns boolean

      true if CapsLock is currently on, false otherwise