title: Determine if an element was selected from HTML 5 datalist by pressing enter key
body: <pre><code>jQuery(document.body).on('input', '.icdCodeInput', function (event) {
  
  });
  </code></pre>
  
  <p>I have a HTML 5 datalist with class icdCodeInput. When I select an item from the list by either using mouse or by pressing enter, the above event gets fired. How can I differentiate inside the event if the item was selected by hitting enter key ?</p>