(self, event)
return self._lookup.get(mask, self.empty).get(keyval, None)
Translate a keyboard event into a mapped key
Translate a keyboard event into a mapped key
Translate a keyboard event into a mapped key
def lookup(self, event):
        """Translate a keyboard event into a mapped key"""
        try:
            _found, keyval, _egp, _lvl, consumed = self.keymap.translate_keyboard_state(
                                              event.hardware_keycode, 
                                              Gdk.ModifierType(event.get_state() & ~Gdk.ModifierType.LOCK_MASK),
                                              event.group)
        except TypeError:
            err ("keybindings.lookup failed to translate keyboard event: %s" % 
                     dir(event))
            return None
        mask = (event.get_state() & ~consumed) & self._masks
        return self._lookup.get(mask, self.empty).get(keyval, None)
def lookup ( self , event ) : try : _found , keyval , _egp , _lvl , consumed = self . keymap . translate_keyboard_state ( event . hardware_keycode , Gdk . ModifierType ( event . get_state ( ) & ~ Gdk . ModifierType . LOCK_MASK ) , event . group ) except TypeError : err ( "keybindings.lookup failed to translate keyboard event: %s" % dir ( event ) ) return None mask = ( event . get_state ( ) & ~ consumed ) & self . _masks return self . _lookup . get ( mask , self . empty ) . get ( keyval , None )