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

Method poll_input

pager/pagerctl.py:506–524  ·  view source on GitHub ↗

Poll input state (non-blocking). Returns: tuple: (current, pressed, released) where each is a button bitmask. - current: buttons currently held down - pressed: buttons just pressed this frame - released: buttons just released this

(self)

Source from the content-addressed store, hash-verified

504 return _lib.pager_wait_button()
505
506 def poll_input(self):
507 """Poll input state (non-blocking).
508
509 Returns:
510 tuple: (current, pressed, released) where each is a button bitmask.
511 - current: buttons currently held down
512 - pressed: buttons just pressed this frame
513 - released: buttons just released this frame
514
515 Example:
516 current, pressed, released = p.poll_input()
517 if pressed & Pager.BTN_A:
518 print("A button just pressed!")
519 if current & Pager.BTN_UP:
520 print("UP is being held")
521 """
522 state = PagerInput()
523 _lib.pager_poll_input(byref(state))
524 return state.current, state.pressed, state.released
525
526 # Thread-safe input event queue methods
527 def get_input_event(self):

Callers

nothing calls this directly

Calls 1

PagerInputClass · 0.85

Tested by

no test coverage detected