how to create new node upon keypress