#NEWLINE# def makemousehookevent( self , event ) : #NEWLINE# #INDENT# storewm = self . xwindowinfo ( ) #NEWLINE# if ( event . detail == 1 ) : #NEWLINE# #INDENT# MessageName = 'mouse left ' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( event . detail == 3 ) : #NEWLINE# #INDENT# MessageName = 'mouse right ' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( event . detail == 2 ) : #NEWLINE# #INDENT# MessageName = 'mouse middle ' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( event . detail == 5 ) : #NEWLINE# #INDENT# MessageName = 'mouse wheel down ' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( event . detail == 4 ) : #NEWLINE# #INDENT# MessageName = 'mouse wheel up ' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# MessageName = ( ( 'mouse ' + str ( event . detail ) ) + ' ' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( event . type == X . ButtonPress ) : #NEWLINE# #INDENT# MessageName = ( MessageName + 'down' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( event . type == X . ButtonRelease ) : #NEWLINE# #INDENT# MessageName = ( MessageName + 'up' ) #NEWLINE# #UNINDENT# #UNINDENT# return pyxhookmouseevent ( storewm [ 'handle' ] , storewm [ 'name' ] , storewm [ 'class' ] , ( MessageName . mouse_position_x , self . mouse_position_y ) , MessageName )