Support keypressed function