Hammerspoon / Spoons

The official repository of Spoon plugins
https://www.hammerspoon.org/Spoons/
450 stars 141 forks source link

what is the mapping of ReloadConfiguration:bindHotkeys(mapping) ? #286

Open MinatoHikari opened 2 years ago

MinatoHikari commented 2 years ago

mapping - A table containing hotkey modifier/key details for the following items

i really can't understand how to pass param to this function

mapping = {"ctrl", "alt", "cmd","R"}
mapping = {{"ctrl", "alt", "cmd"},"R"}

these two do not work.

hqkhan commented 2 years ago

Hello Hikari. Looking at the docs for ReloadConfiguration. The bindHotkeys function takes in mapping which expects reloadConfiguration entry to be there.

Try something like this:

hs.loadSpoon("ReloadConfiguration")
spoon.ReloadConfiguration:bindHotkeys({ reloadConfiguration = { {"cmd","ctrl"}, "r"} })
MinatoHikari commented 2 years ago

{ reloadConfiguration = { {"cmd","ctrl"}, "r"} }

it works, thanks!