Quote:
Originally Posted by lakerslive
To any devs here, can AI or scripts detect if a paragraph entry into a form/field
was done via TYPING or COPY and PASTE method? ty
|
Of course! You can use JavaScript to list to specific events that are triggered during user interaction with input fields. You can listento Keydown/Kepress events, and you can listen for paste events.
Try this:
Code:
// Get input element
var input = document.getElementById('myInput');
// Listen for keydown
input.addEventListener('keydown', function(event) {
console.log('User is typing');
});
// Listen for copy-paste
input.addEventListener('paste', function(event) {
console.log('User pasted some text');
});