title: ASCII control character html input text
body: <p>I'm trying to process input from a barcode scanner in a javascript browser app. The scanner output is a string of characters, which also contains at least one Group Separator character (ASCII 29). </p>
  
  <p>When I direct the input to i.e. notepad++, the input is displayed correctly including the Group Separator characters. When I direct the input into a <code>&lt;input type="text"&gt;</code> html field, the Group Separator objects are lost; it's neither visible in the field, nor detectable with javascript code.</p>
  
  <p>Does the <code>&lt;input type="text"&gt;</code> object truncate ASCII control characters? Any idea how to avoid that?</p>
  
  <p><strong>Edit:</strong>
  I'm using a code similar to Raidox's answer to achieve this:</p>
  
  <pre><code>    inputField.onkeypress = catchGroupSeparatorAndEnter;
      var fncChar = String.fromCharCode(29);
  
      function catchGroupSeparatorAndEnter(event) {
      if (event.ctrlKey &amp;&amp; event.which === 29) {
      inputField.value = inputField.value + fncChar;      
      event.preventDefault();
      event.stopPropagation();
  }
  ...
  }
  </code></pre>
  
  <p>This seems to work in Chrome and Edge, but not in Firefox. I have no clue how to get it to work there.</p>