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

Properties

callbackPressed

JSValue

The callback function to be called when the hotkey is pressed

callbackReleased

JSValue

The callback function to be called when the hotkey is released

Methods

enable()

Enable the hotkey

Parameters

None

Returns

boolean - True if the hotkey was enabled, otherwise False

disable()

Disable the hotkey

Parameters

None

Returns

Nothing

isEnabled()

Check if the hotkey is currently enabled

Parameters

None

Returns

boolean - True if the hotkey is enabled, otherwise False

delete()

Delete the hotkey (disables and clears callbacks)

Parameters

None

Returns

Nothing