Fixed KeyEvent method. Fixed #21

fixed #21