Create and manage global keyboard shortcuts
| Signature | hs.hotkey.alertDuration |
|---|---|
| Type | Variable |
| Description | Duration of the alert shown when a hotkey created with a |
| Source | extensions/hotkey/hotkey.lua line 51 |
| 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/hotkey.lua line 274 |
| Signature | hs.hotkey.deleteAll(mods, key) |
|---|---|
| Type | Function |
| Description | Deletes all previously set callbacks for a given keyboard combination |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 324 |
| Signature | hs.hotkey.disableAll(mods, key) |
|---|---|
| Type | Function |
| Description | Disables all previously set callbacks for a given keyboard combination |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 304 |
| Signature | hs.hotkey.getHotkeys() -> table |
|---|---|
| Type | Function |
| Description | Returns a list of all currently active hotkeys |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 346 |
| 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/hotkey.lua line 360 |
| 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/hotkey.lua line 245 |
| 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/hotkey.lua line 405 |
| Signature | hs.hotkey.bindSpec(keyspec, ...) -> hs.hotkey object |
|---|---|
| Type | Constructor |
| Description | Creates a hotkey and enables it immediately |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/hotkey/hotkey.lua line 438 |
| 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/hotkey.lua line 185 |
| Signature | hs.hotkey:delete() |
|---|---|
| Type | Method |
| Description | Disables and deletes a hotkey object |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 128 |
| Signature | hs.hotkey:disable() -> hs.hotkey object |
|---|---|
| Type | Method |
| Description | Disables a hotkey object |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 102 |
| Signature | hs.hotkey:enable() -> hs.hotkey object | nil |
|---|---|
| Type | Method |
| Description | Enables a hotkey object |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/hotkey/hotkey.lua line 60 |
| Signature | hs.hotkey.getLogLevel() -> number |
|---|---|
| Type | Method |
| Description | Gets the log level of the hotkey logger instance |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 21 |
| Signature | hs.hotkey.setLogLevel(loglevel) |
|---|---|
| Type | Method |
| Description | Sets the log level of the hotkey logger instance |
| Parameters |
|
| Returns |
|
| Source | extensions/hotkey/hotkey.lua line 10 |