implemented keyrelease checks for keylistener