Gamepad APIs: Cross-Platform Button Support

because it hasnt dropped yet drops in 1 hour they said 5cst on my ps app so meaning i got 1 hour and 30 minutes

2 Likes

Is it intentional for the selections w/ controller for UI to break if a billboard GUI is attached to an attachment?

You get a warning in output when attempting to select said GUI ā€œSetting GuiService.SelectedObject to invalid GuiObjectā€ and still select the desired object, but can not select any adjacent GUIā€™s even if you provide a selection group or provide left/right/up/down directions

1 Like

Can we bring back the music on ps and xbox menu like you heard before if mostly relieved my likeness for music back again, i donā€™t think it will work on new music but in different synchros, i donā€™t think would take it far back like from 2016, and i think it would been fit pretty cool through the menu back again for music is like a taste.

1 Like

Off topic, but rumble doesnā€™t work on the ps5 controller. I have to use an Xbox controller emulator for it to work, but then the icons are back to the Xbox ones.

1 Like

I want a feature that allows you to change text labels on each console.

1 Like

Hi @NoUniqueAddress,

Iā€™m trying to use this API to effectively support nonā€‘QWERTY keyboards, QWERTY keyboards, and gamepads as you show in the OP. However, when using my QWERTY keyboard, with the API, it returns a blank string. I do not have access to an nonā€‘QWERTY keyboard.

Printing this:

UserInputService:GetStringForKeyCode(Enum.KeyCode.LeftShift)

Gives me this:



Hereā€™s an example of the issue:

image

I thought this was a bug, but itā€™s apparently intentional behavior. To respond to @idevride here, my expectation is that the Enum.Keycode prints to the correct button for the user to press no matter what keyboard or gamepad they have. I shouldnā€™t have to check if the user has a nonā€‘QWERTY keyboard or if they have a different gamepad. If I have a QWERTY keyboard, LeftShift should return ā€œLeftShiftā€.

Hereā€™s a feature request about the issue, from 2022: Expand Keys for UserInputService:GetStringForKeyCode. The OP there assumes the issue is a lack of support in the API for all the KeyCodes, yet the bug report I mention above would oppose that. If the intentional behavior is to print out an empty string, that should be changed. The issue with this is that I do not have access to the Feature Request categories, and yes I have requested to join the @AllowFeatureRequests group. Itā€™s not really taking people in right now.

This issue is impacting my game and I canā€™t fix the issues of the wrong prompts being shown to users without making my own system. If someone at Roblox could reply to this issue as soon as possible, thatā€™d be great.

Thanks,
Reditect


Edit 6/8/2024:

Iā€™ve removed support for non-Qwerty keyboards from my game because of this API. I am using a Qwerty keyboard. When using the API, I get a blank string. That means my players see blank prompts in dialogue and whatnot. Iā€™d rather support Qwerty than no keyboards at all. I am still using the API for gamepad however, that works fine.

3 Likes

Edit: hereā€™s the feature request: Change GetStringForKeyCode() to Return the String of Keycodes


Old reply:

Bump, this is out of my control. I will continue to bump before the 4 month closing period on this topic until I (or someone else) can make a feature request or staff responds.

2 Likes

this is useless. its called ā€œGamepad APIā€ not ā€œChangeIcons APIā€. you can use UserInputService | Documentation - Roblox Creator Hub to do what you want to do but its only for text.

1 Like

use UserInputService | Documentation - Roblox Creator Hub,

here is some code:

local UserInputService = game:GetService("UserInputService")

local textLabel = script.Parent
local mapKey = Enum.KeyCode.ButtonA
textLabel.Text = "press the " .. UserInputService:GetStringForKeyCode(mapKey) .. " to do something"

use the ā€œButtonā€ keycodes to change it.

1 Like

the functions themselves are not bound to Gamepads only. They are specifically referencing KeyCodes. So these functions supporting all key-codes and having images for them is expected, the only ā€œGamepad APIā€ part is to do with the announcement.

1 Like

Iā€™m working on a Roblox game at the moment, adding multiple features, this will probably be an addition Iā€™m willing to make, awesome update. :+1:

1 Like