I’ve encountered a bug where gamepads will fire keyboard and mouse events. I found this in my studio, and tested it in several live games.
When you move a Gamepad thumbstick forward, LastInputType will change to gamepad, then the InputBegan event will be fired for Enum.KeyCode.Up. This is true of all directions. R2 will fire MouseButton, and the A Button will fire Enum.KeyCode.Return. In the screenshot below I printed LastInputType on changed, and inputBegan.
All the gamepad buttons and thumbsticks seem to fire unwanted Keyboard events.
You can reproduce this simply by printing UserInputService.LastInputTypeChanged, plugging in a gamepad, and pressing the thumbstick or any button. You can test this live on Polyhex’s Super Bomb Survival, where the on-screen keybinds (such as R for Ragdoll in the lower left corner) change based on Last User Input Type - they flicker back and forth on gamepad input, and return to Keyboard after you finish pressing a Gamepad input.
This is a problem because it makes it impossible to know what the user’s LastUserInputType actually was. Like Super Bomb Survival, in my game I change all the on-screen keybinds to be Gamepad icons, or Keyboard keys depending on the last input type. This is currently unusable.
Thanks for reading.