Class Bindings<TKey>

Input bindings.

Type Parameters

  • TKey

    The type of the binding keys.

Hierarchy

  • Bindings

Constructors

Properties

actions: Map<TKey, Action>

A collection that maps keys to actions.

defaultActions: Map<TKey, Action>

The default bindings.

Methods

  • Unbinds a key.

    Parameters

    • key: TKey

      The key.

    Returns boolean

    Whether the binding existed.

  • Returns the action that is bound to the given key.

    Parameters

    • key: TKey

      A key.

    Returns undefined | Action

    The action, or undefined if the key is not bound to any action.

  • Checks if the given key is bound to an action.

    Parameters

    • key: TKey

      A key.

    Returns boolean

    Whether the given key is bound to an action.

  • Establishes default bindings and resets the current bindings.

    Parameters

    • actions: Map<TKey, Action>

      A collection that maps keys to actions.

    Returns Bindings<TKey>

    This instance.

Generated using TypeDoc