Pynput listeners causing system-wide input problems #15

@Hyphen-ated

Description

Here is a minimal example program using pynput.

from pynput.keyboard import Listener
listener = Listener()
listener.start()
listener.join()

While this program is running, I experience some strange behavior with keyboard input.

1: I'm using a utility called "Steelseries Engine 3" version 3.9.6 to bind some of my mouse buttons to alt-left, alt-right, and ctrl-w. With pynput active in the background, about half of the time I press one of these buttons, the modifier key gets lost. So I sometimes get the letter "w" sent by itself instead of the ctrl-w shortcut combination. (tested in Chrome and notepad++)

2: Sometimes when I press enter, nothing happens. It seems to partially depend on what program has focus: Discord and Chrome usually have the problem, but Intellij doesn't. (they're using different ways of detecting input I guess?) I haven't exhaustively tested every key on the keyboard, but all the letters and punctuation appear to not have this problem.

These might even both be the same problem, just certain kinds of keystrokes being eaten by pynput, which can include ctrl and enter.

Both of these issues are inconsistent from one second to the next, but very consistent in the sense that over several seconds of trying to trigger the problem, the problem will occur. I've never had any problems remotely like this until I started working with pynput for a project.

System details:
Windows 8.1
Python 2.7.13 (was previously on 2.7.10, updated to see if it would fix this problem)
pynput 1.2