18 lines
407 B
Lua
18 lines
407 B
Lua
local M = {}
|
|
|
|
M.super_key = 'alt'
|
|
|
|
M.super = function(opts)
|
|
local mods = { M.super_key }
|
|
if opts.mods then
|
|
for _, mod in ipairs(opts.mods) do
|
|
table.insert(mods, mod)
|
|
end
|
|
end
|
|
|
|
if opts.message then return hs.hotkey.bind(mods, opts.key, opts.message, opts.fn, opts.release, opts.repeat_fn) end
|
|
|
|
return hs.hotkey.bind(mods, opts.key, opts.fn, opts.release, opts.repeat_fn)
|
|
end
|
|
|
|
return M
|