# XRP Code Editor Gamepad Blocks return zero

**URL:** <https://xrp.discourse.group/t/xrp-code-editor-gamepad-blocks-return-zero/827>\
**Category:** Coding\
**Created:** [August 4, 2025, 8:17pm UTC](https://xrp.discourse.group/t/xrp-code-editor-gamepad-blocks-return-zero/827 "2025-08-04T20:17:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xavier](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@xavier](https://xrp.discourse.group/u/xavier)\
**Post date:** [August 4, 2025, 8:17pm UTC](https://xrp.discourse.group/t/xrp-code-editor-gamepad-blocks-return-zero/827/1 "2025-08-04T20:17:33Z")

</div>

![image](https://canada1.discourse-cdn.com/flex011/uploads/xrp/original/1X/3da6e67ca4512ea1953618f05c0c55a781d0c493.png)

I’ve connected the XRP Beta to my Windows 10 driver station over USB. Running the XRP Code Editor gamepad example doesn’t spin the wheels, and the above code prints “-0.0” over and over.

I’ve tried WASD and multiple gamepads, all of which are detected and work by the [Hardware Tester](https://hardwaretester.com/gamepad) .

Other axes also return -0.0 and buttons are always false.

XRPLib is version 2.1.3.

Are there any other debug steps I can take?

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [August 5, 2025, 1:01am UTC](https://xrp.discourse.group/t/xrp-code-editor-gamepad-blocks-return-zero/827/2 "2025-08-05T01:01:11Z")

</div>

Currently the gamepad only works when the XRP is connected via bluetooth. Is there a specific use case you had for using gamepad control while connected via the USB?

---

<div class="post-metadata">

**Author:** ![xavier](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@xavier](https://xrp.discourse.group/u/xavier)\
**Post date:** [August 12, 2025, 4:15am UTC](https://xrp.discourse.group/t/xrp-code-editor-gamepad-blocks-return-zero/827/3 "2025-08-12T04:15:09Z")

</div>

Axes and buttons work as expected when connected over Bluetooth – thanks 🙂

---

<div class="post-metadata">

**Author:** ![xavier](https://avatars.discourse-cdn.com/v4/letter/x/2bfe46/32.png) [@xavier](https://xrp.discourse.group/u/xavier)\
**Post date:** [July 30, 2026, 1:42pm UTC](https://xrp.discourse.group/t/xrp-code-editor-gamepad-blocks-return-zero/827/4 "2026-07-30T13:42:21Z")

</div>

More info directly from the XRPCode changelog (in case it helps anybody):

# Version 1.2.2

## Gamepad support

- After updating the XRPLib to version 2.1.3 or greater you can use a gamepad with XRPCode to drive your XRP. The Blocks palette has been updated with gamepad blocks.
- To drive your XRP you will need a program that responds to the gamepad interactions. There is a very small program in the XRPExamples directory. Be creative and create your own for different types of driving.
- We use the standard Web Gamepad support and recognize only one controller. If you want to know if your gamepad will work you can go to this [website](https://hardwaretester.com/gamepad) that will test if your gamepad is compatible with the web browser.
- If you don’t have a gamepad you can use the keyboard. For the left joystick use WASD keys and for the right joystick use the IJKL keys. The number keys 1 - 0 are used for the buttons, in the same order as the pull down on the button gamepad block. There are no keys for the D-PAD.
