add keypressed listener