HSHotkey
Type
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
Hammerspoon 2/Modules/hs.hotkey/HSHotkey.swift:16
Parameters
None
Returns
boolean - True if the hotkey was enabled, otherwise False
disable()
Disable the hotkey
Hammerspoon 2/Modules/hs.hotkey/HSHotkey.swift:19
Parameters
None
Returns
Nothing
isEnabled()
Check if the hotkey is currently enabled
Hammerspoon 2/Modules/hs.hotkey/HSHotkey.swift:23
Parameters
None
Returns
boolean - True if the hotkey is enabled, otherwise False
delete()
Delete the hotkey (disables and clears callbacks)
Hammerspoon 2/Modules/hs.hotkey/HSHotkey.swift:26
Parameters
None
Returns
Nothing