Fixes this bug: https://bugs.winehq.org/show_bug.cgi?id=56068
Note that `is_key_hit` is virtually identical to `_kbhit`, except that the `for` loop runs until `count` instead of `count - 1`. This is needed because otherwise, it misses the last event.
Is `_kbhit`'s current behavior intended, or is it a bug?