Is there a way to prevent unity UI buttons from being triggered by any keyboard input? I only want them to respond to mouse inputs as keypresses are handled through code due to… reasons. Is there a way to do this with the inbuilt ui system or am I going to have to do some sort of raycast in trickery and have no onclick in my button?
What triggers the “Submit” is the event system. The two components on that GameObject that is automatically created are the EventSystem componnent and the InputModule. The latter of these is sending Navigation, Submit and Cancel events to the event system. By fiddling with the inputs set up in the Standalone Input Module, you can disable submission by keyboard inputs - in the long run, it’s also an idea to write a custom input module.