I have a QR code scanner that acts as a keyboard emulator that parts of my app use. When used it passes a string GUID and a carriage return. I have noticed that when nothing in particular seems to be in focus and this scanner is used I will get seemingly random click events on buttons all over my project. My best theory currently is that some element I am unaware of, some button, somehow still has or got focus and the carriage return is causing the button to get pressed. When I looked in the button class, however, it seems to only listen to Left Mouse, so I am not sure why this is. Also no amount of fiddling with .Focus() and .Blur() effects has been able to fix this issue.
Advice? High level, how do I prevent random rapid keyboard mashing (or in my case a scanner) from triggering buttons that were not mouse-pressed?
Also I marked this as “bug” as it may be one. Are buttons meant to take keyboard returns as “clicked” events?