Improve the gamepad input snippet