Gamepad APIs: Cross-Platform Button Support

In the drop down for the emulated type, there should be PS4. Please ensure you’re on the latest studio.

1 Like

This would work I agree but is not the cleanest solution, I’ll leave a ticket to investigate it more.

@MauroNr1 this answers your middle question too.

As for the triggers and gyroscope, those are not currently supported.

1 Like

What should expect emulating ps5 , like in same behavior of emulating ps4 ? I’d that would be cool if everyone would kindly emulating ps4 and ps5 at what best at kind.

Thanks for releasing these APIs for public use my games are now ready for PlayStation release tomorrow! Also, how do I make the controller rumble?

After uninstalling and reinstalling Roblox Studio, I still don’t see PS4 as an option.

Image of device emulator dropdown

Version Info:
image

Maybe it’s not on public release. It could just be a bug on my end though.

I’m having the same issue, on the same version. Would love to have a solution soon since playstation release is tomorrow.

Hello, I noted that the PS4 option doesn’t appear if I opt-in to the beta Notched Screen Support.

Opt-In
image
image

Opt-Out
image
image

6 Likes

Ah, will you plan to support controller gyroscope in the future? I was hoping for this to be added day 1 so developers can implement gyro aiming in their first person shooter games. Energy Assault already has gyro aiming on mobile devices.

2 Likes

I think most people don’t see a game app on ps4 console like i cannot see myself on brothers ps4 console, and i think that problem persist me from not having a ps4 pro, we only have normal ps4, and that’s how the problem occured when i don’t see it on playstation store :slightly_frowning_face:

1 Like

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