Changed method of removing extra enter by stopping key press from propagating.