

A new hs.hotkey object or nil if the hotkey could not be enabled.repeatfn - A function that will be called when a pressed hotkey is repeating, or nil.releasedfn - A function that will be called when the hotkey has been released, or nil.pressedfn - A function that will be called when the hotkey has been pressed, or nil.message - (optional) A string containing a message to be displayed via hs.alert() when the hotkey has been triggered if omitted, no alert will be shown.Hs.hotkey.bind(mods, key, pressedfn, releasedfn, repeatfn) -> hs.hotkey objectĬreates a new hotkey and enables it immediately

Hammerspoon hyper key mods#

Hs.hotkey.showHotkeys(mods, key) -> hs.hotkey objectĬreates (and enables) a hotkey that shows all currently active hotkeys (i.e.

Hammerspoon hyper key mac#
The most common reason a hotkey combination cannot be given an assignment by Hammerspoon is because it is in use by the Mac operating system - see the Shortcuts tab of Keyboard in the System Preferences application or hs.hotkey.systemAssigned.ĭeletes all previously set callbacks for a given keyboard combinationĭisables all previously set callbacks for a given keyboard combination.a boolean value, true if the hotkey combination can be given an assignment by Hammerspoon or false if it cannot.key - A string containing the name of a keyboard key (as found in hs.keycodes.map ), or a raw keycode number.mods - A table or a string containing (as elements, or as substrings with any separator) the keyboard modifiers required, which should be zero or more of the following:.Hs.hotkey.assignable(mods, key) -> booleanĭetermines whether the hotkey combination can be assigned a callback through Hammerspoon. Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Variables alertDuration Signatureĭuration of the alert shown when a hotkey created with a message parameter is triggered, in seconds.Constructors - API calls which return an object, typically one that offers API methods.Functions - API calls offered directly by the extension.Hammerspoon docs: hs.hotkey docs » hs.hotkeyĬreate and manage global keyboard shortcuts Submodules
