Poll input state (non-blocking). Returns (current, pressed, released).
(self)
| 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.""" |
nothing calls this directly
no test coverage detected