I want to listen on ctrl + c
key event on a div
dom. I know I can add keypress
event on the dom by setting its contentEditable
to true (see below code). But it will make the div editable. What I want is to listen on ctrl + c
event not make the div editable. Is there a way for me to do that?
$('.mydiv').attr('contentEditable', true);
$('.mydiv').focus();
$('.mydiv').bind('keypress', handler);