I need to detect if user is performing a paste(Ctrl+V and mouse right click). I am able to detect ctrl+V but I can't detect copy paste from mouse. I am aware of the onPaste event but I need it under the keydown event because I am writing separate logic for many other key combinations. I have condensed this issue into a smaller code snippet below. I want the same alert to trigger if I copy paste using mouse.Thanks in advance
$("#txt1").keydown(function(event){
if(event.ctrlKey && event.keyCode == 86){
alert("copy paste detected");
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="text" id="txt1"/>