title: Not able to trigger Enter key event for text area in angular 7
body: <p>I have functionality where user types something and press submit button then the cursor should move to next line.
  When user types some words and press Enter key cursor should shift to next line with in the textarea.
  I am trying to achieve this functionality using KeyBoardEvent by using keypress event with keycode for Enter key. Below is the code,
  HTML code</p>
  <pre><code>&lt;textarea #elRef id=&quot;language&quot; class=&quot;post-text-area badge-post-textarea focus ng-pristine ng- 
  untouched ng-valid ng-empty&quot; placeholder=&quot;Share your thoughts...&quot; [(ngModel)]=&quot;content&quot;&gt;&lt;/textarea&gt;
  &lt;button (click)=&quot;submit()&quot;&gt;&lt;/button&gt;
  </code></pre>
  <p>The below angular code is where once user clicks submit I creating one keyevent for Enter and dispatch that event but Enter key event is not happening.
  ANGULAR JS code</p>
  <pre><code>  @ViewChild('elRef', { static: false }) userInput: ElementRef;
    
    submit(){
      const event = new KeyboardEvent('keypress', { 'keyCode': 32 });
      this.userInput.nativeElement.dispatchEvent(event);
      return;
     }
  </code></pre>
  <p>Kindly, Please some one help on this</p>