McTibetimWeb - v0.1.0
    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

      • ascii: string = ''
      • name: KeyName = KeyName.UNKNOWN
      • shiftPressed: boolean = false

        Whether Shift is pressed.

      • ctrlPressed: boolean = false

        Whether Control is pressed.

      • isNumpadKey: boolean = false

        Whether the key originated from the numpad.

      • altPressed: boolean = false
      • altGraphPressed: boolean = false
      • code: string = ''

      Returns Key

    Properties

    altGraphPressed: boolean = false
    altPressed: boolean = false
    ascii: string = ''
    code: string = ''
    ctrlPressed: boolean = false

    Whether Control is pressed.

    isNumpadKey: boolean = false

    Whether the key originated from the numpad.

    name: KeyName = KeyName.UNKNOWN
    shiftPressed: boolean = false

    Whether Shift 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.