parameters: (self)
return_statement: return key_presses
docstring: Empty the input queue. Return the unprocessed input.
docstring_summary: Empty the input queue. Return the unprocessed input.
docstring_tokens: Empty the input queue . Return the unprocessed input .
function: def empty_queue(self) -> List[KeyPress]:
          """
          Empty the input queue. Return the unprocessed input.
          """
          key_presses = list(self.input_queue)
          self.input_queue.clear()
  
          # Filter out CPRs. We don't want to return these.
          key_presses = [k for k in key_presses if k.key != Keys.CPRResponse]
          return key_presses
function_tokens: def empty_queue ( self ) -> List [ KeyPress ] : key_presses = list ( self . input_queue ) self . input_queue . clear ( ) # Filter out CPRs. We don't want to return these. key_presses = [ k for k in key_presses if k . key != Keys . CPRResponse ] return key_presses