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

Defines a Combo of keys

Hierarchy

  • KeyCombo

Index

Constructors

constructor

Properties

keys

keys: Set<number>

stateKeys

stateKeys: ComboStateKeys

Methods

addEvent

  • addEvent(ev: KeyboardEvent): boolean
  • Creates an instance of KeyCombo, given an string.

    Parameters

    • ev: KeyboardEvent

    Returns boolean

hasStateKeys

  • hasStateKeys(): boolean
  • Return if the combo has enabled any state key

    Returns boolean

fromString

  • fromString(comboStr: string): KeyCombo
  • Creates an instance of KeyCombo, given an string.

    Parameters

    • comboStr: string

    Returns KeyCombo

getNonStateKeys

  • getNonStateKeys(keyArr: number[], stateKeys: IStateKey[]): Array<number>
  • Returns all non-state keys, given an array of keyCodes

    Parameters

    Returns Array<number>

getStateKeys

isEqual

isStateKey

  • isStateKey(key: number, stateKeys: IStateKey[]): boolean
  • Returns whether a keyCode is a state key

    Parameters

    Returns boolean

parse

splitCombo

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