implemented keypress(buggy