Appearance
@bendyline/molen-input-react
Molen optional React controls for editing keyboard and joystick profiles.
ts
import { /* … */ } from '@bendyline/molen-input-react';Interfaces
InputActionOption
Properties
id
ts
id: string;label
ts
label: string;InputDeviceState
Properties
devices
ts
devices: InputGamepad[];status
ts
status: "available" | "unavailable" | "blocked";InputRemapperProps
Controlled, unstyled editor. Hosts own profile selection, persistence, action names and layout.
Properties
actions
ts
actions: readonly InputActionOption[];className?
ts
optional className?: string;devices?
ts
optional devices?: readonly InputGamepad[];onReset?
ts
optional onReset?: () => void;Returns
void
onSave?
ts
optional onSave?: () => void;Optional host persistence/reset controls; the component never accesses storage.
Returns
void
status?
ts
optional status?: "available" | "unavailable" | "blocked";value
ts
value: InputProfile;Methods
onChange()
ts
onChange(profile): void;Parameters
profile
InputProfile
Returns
void
Functions
InputRemapper()
ts
function InputRemapper(__namedParameters): ReactElement;Editable keyboard, raw button and axis mappings with learning, calibration and live readings.
Parameters
__namedParameters
Returns
ReactElement
useInputDevices()
ts
function useInputDevices(input, options?): InputDeviceState;Poll raw devices for custom or shipped UI; optionally suspend gameplay for the hook's lifetime.
Parameters
input
InputMap
options?
pollMs?
number
suspend?
boolean