Prevent user to add multiple break lines in input form

Sorry my fault! This is missing in the CODE.

const pressedKey =  (event.key).toString()