added handlers for keydown functions