I've gotten a game to do it somehow, maybe from dropping my keyboard, but i don't know how it happens for this game or others. Anyone have any clue, if it happens again, i'll make a video?
Some games accept controller inputs regardless if they're in focus or not. Though you may get something like this if the windowing system gets confused, but that's not something you can usually intentionally invoke.