Assets.KeyboardCommand

Description: Defines a class that is used to represent a keyboard command.

Implements: EndGate.IDisposable

Constructors

KeyboardCommand (command, action)
Creates a new instance of the KeyboardCommand object.

command: string
Initial command required to trigger the action function.

action: Function
Initial action to be triggered when the command is executed..

Fields

Key: string
Gets or sets the Key that is required to trigger the Action.

Action: Function
Gets or sets the Action that is triggered when the KeyboardCommand has been successfully executed.

Modifiers: Assets.KeyboardModifiers
Gets or sets the Modifiers that are required to trigger the Action.

OnDispose: EndGate.EventHandler
Gets an event that is triggered when a KeyboardCommand has been disposed. If this KeyboardCommand is used with a KeyboardHandler it will no longer trigger the Action function. Functions can be bound or unbound to this event to be executed when the event triggers.

Methods

Dispose()
Triggers the OnDisposed event. If this KeyboardCommand is used with a KeyboardHandler it will no longer trigger the Action function.

Examples

There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.