shortcutjs
Options
All
  • Public
  • Public/Protected
  • All
Menu

Shortcut is the class for creating the singleton public instance shortcutJS. It makes use and coordinates other classes in order to process events and checking matching.

Hierarchy

  • Shortcut

Implements

Index

Constructors

constructor

Properties

actions

actions: Map<string, Action>

Loaded map of actions

eventProcessor

eventProcessor: EventProcessor

Instance of the eventProcessor. Internal usage

initialized

initialized: boolean

For checking initialization

options

options: Options

Holds the behavioural options of shortcutJS

paused

paused: boolean

For checking initialization

Methods

addAction

  • addAction(action: Action): void

cleanCombo

  • cleanCombo(): void

init

isPaused

  • isPaused(): boolean

loadFromJson

  • loadFromJson(json: any[], options?: IOptions): void
  • Initializes shortcutJS from a JSON array

    Parameters

    • json: any[]
    • Default value options: IOptions = null

    Returns void

pause

  • pause(): void

processEvent

  • processEvent(ev: KeyboardEvent): void

removeAction

  • removeAction(action: Action): void

reset

  • reset(): void

resetState

  • resetState(): void

resume

  • resume(): void

subscribe

  • subscribe(actionName: string, cb: Function): void

unsubscribe

  • unsubscribe(actionName: string, cb?: Function): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc