Add KeyCodes L2 and R2 to UserInputService:IsGamepadButtonDown()

As a Roblox developer, it is impossible to determine if Enum.KeyCode.L2 and Enum.KeyCode.R2 is held down via the function UserInputService:IsGamepadButtonDown().

After reading the valid keycodes, the aforementioned KeyCodes are the only two buttons that are not supported by the function.

If Roblox is able to address this issue, it would improve my development experience because custom tool/interaction systems will be difficult to code when it comes to xbox/controller compatability. Additionally, the workarounds that I have come up with for this issue are hacky and inefficient.

8 Likes

I second this. It took me a bit of experimentation before realizing that these weren’t supported.

I realize these are “triggers” and not actual buttons, but I would guess a majority of games (inside and outside of roblox) use them as buttons. And if we’re strictly treating them as triggers, then why does InputBegan fire only when they are fully pressed like a button? Maybe I’m missing something and there’s a good reason these aren’t supported, but it just seems natural to me that I should be able to do UserInputService:IsGamepadButtonDown(Enum.KeyCode.ButtonR2)

My thoughts are summed up in @Neutron_Flow’s post. Today I started experimenting with gamepad compatibility for my game, and it took about 20 minutes of fruitless debugging to realize that this was why my code wasn’t working. Seems pretty unintuitive, but I can hack around it.

1 Like