cp.commands.shortcut.build(receiverFn) -> cp.commands.shortcut.builder
receiverFn
- (optional) a function which will get passed the shortcut when the build is complete.shortcut.builder
which can be used to create the shortcut.receiverFn
is provided, the shortcut will be returned directly.cp.commands.shortcut.new(modifiers, keyCode) -> shortcut
hs.commands.command
modifiers
- The modifiers.keyCode
- The key code.cp.commands.shortcut:isEnabled <cp.prop: boolean>
true
, the shortcut is enabled.cp.commands.shortcut:bind(pressedFn, releasedFn, repeatedFn) -> shortcut
pressedFn
, releasedFn
and repeatedFn
.pressedFn
- (optional) If present, this is called when the shortcut combo is pressed.releasedFn
- (optional) If present, this is called when the shortcut combo is released.repeatedFn
- (optional) If present, this is called when the shortcut combo is repeated.self
cp.commands.shortcut:delete() -> shortcut
self
cp.commands.shortcut:disable() -> shortcut
self
cp.commands.shortcut:enable() -> shortcut
self
cp.commands.shortcut:getKeyCode() -> string
string
containing the keycode of the shortcut.cp.commands.shortcut:getModifiers() -> table
table
containing the modifiers of the shortcut.cp.commands.shortcut:trigger() -> shortcut
self
cp.commands.shortcut:unbind() -> shortcut
self