Create and manage global keyboard shortcuts
Signature | hs.hotkey.alertDuration |
---|---|
Type | Variable |
Description | Duration of the alert shown when a hotkey created with a Usage: hs.hotkey.alertDuration = 2.5 -- alert stays on screen a bit longer hs.hotkey.alertDuration = 0 -- hotkey alerts are disabled |
Signature | hs.hotkey.assignable(mods, key) -> boolean |
---|---|
Type | Function |
Description | Determines whether the hotkey combination can be assigned a callback through Hammerspoon. Parameters:
Returns:
Notes:
|
Signature | hs.hotkey.deleteAll(mods, key) |
---|---|
Type | Function |
Description | Deletes all previously set callbacks for a given keyboard combination Parameters:
Returns:
|
Signature | hs.hotkey.disableAll(mods, key) |
---|---|
Type | Function |
Description | Disables all previously set callbacks for a given keyboard combination Parameters:
Returns:
|
Signature | hs.hotkey.getHotkeys() -> table |
---|---|
Type | Function |
Description | Returns a list of all currently active hotkeys Parameters:
Returns:
|
Signature | hs.hotkey.showHotkeys(mods, key) -> hs.hotkey object |
---|---|
Type | Function |
Description | Creates (and enables) a hotkey that shows all currently active hotkeys (i.e. enabled and not "shadowed" in the current context) while pressed Parameters:
Returns:
|
Signature | hs.hotkey.systemAssigned(mods, key) -> table | false |
---|---|
Type | Function |
Description | Examine whether a potential hotkey is in use by the macOS system such as the Screen Capture, Universal Access, and Keyboard Navigation keys. Parameters:
Returns:
Notes:
|
Signature | hs.hotkey.bind(mods, key, message, pressedfn, releasedfn, repeatfn) -> hs.hotkey object |
---|---|
Type | Constructor |
Description | Creates a hotkey and enables it immediately Parameters:
Returns:
Notes:
|
Signature | hs.hotkey.bindSpec(keyspec, ...) -> hs.hotkey object |
---|---|
Type | Constructor |
Description | Creates a hotkey and enables it immediately Parameters:
Returns:
Notes:
|
Signature | hs.hotkey.new(mods, key, [message,] pressedfn, releasedfn, repeatfn) -> hs.hotkey object |
---|---|
Type | Constructor |
Description | Creates a new hotkey Parameters:
Returns:
Notes:
|
Signature | hs.hotkey:delete() |
---|---|
Type | Method |
Description | Disables and deletes a hotkey object Parameters:
Returns:
|
Signature | hs.hotkey:disable() -> hs.hotkey object |
---|---|
Type | Method |
Description | Disables a hotkey object Parameters:
Returns:
|
Signature | hs.hotkey:enable() -> hs.hotkey object | nil |
---|---|
Type | Method |
Description | Enables a hotkey object Parameters:
Returns:
Notes:
|