#NEWLINE# def makekeyhookevent( self , keysym , event ) : #NEWLINE# #INDENT# storewm = self . xwindowinfo ( ) #NEWLINE# if ( event . type == X . KeyPress ) : #NEWLINE# #INDENT# MessageName = 'key down' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( event . type == X . KeyRelease ) : #NEWLINE# #INDENT# MessageName = 'key up' #NEWLINE# #UNINDENT# #UNINDENT# return pyxhookkeyevent ( storewm [ 'handle' ] , storewm [ 'name' ] , storewm [ 'class' ] , self . lookup_keysym ( keysym ) , self . asciivalue ( keysym ) , False , event . detail , MessageName )