mark dirty with keypress