Enumeration ShortcutBindingFlag

A set of flags that can be used to customize the behavior of a shortcut key binding.

Constructors

Values

CreatedFromMetadata = 32

Specifies that the shortcut was created from metadata on the scripting class.

DisableLocaleTranslation = 16

If set, the shortcut manager will not tranlate the shortcut's binding button code. By default they are translated to make sure the shortcut is bound to the same character on different locale. For example this is the case for Undo, ctrl+Z, as key Z have a different location on a german keyboard.

DisablePlatformTranslation = 4

If set, the shortcut manager won't perform any translation of the shortcut to match the native platform shortcut style. This is usually set when the user has manually defined a shortcut binding or the shortcut must be used exactly as defined, independent on the platform it's currently used.

IgnoreExclusiveInput = 8

If set, the shortcut will be considered exclusive for input. That is, it will trigger even if a the UI has exclusive keyboard input.

NoDelay = 2

If set with Repeating, the shortcut won't wait before sending the repeated triggers.

None = 0

Special flag that doesn't set any bit.

Repeating = 1

If set, the shortcut action will be trigger repeatedly for as long as the keys are held down.

WindowGlobal = 64

Specifies that the shortcut should be added to the window global context rather than the local one.

Methods

  • Takes an array of enum values and combines them as a single enum flag value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    Returns EnumValueTyped<T, number>

    The combined enum value.

  • Type Parameters

    • T

    Parameters

    Returns string

    Compatibility

  • Returns string[]

    Compatibility

  • Parameters

    • index: number

    Returns number

    Compatibility

  • Returns number[]

    Compatibility

  • Gets the name for the enumeration value that matches the specified enumValue.

    Type Parameters

    • T

    Parameters

    Returns string

    The enumeration value or undefined if not found.

  • Gets the enumeration names

    Returns string[]

    The enumeration names.

  • Gets the enumeration value at the specified index.

    Type Parameters

    • T = number

    Parameters

    • index: number

      The index.

    Returns EnumValueTyped<T, number>

    The enumeration value or undefined if not found.

  • Determines if the enum value has the flags set.

    Type Parameters

    Parameters

    Returns boolean

  • Determines if the enum bits were changed from previousValue to currentValue.

    Type Parameters

    Parameters

    Returns boolean

  • Iterates the enumeration names

    Returns Generator<string, any, any>

    The enumeration names.

  • Iterates the enumeration values

    Type Parameters

    • T = any

    Returns Generator<EnumValueTyped<T, number>, any, any>

    The enumeration values.

  • Takes a single enum value and splits it into separated flag values set on the value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

    Type Parameters

    Parameters

    • value: number | BrandedType<number, "enum"> | BrandedType<T, "enum">

      The enum value to have it's value split using bitwise-and operator.

    Returns EnumValueTyped<T, number>[]

    An array of each "bit flag" set in the enum.