title: How to trigger Ctrl+C key event with jQuery?
body: <p>I want to simulate <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy the text from a page. I first tried this:</p>
  
  <pre><code>$('#codetext').click( function() {
    $("#codetext").trigger({
      type:  'keydown',
      which:  99
    });
  }
  </code></pre>
  
  <p>HTML: </p>
  
  <pre><code>&lt;input type='text' id='codetext'&gt;
  </code></pre>
  
  <p>I have also tried using <code>$(this)</code> instead of the selector, but the input element also has focus on it, so it doesn't run.</p>