registration on keypress