Ejemplo n.º 1
0
    def __call__(self):
        """ block execution and start the event handler """
        self.mode = 'select'
        self.seed_select = None
        _BlockInput.__call__(self, n=0, timeout=0)

        return None
Ejemplo n.º 2
0
    def __call__(self, timeout=-1):
        """
        Blocking call to retrieve a single key click
        Returns key or None if timeout
        """
        self.ev = None

        BlockingInput.__call__(self, n=1, timeout=timeout)

        return self.ev
Ejemplo n.º 3
0
    def __call__(self, timeout=30):
        """
        Blocking call to retrieve a single mouse click or key press.

        Returns ``True`` if key press, ``False`` if mouse click, or ``None`` if
        timed out.
        """
        self.keyormouse = None
        BlockingInput.__call__(self, n=1, timeout=timeout)

        return self.event_key