My goal is to allow players to change the key associated with each action by clicking on the respective control. However, I want to ensure that I can distinguish between keyboard and gamepad inputs for each action.
My question is: What is the most optimized method for detecting whether a key input is coming from a keyboard or a gamepad?
I’d appreciate any insights and suggestions on how to achieve this effectively. Thank you in advance for your assistance!
I mean, most inputs aren’t even related? Keyboards move with WASD while controllers use the analogue or L3 or whatever u call it key. Jump is space while controllers use X/A and A isn’t the same as the A of keyboard it has it’s own Keycode named as “ButtonA”, and you get the point, what exactly is the problem then?
My initial concern was to prevent a keyboard user from binding a keyboard key in the same space designated for their gamepad key. However, I’ve come to the conclusion that a simpler approach is to disallow changing the gamepad key without having a controller connected.
Your suggestion also makes sense, and I appreciate your assistance. Thank you!