key_press = event.KeyPress(detail=keycode,
                               time=X.CurrentTime,
                               root=root,
                               window=window,
                               child=X.NONE,