Class ShortcutAction

The ShortcutAction class implements a regular shortcut action.

Hierarchy (view full)

Constructors

Accessors

  • get activeTranslatedBinding(): Immutable<ShortcutKey>
  • This is similar to GetTranslatedBinding, but will also check if the binding is active. If not active, an empty ShortcutKey is returned.

    Returns Immutable<ShortcutKey>

  • get defaultBinding(): Immutable<ShortcutKey>
  • The default binding for this shortcut action. If setting a new default binding, the current binding will be updated it's currently set to the default.

    Returns Immutable<ShortcutKey>

  • set defaultBinding(value): void
  • Parameters

    Returns void

  • get defaultBindingFlags(): EnumValue<ShortcutBindingFlag, number>
  • The default binding flags for this shortcut action. If setting a new default binding flag, the current binding will be updated it's currently set to the default.

    Returns EnumValue<ShortcutBindingFlag, number>

  • set defaultBindingFlags(value): void
  • Parameters

    Returns void

  • get effectivePriority(): number
  • Gets the effective priority for the action. This is the priority that will actually be used to resolve conflicts, it is calculated by multiplying the base action priority by all the base priorities of the parent contexts.

    Returns number

  • get identifier(): string
  • Gets the action identifier.

    Returns string

  • get isBindingActive(): boolean
  • Checks if a bound shortcut action binding is active and has no other higher priority action using the same key.

    Returns boolean

  • get isDefault(): boolean
  • Checks if the binding is currently set to the default and hasn't been customized by the user by calling SetBinding or SetTranslatedBinding.

    Returns boolean

  • get isEffectivelyEnabled(): boolean
  • Checks if the action is "effectively enabled", that is, it and all it's parent contexts are in enabled status.

    Returns boolean

  • get isEnabled(): boolean
  • A toggle that can be used to enable or disable the action. This does not dictate whether the action is effectively enabled or disabled, to check for it's effective status, taking parent contexts into consideration, use IsEffectivelyEnabled

    Returns boolean

  • set isEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isHeld(): boolean
  • Checks if the action shortcut binding are being held. If the action is not effectively enabled, this always returns false.

    Returns boolean

  • get isPressed(): boolean
  • Checks if the action shortcut binding has been pressed in this frame. If the action is not effectively enabled, this always returns false.

    Returns boolean

  • get isReleased(): boolean
  • Checks if the action shortcut binding has been released in this frame. If the action is not effectively enabled, this always returns false.

    Returns boolean

  • get name(): string
  • Gets the action name.

    Returns string

  • get path(): string
  • Gets the action full path.

    Returns string

  • get priority(): number
  • A property that defines the base priority for the action. This is not the effective priority that will be used by the system to resolve conflicts, to get the effective priority use GetEffectivePriority

    Returns number

  • set priority(value): void
  • Parameters

    • value: number

    Returns void

  • get translatedBinding(): Immutable<ShortcutKey>
  • This is similar to SetBinding but sets an already translated binding. If DisablePlatformTranslation is not set, it will be set by this method.

    Returns Immutable<ShortcutKey>

  • set translatedBinding(value): void
  • Parameters

    Returns void

  • get translatedDefaultBinding(): Immutable<ShortcutKey>
  • Similar to GetDefaultBinding but translates the default binding to plaform specific binding.

    Returns Immutable<ShortcutKey>

Methods

  • Sets a new shortcut key binding to the action.

    Parameters

    Returns void

    True if the binding was added, false if it already existed and was not inserted.