Back to Wails

Gamepad API Demo

v3/examples/web-apis/gamepad/frontend/index.html

2.13.0809 B
Original Source

Gamepad API Demo

The Gamepad API provides access to game controllers. Connect a gamepad and press any button to activate it. Supports standard controllers, analog sticks, triggers, and rumble feedback.

Gamepad API: checking...

Connected Controllers

1

No controller

2

No controller

3

No controller

4

No controller

Active Gamepad: -

L2

R2

Left Stick

X: 0.00, Y: 0.00

^

<

>

v

Right Stick

X: 0.00, Y: 0.00

A

B

X

Y

L1

R1

L2

R2

Sel

Sta

L3

R3

Up

Dn

Lt

Rt

Rumble / Haptic Feedback

Weak Motor:0.5

Strong Motor:0.5

Duration:500ms Test RumblePulse

Axes Values

Connect a gamepad to see axis values

Gamepad Info

ID-

Mapping-

Buttons-

Axes-

Timestamp-

Vibration-

Event Log

Clear Log

Waiting for gamepad events... Press a button on your controller.