godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.38k stars 19.64k forks source link

Home button on Xbox controller is not recognized #81454

Open MrEliptik opened 10 months ago

MrEliptik commented 10 months ago

Godot version

3.5.2.stable

System information

Windows 10, GLES3, GTX 1070 driver 537.13

Issue description

Steam asks that the controller home button (xbox in that case) should open the Steam Overlay.

The same issue was opened in 2021: https://github.com/godotengine/godot/issues/47579 and supposed to be fixed with https://github.com/godotengine/godot/pull/48934

The problem is not present in Godot 4.1.

I've tested this on Windows and Linux (Steam deck), with an Xbox One and Xbox Series controller, both in USB and wireless with the dongle. I've also tested the action with device 0 and all devices.

The button is correctly recognized by Steam and by this gamepad tester website: https://hardwaretester.com/gamepad

Steps to reproduce

  1. Add an action with a joy button mapped to 16: Home, DualShock PS, Guide on device 0 or all device
  2. Check Input.is_action_just_pressed("your_action") in _process, it does nothing

or

  1. In _input(event), check the following code, which will print 33554431 which is unknown key. if event is InputEventKey: print(event.scancode)

Minimal reproduction project

NA

sirmike commented 1 month ago

I also encountered this issue and can't figure it out. To add more details, PS5 controller works fine and PS button is recognized properly. At first I thought some app in the background might be stealing input. I exited Steam, Windows Gamebar etc. Still no success.

I can dig through the engine code and try fix it, but I don't know where to start. Could anyone give me any hint where to look and debug?

akien-mga commented 1 month ago

I would start looking at two possible reasons: