Describe the bug 🐛
Lines 282–285 in main/windows-capture-python/windows_capture/__init__.py appear to be duplicated.
I’m using this library to implement an automated QTE script that has two states:
State 1: hold the spacebar to start a QTE;
State 2: press the spacebar repeatedly to perform the QTE.
When the script completes the second QTE (State 2) and switches back to State 1, the long-press of the spacebar stops working — the long press is swallowed. The script then times out and retries the long press, and that retryed long press succeeds. Alternatively, if I manually press the spacebar (a keypress that normally wouldn’t affect the automation) before switching back to State 1, a subsequent long press works as expected.
After commenting out the few lines mentioned earlier, this problem mostly disappears (there are still occasional missed key events), so I’m not certain whether those lines are the root cause.
Expected behavior 📝
There should be no duplicate code causing input/key events to be dropped.
OS 🤖
Describe the bug 🐛
Lines 282–285 in
main/windows-capture-python/windows_capture/__init__.pyappear to be duplicated.I’m using this library to implement an automated QTE script that has two states:
State 1: hold the spacebar to start a QTE;
State 2: press the spacebar repeatedly to perform the QTE.
When the script completes the second QTE (State 2) and switches back to State 1, the long-press of the spacebar stops working — the long press is swallowed. The script then times out and retries the long press, and that retryed long press succeeds. Alternatively, if I manually press the spacebar (a keypress that normally wouldn’t affect the automation) before switching back to State 1, a subsequent long press works as expected.
After commenting out the few lines mentioned earlier, this problem mostly disappears (there are still occasional missed key events), so I’m not certain whether those lines are the root cause.
Expected behavior 📝
There should be no duplicate code causing input/key events to be dropped.
OS 🤖