As a roblox developer, it is currently impossible to detect Enum.KeyCode.ButtonR2 without detecting MouseButton1Down(). This is a problem because for my gun script, and for many other scripts, it is necessary to detect only one of these because otherwise the gun will fire twice. I think it’s a little old to be using mouse.Button1Down() when the UserInputService would offer a nice place to put all of our input objects at once. It would help people stay organized, and let devs have things work the way they want.
That is why I propose that ROBLOX adds a new input keycode object for each of the mouse buttons, as well as any programmable buttons. It would be nice to have a keycode that matches up to mouseButton1 because that way, when ButtonR2 is fired, the dev gets to decide whether or not the function attached to MouseButton1 is fired. As for programmable buttons, it would be nice to add support for these because that opens up the door to adding custom keybinds in games that may require them. Personally, I planned to add support for every platform out there, including different kinds of gamepads such as Wii remotes and PS4 controllers. This would require for scripts to create new input keycodes as the user inputs them. My approach would be to use an object value and store whatever input object the player has put in, but it could be done many ways. At the moment, however, I don’t think it’s possible to use programmable buttons at all. Thanks!