Multiple key presses in JavaScript only working in IE
<p>I have the following code:</p>

<pre><code>function handle_paste_keydown(key)
{   
    if(key.keyCode == 86 &amp;&amp; key.ctrlKey) // Ctrl + V
    {
        alert("Test...");
    }
}
</code></pre>

<p>This works in IE, but none of the other browsers. My reason for doing this is that I have finished creating a rich-text editor, but I need to handle the onpaste event carefully because formatted text is able to make it in to my editor, which could pose a minor risk to security, but also butchers my layout if malicious <code>&lt;span&gt;</code>s and <code>&lt;div&gt;</code>s make it in.</p>

<p>My current method is to give focus to an off-screen textarea, which means all code will be pasted in to that (which removes formatting); then I immediately grab the textarea.value and insert it at the current caret position in my contentEditable <code>&lt;div&gt;</code>.</p>

<p>So anyway, how do I get the Ctrl+V to work in all browsers <i>and</i> why doesn't it work in its current state?</p>

<p>Thank you.</p>
