code: def get_key(self):
          
          event = self.get_event()
          if event and isinstance(event, KeyboardEvent):
              return event.key_code
          return None
docs: Check for a key without waiting.  This method is deprecated.  Use
          :py:meth:`.get_event` instead.