hammerspoon2-docs
    Preparing search index...

    Class HSHotkey

    Object representing a system-wide hotkey. You should not create these objects directly, but rather, use the methods in hs.hotkey to instantiate these.

    Index

    Constructors

    Properties

    callbackPressed: (() => void) | null

    The callback function to be called when the hotkey is pressed, or null to remove it

    callbackReleased: (() => void) | null

    The callback function to be called when the hotkey is released, or null to remove it

    Methods

    • Disable the hotkey

      Returns void

    • Enable the hotkey

      Returns boolean

      True if the hotkey was enabled, otherwise False

    • Check if the hotkey is currently enabled

      Returns boolean

      True if the hotkey is enabled, otherwise False