Create and manage global keyboard shortcuts
Signature | hs.hotkey.alertDuration |
---|---|
Type | Variable |
Description | Duration of the alert shown when a hotkey created with a `message` parameter is triggered, in seconds. Default is 1. |
Source | extensions/hotkey/init.lua |
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 |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey.deleteAll(mods, key) |
---|---|
Type | Function |
Description | Deletes all previously set callbacks for a given keyboard combination |
Parameters |
|
Returns |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey.disableAll(mods, key) |
---|---|
Type | Function |
Description | Disables all previously set callbacks for a given keyboard combination |
Parameters |
|
Returns |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey.getHotkeys() -> table |
---|---|
Type | Function |
Description | Returns a list of all currently active hotkeys |
Parameters |
|
Returns |
|
Source | extensions/hotkey/init.lua |
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 |
|
Source | extensions/hotkey/init.lua |
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 |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey.bind(mods, key, [message,] pressedfn, releasedfn, repeatfn) -> hs.hotkey object |
---|---|
Type | Constructor |
Description | Creates a new hotkey and enables it immediately |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey.bindSpec(keyspec, ...) -> hs.hotkey object |
---|---|
Type | Constructor |
Description | Creates a hotkey and enables it immediately |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey.new(mods, key, [message,] pressedfn, releasedfn, repeatfn) -> hs.hotkey object |
---|---|
Type | Constructor |
Description | Creates a new hotkey |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey:delete() |
---|---|
Type | Method |
Description | Disables and deletes a hotkey object |
Parameters |
|
Returns |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey:disable() -> hs.hotkey object |
---|---|
Type | Method |
Description | Disables a hotkey object |
Parameters |
|
Returns |
|
Source | extensions/hotkey/init.lua |
Signature | hs.hotkey:enable() -> hs.hotkey object | nil |
---|---|
Type | Method |
Description | Enables a hotkey object |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/hotkey/init.lua |