make enter key detection more robust
clean
Merge pull request #96 from rpandey1234/master

More robust enter check