clear the keystates when loosing focus
disabled nagles algorithm for tcp sockets, fixes #463