MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / poll_input

Method poll_input

pager/pagerctl_mock.py:406–418  ·  view source on GitHub ↗

Poll input state (non-blocking). Returns (current, pressed, released).

(self)

Source from the content-addressed store, hash-verified

404 return 0
405
406 def poll_input(self):
407 """Poll input state (non-blocking). Returns (current, pressed, released)."""
408 self._pump_events()
409 pressed = 0
410 released = 0
411 with self._event_lock:
412 while self._event_queue:
413 btn, etype, ts = self._event_queue.popleft()
414 if etype == PAGER_EVENT_PRESS:
415 pressed |= btn
416 elif etype == PAGER_EVENT_RELEASE:
417 released |= btn
418 return self._held_buttons, pressed, released
419
420 def get_input_event(self):
421 """Get next input event from queue. Returns (button, type, timestamp) or None."""

Callers

nothing calls this directly

Calls 1

_pump_eventsMethod · 0.95

Tested by

no test coverage detected