Prevent user to add multiple break lines in input form

I am sorry but it say pressedKey is not identified.