ActionRepository

public protocol ActionRepository

Action repository.

  • All available actions.

    Declaration

    Swift

    var actions: [Action] { get }
  • Returns an action with the given identifier, or nil if there is no such action.

    Declaration

    Swift

    subscript(id: String) -> Action? { get }
  • Returns an action for the given hotkey, or nil if there is no key binding set.

    Declaration

    Swift

    subscript(hotkey: Hotkey) -> Action? { get }
  • Returns all hotkeys for the action.

    Declaration

    Swift

    func getHotkeys(action: Action) -> [Hotkey]
  • Returns all hotkeys for the given base action.

    Declaration

    Swift

    func getHotkeys(base: BaseAction) -> [Hotkey]
  • getHotkey(action:) Extension method

    Returns the first hotkey for the action, or nil if no hotkeys are set.

    Declaration

    Swift

    public func getHotkey(action: Action) -> Hotkey?