https://toitlang.org/ logo
Is there a convenient way to wait on an arbitrary ...
# general
n
Is there a convenient way to wait on an arbitrary number of different button presses on different pins? I tried
Copy code
listOfButtons.do:
  it.wait-for 0
  //do the response here
But it just waits for the first button then the second then the ... I'm looking for something almost like a task to wait for the button but for an arbitrary number of buttons. Might be 1, might be 5.