Selkies

panels/gamepads

The gamepads panel: the input switch, the touch gamepad switch, rumble, and a live picture of every pad the core reports, plus the floating button that pops the system's on-screen keyboard on a touch client.

Pad state comes from the core's gamepadButtonUpdate and gamepadAxisUpdate messages, heard while the preview is shown. Rumble on this client's pads is client-only: read from storage here, posted as setGamepadRumble, and persisted by the core as gamepad_rumble. Touch input on the touch-gamepad host div belongs to universalTouchGamepad's own overlay, which the shared state sets up.

Functions

GamepadVisualizer()

function GamepadVisualizer(__namedParameters): Element;

Defined in: panels/gamepads.tsx:42

Draws a standard-layout pad (Xbox naming) with pressed buttons, trigger pressure, and stick deflection. Button indices: 0 to 3 face (A, B, X, Y), 4 and 5 bumpers, 6 and 7 triggers, 8 Back, 9 Start, 10 and 11 stick clicks, 12 to 15 D-pad; axes 0 and 1 are the left stick, 2 and 3 the right.

Parameters

ParameterType
__namedParameters{ state: PadState; index: number; }
__namedParameters.statePadState
__namedParameters.indexnumber

Returns

Element


GamepadPreview()

function GamepadPreview(): Element;

Defined in: panels/gamepads.tsx:82

A visualizer per pad that has reported, or a note that none has.

Returns

Element


GamepadControls()

function GamepadControls(__namedParameters): Element;

Defined in: panels/gamepads.tsx:114

The gamepad switches and the preview; ui_sidebar_show_gamepads hides everything but the input switch.

Parameters

ParameterType
__namedParametersGamepadControlsProps

Returns

Element


VirtualKeyboardButton()

function VirtualKeyboardButton(): Element;

Defined in: panels/gamepads.tsx:156

The button that asks the core to show the virtual keyboard while the primary pointer is coarse (a phone, a tablet, a convertible in its tablet posture) and no keyboard is attached, unless the keyboard toggle has hidden it.

Returns

Element