(self, signal)
return False
Trigger KEY events.
Trigger KEY events.
Trigger KEY events .
def check_input(self, signal):
        """Trigger KEY events."""
        if (self._scancode is not None) and (signal.event_type == signals.KEYB_DOWN):
            _, scancode, modifiers = signal.params
            if scancode != self._scancode:
                return False
            modcode = 0
            if modifiers and not self._predefined:
                for m in modifiers:
                    modcode |= self._mod_flags.get(m, 0)
            if self._predefined or self._modcode == modcode:
                # trigger event
                self.trigger()
                # drop key from key buffer
                # True removes signal from further processing
                return True
        return False
def check_input ( self , signal ) : if ( self . _scancode is not None ) and ( signal . event_type == signals . KEYB_DOWN ) : _ , scancode , modifiers = signal . params if scancode != self . _scancode : return False modcode = 0 if modifiers and not self . _predefined : for m in modifiers : modcode |= self . _mod_flags . get ( m , 0 ) if self . _predefined or self . _modcode == modcode : # trigger event self . trigger ( ) # drop key from key buffer # True removes signal from further processing return True return False