Scratch for Java

Gamepad

Controller support: up to four gamepads, polled every tick. Ask them anywhere with Gamepad, or implement GamepadListener on the stage or a sprite to be told about button presses and controllers connecting. Buttons are in Xbox positions (A is Cross on a PlayStation controller, see GamepadButton); sticks report y up, as on the stage, and a stick near its middle reports (0, 0). Controllers without a known layout are skipped. There is no rumble.

In the -all jar and Studio; with Maven add the artifact scratch-gamepad.

Classes

Gamepad

Create Shareable URL

Select Sections