title: Javascript CHAR insert replicate keystroke
body: <p>I'm using CodeMirror in a <strong>mobile</strong> project (using PhoneGap) and a particular CodeMirror function will initiate when the " > " key is pressed. </p>
  
  <p>In my application i have a quick button that allows the user to insert a " > " without having to find it on their softkeyboard. The problem is that CodeMirror detects the keystroke and not the character code <em> &amp;#62;</em>. </p>
  
  <p>So when the user presses the button - the code does not initiate because it never detected the keystroke. </p>
  
  <p>jQuery:</p>
  
  <pre><code>$('.html-inp').click(function() { 
      var txt = $(this).text().toString();
      editor.replaceSelection(txt, focus);
      editor.focus();
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;a href='#' data-role='button' id='a1' class='html-inp'&gt;&amp;#62;&lt;/a&gt;
  </code></pre>
  
  <p>Does anyone know how I can trick the app into thinking the key was pressed and not just inserting a character code?</p>