(self, binding)
return (keyval, mask)
Parse an individual binding using gtk's binding function
Parse an individual binding using gtk's binding function
Parse an individual binding using gtk s binding function
def _parsebinding(self, binding):
        """Parse an individual binding using gtk's binding function"""
        mask = 0
        modifiers = re.findall(MODIFIER, binding)
        if modifiers:
            for modifier in modifiers:
                mask |= self._lookup_modifier(modifier)
        key = re.sub(MODIFIER, '', binding)
        if key == '':
            raise KeymapError('No key found')
        keyval = Gdk.keyval_from_name(key)
        if keyval == 0:
            raise KeymapError("Key '%s' is unrecognised" % key)
        return (keyval, mask)
def _parsebinding ( self , binding ) : mask = 0 modifiers = re . findall ( MODIFIER , binding ) if modifiers : for modifier in modifiers : mask |= self . _lookup_modifier ( modifier ) key = re . sub ( MODIFIER , '' , binding ) if key == '' : raise KeymapError ( 'No key found' ) keyval = Gdk . keyval_from_name ( key ) if keyval == 0 : raise KeymapError ( "Key '%s' is unrecognised" % key ) return ( keyval , mask )