new directive for handle enter key. now word can be added by press enter key