title: Angular 5 Button Submit On Enter Key Press
body: <p>I have an Angular 5 form application using all the usual models but on the forms I want the form to submit without having to physically click on the 'Submit' button.</p>
  
  <p>I know it's normally as easy as adding <code>type=submit</code> to my button element but it does not seem to be working at all.</p>
  
  <p>I don't really want to call an <code>onclick</code> function just to get it working. Can anyone suggest anything that I may be missing.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form (submit)="search(ref, id, forename, surname, postcode)" action="#"&gt;
    &lt;mat-card&gt;
      &lt;mat-card-title class="firstCard"&gt;Investor/Adviser search&lt;/mat-card-title&gt;
      &lt;mat-card-content&gt;
        &lt;p *ngIf="this.noCriteria" class="errorMessage"&gt;Please enter search criteria.&lt;/p&gt;
        &lt;p *ngIf="this.notFound" class="errorMessage"&gt;No investor's or adviser's found.&lt;/p&gt;
          &lt;mat-form-field&gt;
            &lt;input matInput id="invReference" placeholder="Investor/Adviser reference (e.g. SCC/AJBS)" #ref&gt;
          &lt;/mat-form-field&gt;
          &lt;mat-form-field&gt;
            &lt;input matInput id="invId" placeholder="Investor/Adviser ID" type="number" #id&gt;
          &lt;/mat-form-field&gt;
          &lt;mat-form-field&gt;
            &lt;input matInput id="invForname" placeholder="Forename" #forename&gt;
          &lt;/mat-form-field&gt;
          &lt;mat-form-field&gt;
            &lt;input matInput id="invSurname" placeholder="Surname" #surname&gt;
          &lt;/mat-form-field&gt;
          &lt;mat-form-field&gt;
            &lt;input matInput id="invPostcode" placeholder="Postcode" #postcode&gt;
          &lt;/mat-form-field&gt;
      &lt;/mat-card-content&gt;
      &lt;mat-card-footer&gt;
        &lt;button mat-raised-button type="submit" class="successButton" id="invSearch" title="Click to perform search."&gt;Search&lt;/button&gt;
      &lt;/mat-card-footer&gt;
    &lt;/mat-card&gt;
  &lt;/form&gt;
  </code></pre>