godotengine / godotengine/godot

Dance pad buttons detected as Joypad D-pad prevent left+right and up+down

Open
#99,513 18 comments 0 reactions 0 assignees View on GitHub
bug discussion topic:input
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in:
v4.3.stable.official.77dcf97d8
v4.2.2.stable.official.15073afe3

### System information

MXLinux 23.3; 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux

### Issue description

I'm using a Mayflash GameCube controller to a Wii dance pad.
![Image](https://github.com/user-attachments/assets/ce7d0944-d50c-4590-9488-8890f537946f)

I mapped my inputs as seen here. Using the keyboard input, I have no problem generating left + right at same time and up + down at same time.
![Image](https://github.com/user-attachments/assets/ccd3feca-f4e1-42e2-8412-ef678277aa3e)

However, when using the dance pad:
```gdscript
var pressed = ""
if Input.is_action_pressed("Up"): pressed += "u"
if Input.is_action_pressed("Down"): pressed += "d"
if Input.is_action_pressed("Left"): pressed += "l"
if Input.is_action_pressed("Right"): pressed += "r"
print ("Pressed: " + pressed)
```

Shows that up + down and left + right will not work.
up + down ==> down. left + right ==> right.

I think this is because GODOT think's it's a dpad and doesn't allow these combinations. --> SDL and OS level otherwise show things working.

But jstest-gtk [is this using SDL?] and sdl-jstest show all buttons working together:
https://github.com/Grumbel/sdl-jstest

![Image](https://github.com/user-attachments/assets/bdb89244-18e4-4fd0-8c08-ff00b5884d8f)

### Steps to reproduce

Use any(?) dance pad. I imagine any d-pad controller would not be physically able to reproduce this. (I did try re-mapping buttons as a work around, but failed --> perhaps you can re-map buttons the other way to succeed in reproducing if you don't have a dance pad?).
Otherwise I used: https://www.amazon.com/gp/product/B00RSXRLUE
Konami Wii dance pad. RU054
![Image](https://github.com/user-attachments/assets/97b22280-86f5-48de-8a58-245a4fdbac84)

As a side note, I could get all "directions" pressed using my keyboard arrow keys either, only two. Using wasd allowed me to get all depressed.

Of course dance pad should allow all buttons to be depressed at same time.

### Minimal reproduction project (MRP)

This simple application will allow you to see the uplf (up, down, left, right) print in console.
[dance_pad_test.zip](https://github.com/user-attachments/files/17853242/dance_pad_test.zip)

There's also:
Joypads (Gamepads) Demo: https://godotengine.org/asset-library/asset/2785

Contributor guide

Open the contributing guide

Research direction

Start by running the provided dance_pad_test.zip minimal reproduction and compare its GDScript input output for keyboard and dance-pad controls. Investigate Godot's joypad/D-pad input handling, using the reported controller behavior and Joypads demo as references; done means simultaneous up+down and left+right presses are reported correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.