def event2json(event):
 return jdumps(dict(type=event.type, send_event=event.send_event, time=event.time, root=str(event.root), window=str(event.window), same_screen=event.same_screen, child=str(event.child), root_x=event.root_x, root_y=event.root_y, event_x=event.event_x, event_y=event.event_y, state=event.state, detail=event.detail))

def event2json ( event ) : return jdumps ( dict ( type = event . type , send_event = event . send_event , time = event . time , root = str ( event . root ) , window = str ( event . window ) , same_screen = event . same_screen , child = str ( event . child ) , root_x = event . root_x , root_y = event . root_y , event_x = event . event_x , event_y = event . event_y , state = event . state , detail = event . detail ) )
instance variable: keybuttonpointerevent time the server x time when this event was generated .