Working on keypress bug