![]() ![]() This function is just a wrapper that performs hs.hotkey.new(.):enable().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 this is provided for informational purposes and does not provide a reliable test as to whether or not Hammerspoon can use the combination to create a custom hotkey - some combinations which return a table can be over-ridden by Hammerspoon while others cannot.if the hotkey combination is not in use by the operating system, returns the boolean value false.enabled - a boolean indicating whether or not the key is currently enabled.mods - a numeric representation of the modifier flags for the hotkey.keycode - the numeric keycode for the hotkey.if the hotkey combination is in use by a system function, returns a table containing the following keys:. ![]() Hs.hotkey.systemAssigned(mods, key) -> table | falseĮxamine whether a potential hotkey is in use by the macOS system such as the Screen Capture, Universal Access, and Keyboard Navigation keys. enabled and not "shadowed" in the current context) while pressed Hs.hotkey.showHotkeys(mods, key) -> hs.hotkey objectĬreates (and enables) a hotkey that shows all currently active hotkeys (i.e. msg - the hotkey message, if provided when the hotkey was created (prefixed with the keyboard combination).idx - a string describing the keyboard combination for the hotkey.(usually, the global hotkey context, but it could be a modal hotkey context). enabled and not "shadowed", in the current context A table containing the hotkeys that are active, i.e.Returns a list of all currently active hotkeys 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. ![]()
0 Comments
Leave a Reply. |