clik-engine API
    Preparing search index...

    Class RemapHelper

    Helper for input remapping in settings menus. Listens for the next key press or gamepad button and returns it.

    Index

    Constructors

    Methods

    • Wait for the next gamepad button press. Returns the button index as a string (e.g. '0', '1', '2').

      Parameters

      • callback: (buttonIndex: string) => void

      Returns { cancel: () => void }

    • Wait for the next keyboard key press. Returns the key name (e.g. 'UP', 'SPACE', 'A'). Call cancel() on the returned handle to abort.

      Parameters

      • callback: (keyName: string) => void

      Returns { cancel: () => void }