I belive that u can handle an event even if the window isnt focused ( something with "lostfocus" event ).Nop, the OS never sends key events to unfocused windows, this would be unnatural (that's the whole point of having a focused window). The only way to receive keyboard events while unfocused is to call a very specific function, which is not implemented in the SFML API.
QuoteI belive that u can handle an event even if the window isnt focused ( something with "lostfocus" event ).Nop, the OS never sends key events to unfocused windows, this would be unnatural (that's the whole point of having a focused window). The only way to receive keyboard events while unfocused is to call a very specific function, which is not implemented in the SFML API.
Out of curiosity, why do you need that?