@openvanilla/mcfoximmweb
    Preparing search index...

    Encapsulates the keys accepted by KeyHandler. This class never attempts to represent all key states that a generic input method framework desires to handle. Instead, this class only reflects the keys KeyHandler will handle.

    This is not always a perfect representation (for example, shift muddles the picture), but is sufficient for KeyHandler's needs.

    Index

    Constructors

    • Creates an input-method key value.

      Parameters

      • c: string = ''

        Printable character carried by the key, if any.

      • n: KeyName = KeyName.UNKNOWN

        Logical key name.

      • shiftPressed: boolean = false

        Whether Shift is pressed.

      • ctrlPressed: boolean = false

        Whether Control is pressed.

      • isNumpadKey: boolean = false

        Whether the key originated from the numpad.

      Returns Key

    Properties

    ascii: string = ''

    Printable character value carried by the key, if any.

    ctrlPressed: boolean = false

    If the Control modifier is pressed.

    isNumpadKey: boolean = false

    If the key is on the Numpad.

    name: KeyName = KeyName.UNKNOWN

    Logical key name used by the input method state machine.

    shiftPressed: boolean = false

    If the Shift modifier is pressed.

    Accessors

    • get isCursorKey(): boolean

      If the key is for moving the input cursor.

      Returns boolean

    • get isDeleteKey(): boolean

      If the key is for deleting the previous character.

      Returns boolean

    Methods

    • Returns a string representation of the key.

      Returns string

      A string representation of the key.

    • Creates a key with an ASCII character.

      Parameters

      • c: string

        The ASCII character.

      • shiftPressed: boolean = false

        If the shift key is pressed.

      • ctrlPressed: boolean = false

        If the control key is pressed.

      Returns Key

      The key.

    • Creates a key with a name.

      Parameters

      • name: KeyName

        The name of the key.

      • shiftPressed: boolean = false

        If the shift key is pressed.

      • ctrlPressed: boolean = false

        If the control key is pressed.

      Returns Key

      The key.