Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventManager

This class holds methods related to the wide term "events"

This includes creating a simple action in BetterTouchTool, as well as creating advanced event listeners which are going to be evaluated on btt-node-server side

Hierarchy

  • EventManager

Index

Constructors

constructor

Methods

addEventListener

  • addEventListener(eventType: string, cb: Types.EventCallback): void

addTriggerAction

  • addTriggerAction(eventType: string, cb: Types.EventCallback): void
  • Adds event listener to BTT. Keep in mind this is persistent, so if you call this method twice, two entries will be added to BTT. Closing the browser / node process won't make the listeners die

    Parameters

    • eventType: string

      string, created from action enum identifier

    • cb: Types.EventCallback

      IEventParameter

    Returns void

removeEventListener

  • removeEventListener(eventType: string, cb: Types.EventCallback): void
  • Removes the trigger that'd make a specific request to the btt-node-server

    Parameters

    • eventType: string

      event that'd trigger the action

    • cb: Types.EventCallback

      callback that you want to take off from the event

    Returns void

removeTriggerAction

  • removeTriggerAction(eventType: string, cb: Types.EventCallback): void
  • Removes event listener

    Parameters

    • eventType: string

      string, created from action enum identifier

    • cb: Types.EventCallback

    Returns void