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: 'w', down: 's' },
    horizontal: { left: 'a', right: 'd' }
    };

    // Arrow keys example:
    const arrowConfig: KeyboardAxesConfig = {
    vertical: { up: 'arrowup', down: 'arrowdown' },
    horizontal: { left: 'arrowleft', right: 'arrowright' }
    };
    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