Description
uinput listener.wait() gets stuck in this while loop:
|
def wait(self): |
|
"""Waits for this listener to become ready.""" |
|
self._condition.acquire() |
|
while not self._ready: |
|
self._condition.wait() |
|
self._condition.release() |
self._mark_ready() is missing in _run:
|
def _run(self): |
|
for event in self._dev.read_loop(): |
|
if event.type in self._EVENTS: |
|
self._handle_message(event) |
The listener still works, but listener.wait() or with listener: hangs when using uinput backend.
Platform and pynput version
OS: Fedora Linux 44
Desktop: GNOME 50 (Wayland)
pynput version: 1.8.2
To Reproduce
import os
os.environ["PYNPUT_BACKEND_KEYBOARD"] = "uinput"
from pynput import keyboard
def on_activate_h():
print('<ctrl>+<alt>+h pressed')
with keyboard.GlobalHotKeys({
'<ctrl>+<alt>+h': on_activate_h}) as h:
print("hello") # never printed
h.join()
Description
uinput
listener.wait()gets stuck in this while loop:pynput/lib/pynput/_util/__init__.py
Lines 205 to 210 in eeb7eab
self._mark_ready()is missing in_run:pynput/lib/pynput/_util/uinput.py
Lines 55 to 58 in eeb7eab
The listener still works, but
listener.wait()orwith listener:hangs when using uinput backend.Platform and pynput version
OS: Fedora Linux 44
Desktop: GNOME 50 (Wayland)
pynput version: 1.8.2
To Reproduce