Engine API Reference - v2.10.3
    Preparing search index...

    Class KeyboardMouseSourceAlpha

    Keyboard and mouse input source class

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _button: number[] = ...
    _element: null | HTMLElement = null
    deltas: {
        button: InputDelta;
        key: InputDelta;
        mouse: InputDelta;
        wheel: InputDelta;
    } = ...

    Type declaration

    keyCode: {
        "0": 26;
        "1": 27;
        "2": 28;
        "3": 29;
        "4": 30;
        "5": 31;
        "6": 32;
        "7": 33;
        "8": 34;
        "9": 35;
        A: 0;
        B: 1;
        C: 2;
        CTRL: 42;
        D: 3;
        DOWN: 37;
        E: 4;
        F: 5;
        G: 6;
        H: 7;
        I: 8;
        J: 9;
        K: 10;
        L: 11;
        LEFT: 38;
        M: 12;
        N: 13;
        O: 14;
        P: 15;
        Q: 16;
        R: 17;
        RIGHT: 39;
        S: 18;
        SHIFT: 41;
        SPACE: 40;
        T: 19;
        U: 20;
        UP: 36;
        V: 21;
        W: 22;
        X: 23;
        Y: 24;
        Z: 25;
    } = KEY_CODES

    The key codes for the keyboard keys.

    Methods

    • Alpha

      Fires an event with the given name and arguments.

      Parameters

      • event: string

        The event name to fire.

      • ...args: any[]

        The arguments to pass to the event listeners.

      Returns void

    • Alpha

      Returns { button: number[]; key: number[]; mouse: number[]; wheel: number[] }

      • button: number[]

        The button deltas.

      • key: number[]

        The key deltas.

      • mouse: number[]

        The mouse deltas.

      • wheel: number[]

        The wheel deltas.