code: def wait_for_keypresses(self, refresh_rate=1):
          
          if not self._enable_keyboard:
              return
          with self._blessed_term.cbreak():
              while True:
                  yield self._blessed_term.inkey(timeout=refresh_rate)
docs: Listen to user's keystrokes and return them to caller one at a time.
  
          The produced values are instances of blessed.keyboard.Keystroke class.
          If the user did not press anything with the last `refresh_rate` seconds
          the generator will yield `None`, allowing the caller to perform any
          updates necessary.
  
          This generator is infinite, and thus needs to be stopped explicitly.