Input Forge - v0.3.1
    Preparing search index...

    Type Alias KeyboardAxesConfig

    Configuration for mapping keyboard keys to axes input. Defines four directional keys that map to X/Y axis values.

    const wasdConfig: KeyboardAxesConfig = {
    vertical: { up: Inputs.KEYBOARD_W, down: Inputs.KEYBOARD_S },
    horizontal: { left: Inputs.KEYBOARD_A, right: Inputs.KEYBOARD_D }
    };

    // Arrow keys example:
    const arrowConfig: KeyboardAxesConfig = {
    vertical: { up: Inputs.KEYBOARD_UP, down: Inputs.KEYBOARD_DOWN },
    horizontal: { left: Inputs.KEYBOARD_LEFT, right: Inputs.KEYBOARD_RIGHT }
    };
    type KeyboardAxesConfig = {
        horizontal: { left: string; right: string };
        vertical: { down: string; up: string };
    }
    Index

    Properties

    Properties

    horizontal: { left: string; right: string }

    Horizontal axis keys

    Type Declaration

    • left: string

      Key that maps to X = -1

    • right: string

      Key that maps to X = +1

    vertical: { down: string; up: string }

    Vertical axis keys

    Type Declaration

    • down: string

      Key that maps to Y = +1

    • up: string

      Key that maps to Y = -1