I want to simulate `Ctrl`+`C` to copy the text from a page. I first tried this:

```
$('#codetext').click( function() {
  $("#codetext").trigger({
    type:  'keydown',
    which:  99
  });
}

```

HTML: 

```
<input type='text' id='codetext'>

```

I have also tried using `$(this)` instead of the selector, but the input element also has focus on it, so it doesn't run.