title: How to implement 'BackSpace', 'arrow' in Xterm.js?
body: <p>I'm designing a web which include a terminal using Xterm.js and would like transfer the string to the server. I can type some string on it but can't use 'backspace', 'delete', 'home' functions.</p>
  
  <p>I tried to do that functions by myself, but there are a lot function need to do.</p>
  
  <p>e.g. Backspace</p>
  
  <pre><code>term.on('key', (key, ev) =&gt; {
      const code = key.charCodeAt(0);
      if(code == 127){   //Backspace
          term.write("\b \b");
      }
  });
  </code></pre>
  
  <p>I could delete the last character, but can't delete inside the string...
  Are these functions to be done by myself? Is there a more convenient module?</p>
  
  <p>Thanks!</p>