#NEWLINE# def probe( self ) : #NEWLINE# #INDENT# global EventLoop #NEWLINE# from kivy.base import EventLoop #NEWLINE# inputs = get_inputs ( self . input_path ) #NEWLINE# Logger . debug ( 'ProbeSysfs: using probesysfs!' ) #NEWLINE# use_mouse = self . should_use_mouse ( ) #NEWLINE# if ( not self . select_all ) : #NEWLINE# #INDENT# inputs = [ x for x in inputs if ( x . has_capability ( ABS_MT_POSITION_X ) and ( use_mouse or ( not x . is_mouse ) ) ) ] #NEWLINE# #UNINDENT# for device in inputs : #NEWLINE# #INDENT# Logger . debug ( ( 'ProbeSysfs: found device: %s at %s' % ( device . name , device . device ) ) ) #NEWLINE# if self . match : #NEWLINE# #INDENT# if self . use_regex : #NEWLINE# #INDENT# if ( not match ( self . match , device . name , IGNORECASE ) ) : #NEWLINE# #INDENT# Logger . debug ( 'ProbeSysfs: device not match the rule in config, ignoring.' ) #NEWLINE# continue #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . match not in device . name ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# Logger . info ( ( 'ProbeSysfs: device match: %s' % device . device ) ) #NEWLINE# d = device . device #NEWLINE# devicename = ( self . device % dict ( name = d . split ( sep ) [ ( - 1 ) ] ) ) #NEWLINE# provider = MotionEventFactory . get ( self . provider ) #NEWLINE# if ( provider is None ) : #NEWLINE# #INDENT# Logger . info ( ( 'ProbeSysfs: unable to found provider %s' % x . provider ) ) #NEWLINE# Logger . info ( 'ProbeSysfs: fallback on hidinput' ) #NEWLINE# provider = MotionEventFactory . get ( 'hidinput' ) #NEWLINE# #UNINDENT# if ( provider is None ) : #NEWLINE# #INDENT# Logger . critical ( 'ProbeSysfs: no input provider found to handle this device !' ) #NEWLINE# continue #NEWLINE# #UNINDENT# instance = provider ( devicename , ( '%s,%s' % ( device . device , ',' . join ( self . args ) ) ) ) #NEWLINE# if instance : #NEWLINE# #INDENT# EventLoop . add_input_provider ( instance )